https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100057

Nicolas Noble <pi...@nobis-crew.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pi...@nobis-crew.org

--- Comment #33 from Nicolas Noble <pi...@nobis-crew.org> ---
I'll echo a bit the sentiment in this thread, with a nuance: there's definitely
documentation needed around how to make a freestanding libstdc++, or how to use
the --disable-hosted-libstdcxx flag properly.

I've been trying to make a bare metal mips compiler out of gcc 11.2.0 using the
following flags:

../configure --target=mipsel-none-elf --without-isl --disable-nls
--disable-threads --disable-shared --disable-libssp --disable-libstdcxx-pch
--disable-libgomp --disable-werror --without-headers
--with-as=/usr/local/bin/mipsel-none-elf-as
--with-ld=/usr/local/bin/mipsel-none-elf-ld --enable-languages=c,c++
--disable-hosted-libstdcxx

This works with the following make statements:

make all-gcc
make install-strip-gcc
make all-target-libgcc
make install-strip-target-libgcc

This makes and installs a proper compiler for C, and some basic C++, but
without bare metal C++ headers such as type traits.

When trying to do run:

make all-target-libstdc++-v3

Then we end up with the error

checking for shl_load... configure: error: Link tests are not allowed after
GCC_NO_EXECUTABLES.

At the moment, I don't understand if it's possible to spawn a cross compiler
with a freestanding libc and libstdc++.

Reply via email to