Second attempt at fixing it, you could surely make this more complex using autohell but I am not going there.
If I understood correctly this script is only necessary if the application is linked -static? Means I would try to avoid using it, aslong I dont explicitly want to do that. Kind regards, Norbert 2017-10-13 9:40 GMT+02:00 Norbert Lange <[email protected]>: > Ok I just realized there is a "-Ur" option, aside from "-U -r". > > You get alot otherwise undocumented flags with "gcc --help -v" BTW > > 2017-10-13 9:13 GMT+02:00 Norbert Lange <[email protected]>: >> Hello, >> >> I tracked down the source of information to this: >> https://wiki.ubuntu.com/SecurityTeam/PIE >> >> I changed the flags from "-Wl,-Ur" to "-Wl,-U -r", so you wont get an >> explanation from me, why -U has to be passed for the linker. >> And by the way, gcc accepts -U aswell, so this might be preferable to >> be used directly too. >> >> I don`t know why those flags aren' t documented, bug in gcc >> documentation? As far as I understand is that gcc is smart enough to >> correctly deal with the flags gcc directly received, but the linker >> lacks that information. >> >> I don' t know what the issue is with the C++ Constructors, in the >> context of this change? >> (I heard about the issues if those reside in a shared library, use >> function from libcobald and don't depend on libcobald. Which is more >> of a broken build to me if you don't add the depended libs, and will >> bite you the same way if you use GCCs constructor attribute) >> >> Kind regards, >> Norbert. >> >> 2017-10-12 10:33 GMT+02:00 Henning Schild <[email protected]>: >>> Hey Norbert, >>> >>> thanks for looking into that again! Could you please explain how and >>> why that works, or point out what to look at in flint? Mailing list >>> thread, commit, something like that. >>> >>> As far as i can see gcc now gets a "-r" which i do not find in the >>> manpage. And ld gets a "-U" which i do not find in its manpage. And >>> there is something about c++ constructors which might change the >>> behaviour of xenomai. >>> >>> Henning >>> >>> Am Tue, 10 Oct 2017 16:38:50 +0200 >>> schrieb Norbert Lange <[email protected]>: >>> >>>> Some highly trivial fix attached! >>>> Its strange that this flag is not documented in the manual (I found >>>> out abaout this fix from https://launchpad.net/ubuntu/+source/flint) >>>> >>>> Norbert Lange >>>> >>>> 2017-08-10 11:49 GMT+02:00 Henning Schild >>>> <[email protected]>: >>>> > Hi Norbert, >>>> > >>>> > Thanks! In fact that issue has come up before and a similar >>>> > workaround was described. It should be fixed, patches welcome! >>>> > >>>> > Henning >>>> > >>>> > Am Wed, 9 Aug 2017 16:21:02 +0200 >>>> > schrieb Norbert Lange <[email protected]>: >>>> > >>>> >> Hello, >>>> >> >>>> >> Building the xenomai package won`t work because debian now >>>> >> defaults to using pie, and the linker will complain with "ld: -r >>>> >> and -pie may not be used together" >>>> >> >>>> >> A workaround for now is to add the flags manually: >>>> >> ../xenomai-3.0.5/configure LDFLAGS=-no-pie CFLAGS="-fno-PIE >>>> >> -fno-pie -no-pie" >>>> >> >>>> >> A real fix would be similar to >>>> >> http://lists.gnu.org/archive/html/bug-grub/2016-11/msg00011.html >>>> >> (no-pie is not supported on old and other compilers) >>>> >> >>>> >> Kind regards, >>>> >> Norbert >>>> >> >>>> >> _______________________________________________ >>>> >> Xenomai mailing list >>>> >> [email protected] >>>> >> https://xenomai.org/mailman/listinfo/xenomai >>>> > >>> -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_gcc_with_defaultpie_secondtry.patch Type: text/x-patch Size: 600 bytes Desc: not available URL: <http://xenomai.org/pipermail/xenomai/attachments/20171013/23f4269f/attachment.bin> _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
