state of the install-bootstrap-headers patch

Joseph Myers joseph@codesourcery.com
Mon Mar 5 22:00:00 GMT 2018


On Mon, 5 Mar 2018, Helmut Grohne wrote:

> I'm wondering about the state of a patch that adds a flag
> "install-bootstrap-headers" to the Makefile. Let me first try to
> summarize the problem, then the solutions taken by various Linux
> distributions and then proceed to asking how to move forward.

install-bootstrap-headers was part of an obsolete process for 
bootstrapping cross toolchains including glibc, which involved three GCC 
builds (a first static-only build with inhibit_libc which was used to 
configure glibc to install bootstrap headers, crt*.o and a dummy libc.so, 
which allowed a second build including shared libgcc, which could be used 
to build and install a full glibc and so allow building the third GCC 
including support for non-C languages).

The conclusion of the discussion of install-bootstrap-headers was to 
obsolete that process by enabling a two-GCC process: that is, enabling the 
initial static-only C-only GCC to build a complete glibc, with the 
installed stripped glibc binaries being byte-for-byte identical to those 
you get from a longer alternating sequence of GCC and glibc builds (in 
particular, with no dependence on the existence of libgcc_s.so at the time 
glibc is built).  As of glibc 2.16 and GCC 4.9 this is fully supported.  
(For some configurations you need the --with-glibc-version configure 
option to be passed when configuring the static-only GCC so that it knows 
what glibc version to expect to be used; in particular, this is required 
for configurations where GCC has architecture-specific SSP support.  For 
ia64 you may need GCC 5 for inhibit_libc builds to work at all.)

This modern bootstrap process is illustrated by what the 
build-many-glibcs.py script does.

> The patches are in circulation since around 2007 and were reposted in
> 2012: https://sourceware.org/ml/libc-alpha/2012-03/msg00237.html The
> later discussion wound down figuring whether gcc or glibc should deal
> with it and it ended in some dreaming at:
> https://sourceware.org/ml/libc-alpha/2012-03/msg00960.html

While not everything there (which would allow just *one* GCC build in such 
a bootstrap case) has been implemented, enough has been implemented to 
obsolete the three-GCC-build process, and thus to obsolete 
install-bootstrap-headers.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list