On Tue, 5 May 2020, Szabolcs Nagy wrote:

> > A design principle is that glibc built with libgcc configured without 
> > glibc headers but with --with-glibc-version should produce an identical 
> > stripped binary to the glibc resulting from a longer alternating sequence 
> > of GCC and glibc builds.  So it is not correct for any libgcc 
> > functionality that would end up being linked into glibc binaries to depend 
> > on glibc headers or libraries being available when libgcc is configured.
> > 
> > Thus, this libgcc code should not actually be conditional on 
> > !inhibit_libc, without a fallback when configured using 
> > --with-glibc-version to specify a glibc version with __getauxval, because 
> > that would mean the modern process for bootstrapping a cross glibc build 
> > produces a glibc binary that quietly differs from one produced by a longer 
> > alternating sequence of builds (missing this constructor).
> 
> i.e. libgcc needs to replicate definitions from sys/auxv.h?

Yes.  (This doesn't arise for unwind code, which has rather larger blocks 
of code disabled for inhibit_libc, because that doesn't get statically 
linked into libc.so so it's not a problem for that code to be missing 
from the bootstrap libgcc.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to