tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
libtool, -fstack-protector, -nostdlib, and while we're at it -Bdirect on SunOS
In order to get over suppression of -fstack-protector namely in SunOS
builds for perl and cups, I've been testing for a real long time now
a patch found on libtool-patches@ in the following thread:
Re: Bug: linking shared libraries on Cygwin results in undefined references to
__stack_chck_guard for code compiled with -fstack-protector
This patch prevents libtools link phase from suppressing
'-fstack-protector*' switches such that gcc can issue the proper link
statement.
Well, that was fine for gcc, but when building with g++ libtool adds for
some reason '-nostdlib' which foils the above patch, so that needed
attending to. It is useful to know that this patch fixes similar
problems with, for example, '-pthread' and others!
Then, Mr Orth found a problem on SunOS x86_64 with -Bdirect as mentioned
here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 and
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
So I have some patches found here:
http://www.netbsd.org/~richard/libtool-SunOS/ that I've been using
without issue on both i386 and x86_64.
Summary:
0001-add-fstack-protector-link-support-to-libtool.patch
permits libtool to generate -fstack-protector* on all platforms.
0002-x86-64-sunos-fix-for-g-and-Wl-Bdirect-involving-libt.patch
affects only SunOS x86_64 libtool, gcc47 & gcc48
0003-remove-nostdlib-from-libtool-shared-libraries-for-fs.patch
suppresses -nostdlib with g++ on SunOS only (see note # below)
0004-use-libtool-fstack-protector-support-in-cups.patch
re-enable in perl
0005-put-back-stack-protector-on-solaris-in-perl.patch
re-enable in perl
Note # other platforms that wish to test suppression of '-nostdlib' will
need to apply a similar patch for their target. Apparently
the darwin platform may have (or have had) issues...
I encourage direct participation in the libtool@ discussion
'g++ and -nostdlib'
NB libtool-base is *not* revbump'd in the any of the above patches,
although gcc*, cups, and perl are.
Home |
Main Index |
Thread Index |
Old Index