On 10/01/22 00:26 +0300, Serge Belyshev wrote:
Ping: [PATCH] Add --enable-first-stage-cross configure option
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575318.html


Add --enable-first-stage-cross configure option

Build static-only, C-only compiler that is sufficient to cross compile
glibc.  This option disables various runtime libraries that require
libc to compile, turns on --with-newlib, --without-headers,
--disable-decimal-float, --disable-shared, --disable-threads, and sets
--enable-languages=c.

Rationale: current way of building first stage compiler of a cross
toolchain requires specifying a list of target libraries that are not
going to be compiled due to their dependency on target libc.  This
list is not documented in gccinstall.texi and sometimes changes.  To
simplify the procedure, it is better to maintain that list in the GCC
itself.

I think this is a great idea.

I don't think it makes any difference to this patch, but I've just
committed a change to libstdc++ so that you no longer neeed to add
--with-newlib when libstdc++ is configured with --without-headers
(because it's counter-intuitive to have to say which libc you're using
when not using any libc).

I only tested it for --disable-hosted-libstdcxx --without-headers
because I am not sure what libstdc++ even does if you build it hosted
but --without-headers.

Reply via email to