tag:blogger.com,1999:blog-7481875957453356650.post9036476052241264376..comments2024-03-27T19:11:05.510-07:00Comments on Pete Goodliffe: [Code] Building old toolchains on a new Linux (disabling Fortify)Pete Goodliffehttp://www.blogger.com/profile/11084090457826022937noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7481875957453356650.post-9762371623055343552014-10-17T16:30:28.671-07:002014-10-17T16:30:28.671-07:00Thanks for the hints Pete!
I added EXTRA_TARGET_C...Thanks for the hints Pete!<br /><br />I added EXTRA_TARGET_CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" to my .dat file and then CFLAGS="$EXTRA_TARGET_CFLAGS" to the line where binutils is built (make CFLAGS="$EXTRA_TARGET_CFLAGS" $PARALLELMFLAGS all).<br /><br />My only concern is https://gcc.gnu.org/ml/gcc-help/2011-03/msg00262.html says that FORTIFY_SOURCE should only be used to build GCC and not a library.<br /><br />Did you make the same change or did you add the CFLAGS to the GCC build steps?Unknownhttps://www.blogger.com/profile/01146639069068662099noreply@blogger.comtag:blogger.com,1999:blog-7481875957453356650.post-28712706525593988642009-02-02T05:56:00.000-08:002009-02-02T05:56:00.000-08:00AFAIK the reference for _FORTIFY_SOURCE is this po...AFAIK the reference for _FORTIFY_SOURCE is this post:<BR/><A HREF="http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html" REL="nofollow">http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html</A><BR/><BR/>To build for old targets, I'm currently using these flags:<BR/><I>-fno-stack-protector -D_FORTIFY_SOURCE=0 -Wl,--hash-style=both</I><BR/><BR/>Here are some useful links:<BR/>- <A HREF="http://ldn.linuxfoundation.org/blog-entry/binary-compatibility-issue-between-linux-distributions-and-versions" REL="nofollow">http://ldn.linuxfoundation.org/blog-entry/binary-compatibility-issue-between-linux-distributions-and-versions</A><BR/>- <A HREF="http://avinesh.googlepages.com/binaryincompatibilitybetweenrhel4andrhel" REL="nofollow">http://avinesh.googlepages.com/binaryincompatibilitybetweenrhel4andrhel</A><BR/>- <A HREF="http://evanjones.ca/portable-linux-binaries.html" REL="nofollow">http://evanjones.ca/portable-linux-binaries.html</A>Anonymousnoreply@blogger.com