在 2019/9/24 18:49, ralph engels 写道:
> Oh hell... seems the __chk functions you mention that mingw-w64 should
> not have are actually implemented in version 7 of the mingw-w64-api.
> 
> This causes a lot of breakage and im going to revert this api to version
> 6 untill things works again.
> 
> Do not! upgrade to the latest mingw-w64-headers-git and
> mingw-w64-crt-git unless you want to break the compiler.
> 
> removing the _FORTIFY_SOURCE macro from pacmans scripts is not enough
> since the mingw-w64 api now sets its own macro namely this ->
> __MINGW_FORTIFY_LEVEL.
> 

ATM I have little free time to look into this issue. Nevertheless I
think setting `_FORTIFY_SOURCE` to zero should make the toolchains build.

Then we should think about whether to enable this thing globally (this
is actually an MSYS2 issue [1], not a mingw-w64 issue; however I think
it'd better be documented somewhere). Enabling `-D_FORTIFY_SOURCE` with
optimization requires `-lssp` in `LIBS`, `LDADD` or `LDLIBS`, basing on
where it should be added, in Makefiles or build scripts that invoke
configure and so forth. Either way, there has to be a little
modification on the MSYS2 side.

[1] https://github.com/msys2/MINGW-packages/issues/5803


[please CC the mailing list in case other may have comments.]



> Den 24-09-2019 kl. 04:20 skrev Liu Hao:
>> 在 2019/9/24 上午3:31, ralph engels 写道:
>>> After removing _FORTIFY_SOURCE=2 from CPPFLAGS in pacmans scripts
>>> ncurses builds again,
>>>
>>> no need for libssp either unless you actually want stack smashing
>>> protection.
>>>
>>> Seems some recent change in the runtime libraries causes this flag to
>>> break stuff :/
>>>
>> Prior to these recent changes, `_FORTIFY_SOURCE` did nothing.
>>
>> pacman isn't particular for enabling `_FORTIFY_SOURCE` actually. Some
>> other Linux distributions do the same (e.g. Ubuntu even have it in their
>> GCC's builtin specs so it has to be disabled explicitly), which
>> indicates such protection is kind of desired by some people.
>>
>>
>>> it also caused python2 to fail building with an obscure segmentation
>>> fault error in the 32 bit build.
>>>
>> What was it that segfaulted? GCC, CC1 or some conftests?
>>
>>


-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to