[klibc] Adding -nostdlib to REQFLAGS

Martin Schlemmer azarah at nosferatu.za.org
Thu Aug 25 11:38:32 PDT 2005

On Thu, 2005-08-25 at 10:29 -0700, H. Peter Anvin wrote:
> Martin Schlemmer wrote:
> > Hi,
> > 
> > For our hardened profiles (gcc with SSP among things), its specs file
> > tries to figure out when it should disable SSP for kernel/whatever
> > builds by checking if -nostdlib was passed.  KLIBC however do not pass
> > this, so it tries to compile with -fno-stack-protector, and then fails
> > to link as it cannot resolve the __guard, etc symbols (in glibc).
> > 
> >   http://bugs.gentoo.org/show_bug.cgi?id=103437
> > 
> > Any objection to attached patch?
> > 
> I'd need to know what other effects -nostdlib has.  If it's purely a 
> linker flag it won't have any effect since klibc doesn't use gcc's 
> linker, and then it's just fine; if it has other side effects it might 
> not be a good thing.

Its a gcc flag (ld will bail with it) ... It just say not to link the
default libs (libc, libgcc mainly .. I think there might be something
else on ia64 or some other arch) ... As we build a libc, this is fine,
and as the klibc build-system and klcc link in libgcc automagically,
this should not be an issue as well.  I tested it this side for x86 and
x86_64, and there at least it builds fine.

So to simplify .. yes, its just gcc linking side, so should be fine from
what you stated above.

Martin Schlemmer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.zytor.com/pipermail/klibc/attachments/20050825/27c04bfa/attachment.bin

More information about the klibc mailing list