[PATCH] Add -lssp_nonshared to GCC's LIB_SPEC unconditionally
Jeremie Le Hen
jeremie at le-hen.org
Sun Sep 19 08:32:53 UTC 2010
Hi Alexander,
On Thu, Aug 05, 2010 at 09:14:46PM +0200, Jeremie Le Hen wrote:
> On Tue, Aug 03, 2010 at 11:46:51AM -0400, Alexander Kabaev wrote:
> >
> > I have no objection, but think we should cave in and investigate the
> > possibility of using linker script wrapping libc.so in FreeBSD-9.0:
> >
> > Below is Linux' counterpart:
> >
> > /* GNU ld script
> > Use the shared library, but some functions are only in
> > the static library, so try that secondarily. */
> > OUTPUT_FORMAT(elf32-i386)
> > GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED
> > ( /lib/ld-linux.so.2 ) )
>
> Ok. For now can you commit the proposed modification. I'll try to make
> a patch with your proposal.
The attached patch does two things: It modifies bsd.lib.mk to support ld
scripts for shared libraries and adds such a script to replace the
/usr/lib/libc.so symlink to /lib/libc.so.X.
Basically, SHLIB_LDSCRIPT is defined in lib/libc/Makefile and points to
the file containing the script itself:
GROUP ( @@SHLIB@@ /usr/lib/libssp_nonshared.a )
During make install, @@SHLIB@@ will be replaced by the real path of the
shared library.
Thanks.
Regards,
--
Jeremie Le Hen
Humans are born free and equal. But some are more equal than others.
Coluche
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld_ssp_nonshared.diff
Type: text/x-diff
Size: 3426 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100919/330904e3/ld_ssp_nonshared.bin
More information about the freebsd-hackers
mailing list