This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libc_cv_ssp=no required to bootstrap a cross compiler


On Wed, 5 Sep 2012, Christer Solskogen wrote:

> With the GCC-soon-to-be 4.8 (alias gcc-trunk) and the master branch of glibc
> I'm able to create a cross compiler without to many hacks.
> 
> binutils->static gcc->glibc->gcc works. Almost.
> glibc bails out with n function `getanswer':
> gethnamaddr.c:(.text+0x8b8): undefined reference to `__stack_chk_guard' - but

Linking what program or shared library?

> with a hidden configure option ( libc_cv_ssp=no ) I am able to build it. I've
> tried with sparc,powerpc, i686 and x86_64 targets.
> 
> But is this a problem? The 'libc_cv_ssp=no' part I mean?

Please debug where this symbol would come from in a non-bootstrap build 
(i.e. a build using the final GCC) and why it's not available in a 
bootstrap build.  You should not need any special settings such as 
libc_cv_ssp=no; bootstrap builds should produce identical configure test 
results (except for tests relating to the C++ compiler, which are only 
relevant for running the glibc testsuite) and libc binaries to 
non-bootstrap builds.  This definitely works for ARM at least; ARM was 
where I developed and tested the patches to get the binaries identical.

It's possible that actually you need gcc_cv_libc_provides_ssp=yes when 
configuring the initial GCC, so that it knows it will be used with 
new-enough glibc.  (It would be a good idea to add a --with-glibc-version 
configure option to GCC, that overrides all configure tests based on 
versions extracted from system headers so that the results can be correct 
for the initial bootstrap compiler that is configured without headers 
available.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]