compiling ports with SSP (was: [PATCH] Add -lssp_nonshared to
GCC's LIB_SPEC unconditionally)=
Jeremie Le Hen
jeremie at le-hen.org
Wed Jun 1 22:07:17 UTC 2011
Hi Kostik,
Thanks to b.f., I've been reminded that this patch has yet to be
committed :).
As a reminder, here are the archive pointers to the discussion:
http://lists.freebsd.org/pipermail/freebsd-hackers/2010-August/032549.html
continued...
http://lists.freebsd.org/pipermail/freebsd-hackers/2010-September/033028.html
continued...
http://lists.freebsd.org/pipermail/freebsd-hackers/2010-November/033478.html
On Sat, Nov 06, 2010 at 09:47:02PM +0200, Kostik Belousov wrote:
> On Fri, Nov 05, 2010 at 07:00:23PM -0400, Alexander Kabaev wrote:
> > On Fri, 5 Nov 2010 22:39:06 +0100
> > Jeremie Le Hen <jeremie at le-hen.org> wrote:
> >
> > > Hi Kib,
> > >
> > > On Tue, Oct 05, 2010 at 08:18:04PM +0200, Jeremie Le Hen wrote:
> > > >
> > > > On Mon, Sep 27, 2010 at 06:44:57PM +0300, Kostik Belousov wrote:
> > > > > Hardcoding /usr/lib as the path to the library in the script looks
> > > > > problematic. For the buidlworld, you are linking resulting
> > > > > binaries with the host library, instead of the
> > > > > buildworld-produced one. For lib32, it makes non-working
> > > > > combination of 32/64 bit.
> > > >
> > > > Sorry for the late reply, but I had to collect various evidences
> > > > for my sayings and my development machine is reaaaaaaaaaaally slow.
> > > >
> > > > In fact it seems the toolchain built for buildworld contains a ld(1)
> > > > binary which invariably bases lookups for libraries in ${WORLDTMP},
> > > > even in case of an absolute path. I have two evidences of this:
> > > > - Putting /usr/obj/usr/src/tmp/usr/lib/libssp_nonshared.a in
> > > > /usr/obj/usr/src/tmp/usr/lib/libc.ld leads toolchain's ld(1) to
> > > > use /usr/obj/usr/src/tmp/usr/obj/usr/src/tmp/usr/lib/libssp_nonshared.a;
> > > > - I also verified this with a hand-wrought opensnoop-like DTrace
> > > > script.
> > >
> > > I dare to remind you about my patch. Do you have any other concerns?
> > >
> > > Thanks.
> > > Regards,
> > > --
> > > Jeremie Le Hen
> > >
> > > Humans are born free and equal. But some are more equal than others.
> > > Coluche
> >
> > Hmm, I thought I did approve this patch already a long time agi, but
> > since you asked:
> >
> > +.if defined(SHLIB_LDSCRIPT) && exists(${.CURDIR}/${SHLIB_LDSCRIPT})
> >
> > this should be:
> >
> > +.if defined(SHLIB_LDSCRIPT)
> >
> > ditto for all other similar places. Otherwise I do not think we should
> > hold the patch in queue ans should unleash it on unsuspecting public.
>
> Also, I think the "DEBUG" lines should be removed.
Sure, I'll do it in my next update.
> You install the libxxx.ld and then symlink libxxx.so to libxxx.ld.
> Why ? Would it be enough to install just the libxxx.so ?
I just thought it would be less puzzling for users than noticing that
libc.so is only a few hundred of ascii. I don't have a strong opinion
about this though.
> Otherwise, I think you need the similar
> .if ${SHLIBDIR} == ${LIBDIR}
> magic, that is better to be avoided.
Can you explain a little bit more about this one please? I'm willing to
post an updated patch for further review.
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: 2499 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110601/80d80ef4/ld_ssp_nonshared.bin
More information about the freebsd-hackers
mailing list