public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling GCC 11 for Windows targeting ARM on Linux
@ 2022-01-10 16:47 Thomas Sobczynski
  2022-01-10 17:16 ` Xi Ruoyao
  2022-01-10 17:24 ` Jonathan Wakely
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas Sobczynski @ 2022-01-10 16:47 UTC (permalink / raw)
  To: gcc-help

I would appreciate insight on a compilation error while building GCC 11 to run on Windows, targeting bare metal ARM, from a GNU/Linux build environment (specifically Ubuntu via WSL2).

I have a current (within a few days) clone of the Git repo at the HEAD of releases/gcc-11.


*** Source tree:
$ git status
On branch releases/gcc-11
Your branch is up to date with 'origin/releases/gcc-11'.


*** Build environment:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)


For better or worse, I'm using GNU Make to drive the build process from the next level up from the GCC source tree, i.e. my Make is calling $(MAKE) to invoke the GCC build. Extracting the recipe steps, here is how I'm attempting to build GCC:

Recipe steps:

# Obtain GCC source for the release branch of interest.
#
# "If you do not intend to make changes to the source, you can avoid installing these build tools by running contrib/gcc_update."
# https://gcc.gnu.org/git.html

git clone --branch releases/gcc-11 --depth 1 git://gcc.gnu.org/git/gcc.git $(COMPILER_ROOT)/gcc
cd $(COMPILER_ROOT)/gcc && contrib/gcc_update

# "If you also intend to build binutils (either to upgrade an existing installation or for use in place of the corresponding tools of your OS), unpack the binutils distribution ... in the same directory..."
# https://gcc.gnu.org/install/download.html
# https://www.gnu.org/software/binutils/

git clone --branch binutils-2_37 --depth 1 git://sourceware.org/git/binutils-gdb.git $(COMPILER_ROOT)/gcc/binutils

# "Likewise the GMP, MPFR and MPC libraries can be automatically built together with GCC. You may simply run the contrib/download_prerequisites script in the GCC source directory to set up everything."

cd $(COMPILER_ROOT)/gcc && contrib/download_prerequisites

# Configuration
# https://gcc.gnu.org/install/configure.html
#
# "The build machine is the system which you are using, the host machine is the system where you want to run the resulting compiler (normally the build machine), and the target machine is the system for which you want the compiler to generate code."
# We're going to use WSL + Ubuntu + GCC to build a toolchain to run on Windows targeting ARM.

cd $(COMPILER_ROOT)/build && $(COMPILER_ROOT)/gcc/configure --host=x86_64-w64-mingw32 --target=arm-none-eabi --prefix=${TOOLCHAIN_ROOT} --enable-vtable-verify --with-multilib-list=aprofile,rmprofile --enable-target-optspace --enable-languages=c,c++,lto --enable-large-address-aware

# Build the cross-compiler
# https://gcc.gnu.org/install/build.html

$(MAKE) -C $(COMPILER_ROOT)/build



I have made one change to a config script to get as far as I have:


$ git diff -- config/mh-mingw
diff --git a/config/mh-mingw b/config/mh-mingw
index e91367a71..a25d9dfd0 100644
--- a/config/mh-mingw
+++ b/config/mh-mingw
@@ -11,5 +11,5 @@ STAGE4_CXXFLAGS += -D__USE_MINGW_ACCESS

 # Increase stack limit to a figure based on the Linux default, with 4MB added
 # as GCC turns out to need that much more to pass all the limits-* tests.
-LDFLAGS += -Wl,--stack,12582912
-BOOT_LDFLAGS += -Wl,--stack,12582912
+#LDFLAGS += -Wl,--stack,12582912
+#BOOT_LDFLAGS += -Wl,--stack,12582912


I commented out those flags because they are not recognized by GCC 9 on Linux as the toolchain building the compiler. I think these flags are only needed for a compiler that is actually running on Windows, which I am NOT doing; I am building a compiler FOR Windows.

When I encountered another error, and another beyond that, I concluded that I must be making an error myself, because I doubt that a released version of GCC would have multiple errors with respect to cross compilers.



Here is the tail end of the build output I see leading up to the error:

mv -f Tlto-wrapper.exe lto-wrapper.exe
x86_64-w64-mingw32-g++  -fno-PIE -c  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/tsobczynski/toolchain/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/tsobczynski/toolchain/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"11.2.1\" -DDEFAULT_REAL_TARGET_MACHINE=\"arm-none-eabi\" -DDEFAULT_TARGET_MACHINE=\"arm-none-eabi\" -DSTANDARD_BINDIR_PREFIX=\"/home/tsobczynski/toolchain/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DACCEL_DIR_SUFFIX=\"\"   -DCONFIGURE_SPECS="\"\"" -DTOOL_INCLUDE_DIR=\"/home/tsobczynski/toolchain/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/include\" -DNATIVE_SYSTEM_HEADER_DIR=\"/usr/include\" -DTARGET_MACHINE=\"arm-none-eabi\" -DPERSONALITY=\"ar\" -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o gcc-ar.o -MT gcc-ar.o -MMD -MP -MF ./.deps/gcc-ar.TPo /home/tsobczynski/Compiler/gcc/gcc/gcc-ar.c
x86_64-w64-mingw32-g++ -no-pie   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  gcc-ar.o -o gcc-ar.exe \
        file-find.o libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a  ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
cp /home/tsobczynski/Compiler/gcc/gcc/gcc-ar.c gcc-nm.c
x86_64-w64-mingw32-g++  -fno-PIE -c  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/tsobczynski/toolchain/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/tsobczynski/toolchain/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"11.2.1\" -DDEFAULT_REAL_TARGET_MACHINE=\"arm-none-eabi\" -DDEFAULT_TARGET_MACHINE=\"arm-none-eabi\" -DSTANDARD_BINDIR_PREFIX=\"/home/tsobczynski/toolchain/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DACCEL_DIR_SUFFIX=\"\"   -DCONFIGURE_SPECS="\"\"" -DTOOL_INCLUDE_DIR=\"/home/tsobczynski/toolchain/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/include\" -DNATIVE_SYSTEM_HEADER_DIR=\"/usr/include\" -DTARGET_MACHINE=\"arm-none-eabi\" -DPERSONALITY=\"nm\" -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o gcc-nm.o -MT gcc-nm.o -MMD -MP -MF ./.deps/gcc-nm.TPo gcc-nm.c
x86_64-w64-mingw32-g++ -no-pie   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  gcc-nm.o -o gcc-nm.exe \
        file-find.o libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a  ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
cp /home/tsobczynski/Compiler/gcc/gcc/gcc-ar.c gcc-ranlib.c
x86_64-w64-mingw32-g++  -fno-PIE -c  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/tsobczynski/toolchain/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/tsobczynski/toolchain/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"11.2.1\" -DDEFAULT_REAL_TARGET_MACHINE=\"arm-none-eabi\" -DDEFAULT_TARGET_MACHINE=\"arm-none-eabi\" -DSTANDARD_BINDIR_PREFIX=\"/home/tsobczynski/toolchain/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DACCEL_DIR_SUFFIX=\"\"   -DCONFIGURE_SPECS="\"\"" -DTOOL_INCLUDE_DIR=\"/home/tsobczynski/toolchain/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/include\" -DNATIVE_SYSTEM_HEADER_DIR=\"/usr/include\" -DTARGET_MACHINE=\"arm-none-eabi\" -DPERSONALITY=\"ranlib\" -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o gcc-ranlib.o -MT gcc-ranlib.o -MMD -MP -MF ./.deps/gcc-ranlib.TPo gcc-ranlib.c
x86_64-w64-mingw32-g++ -no-pie   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  gcc-ranlib.o -o gcc-ranlib.exe \
        file-find.o libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a  ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
x86_64-w64-mingw32-g++  -fno-PIE -c  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/tsobczynski/toolchain/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/tsobczynski/toolchain/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"11.2.1\" -DDEFAULT_REAL_TARGET_MACHINE=\"arm-none-eabi\" -DDEFAULT_TARGET_MACHINE=\"arm-none-eabi\" -DSTANDARD_BINDIR_PREFIX=\"/home/tsobczynski/toolchain/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DACCEL_DIR_SUFFIX=\"\"   -DCONFIGURE_SPECS="\"\"" -DTOOL_INCLUDE_DIR=\"/home/tsobczynski/toolchain/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/include\" -DNATIVE_SYSTEM_HEADER_DIR=\"/usr/include\" -DBASEVER="\"11.2.1\"" -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o gcc.o -MT gcc.o -MMD -MP -MF ./.deps/gcc.TPo /home/tsobczynski/Compiler/gcc/gcc/gcc.c
x86_64-w64-mingw32-g++  -fno-PIE -c   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o gcc-main.o -MT gcc-main.o -MMD -MP -MF ./.deps/gcc-main.TPo /home/tsobczynski/Compiler/gcc/gcc/gcc-main.c
x86_64-w64-mingw32-g++  -fno-PIE -c  -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/home/tsobczynski/toolchain/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/home/tsobczynski/toolchain/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"11.2.1\" -DDEFAULT_REAL_TARGET_MACHINE=\"arm-none-eabi\" -DDEFAULT_TARGET_MACHINE=\"arm-none-eabi\" -DSTANDARD_BINDIR_PREFIX=\"/home/tsobczynski/toolchain/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" -DACCEL_DIR_SUFFIX=\"\"   -DCONFIGURE_SPECS="\"\"" -DTOOL_INCLUDE_DIR=\"/home/tsobczynski/toolchain/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/include\" -DNATIVE_SYSTEM_HEADER_DIR=\"/usr/include\" -DIN_GCC_FRONTEND -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Ic -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/c -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o c/gccspec.o -MT c/gccspec.o -MMD -MP -MF c/.deps/gccspec.TPo /home/tsobczynski/Compiler/gcc/gcc/c/gccspec.c
x86_64-w64-mingw32-g++  -fno-PIE -c   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -I. -I. -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/. -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include /home/tsobczynski/Compiler/gcc/gcc/config/i386/driver-mingw32.c
x86_64-w64-mingw32-g++ -no-pie   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o xgcc.exe gcc.o gcc-main.o ggc-none.o \
  c/gccspec.o driver-mingw32.o  libcommon-target.a \
   libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a  ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
cp xgcc.exe gcc-cross.exe
x86_64-w64-mingw32-g++  -fno-PIE -c   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Ic-family -I/home/tsobczynski/Compiler/gcc/gcc -I/home/tsobczynski/Compiler/gcc/gcc/c-family -I/home/tsobczynski/Compiler/gcc/gcc/../include -I./../intl -I/home/tsobczynski/Compiler/gcc/gcc/../libcpp/include -I/home/tsobczynski/Compiler/gcc/gcc/../libcody -I/home/tsobczynski/Compiler/build/./gmp -I/home/tsobczynski/Compiler/gcc/gmp -I/home/tsobczynski/Compiler/build/./mpfr/src -I/home/tsobczynski/Compiler/gcc/mpfr/src -I/home/tsobczynski/Compiler/gcc/mpc/src  -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/tsobczynski/Compiler/gcc/gcc/../libbacktrace -I/home/tsobczynski/Compiler/build/./isl/include -I/home/tsobczynski/Compiler/gcc/isl/include  -o c-family/cppspec.o -MT c-family/cppspec.o -MMD -MP -MF c-family/.deps/cppspec.TPo /home/tsobczynski/Compiler/gcc/gcc/c-family/cppspec.c
x86_64-w64-mingw32-g++ -no-pie   -g -O2 -D__USE_MINGW_ACCESS -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc  -o cpp.exe gcc.o gcc-main.o ggc-none.o \
  c-family/cppspec.o driver-mingw32.o  libcommon-target.a \
   libcommon.a ../libcpp/libcpp.a ./../intl/libintl.a  ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
arm-none-eabi-gcc -dumpspecs > tmp-specs
/bin/bash: arm-none-eabi-gcc: command not found
make[3]: *** [Makefile:2165: specs] Error 127
make[3]: Leaving directory '/home/tsobczynski/Compiler/build/gcc'
make[2]: *** [Makefile:4458: all-gcc] Error 2
make[2]: Leaving directory '/home/tsobczynski/Compiler/build'
make[1]: *** [Makefile:983: all] Error 2
make[1]: Leaving directory '/home/tsobczynski/Compiler/build'
make: *** [Makefile:53: /home/tsobczynski/Compiler/build/foo] Error 2



Granting that I am proceeding from a position of ignorance, I am not expecting an attempted invocation of "arm-none-eabi-gcc". My reasoning is that the build process is taking place on GNU/Linux, while "arm-none-eabi-gcc" is the name I expect for one of the compiler executables that will run on Windows. Just prior to the error, the GCC build copies xgcc.exe to gcc-cross.exe, which I presume is the compiler executable that will ultimately correspond to "arm-none-eabi-gcc.exe".

Because I don't know what I don't know here, I don't have a crisp question, except perhaps: where am I going astray in my thinking and/or build steps for the goal I'm trying to attain? Did I already go off the right track when I modified the config file earlier in the process?

Thanks,
Tom



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-10 16:47 Compiling GCC 11 for Windows targeting ARM on Linux Thomas Sobczynski
@ 2022-01-10 17:16 ` Xi Ruoyao
  2022-01-11  2:49   ` [EXTERNAL] " Thomas Sobczynski
  2022-01-10 17:24 ` Jonathan Wakely
  1 sibling, 1 reply; 12+ messages in thread
From: Xi Ruoyao @ 2022-01-10 17:16 UTC (permalink / raw)
  To: Thomas Sobczynski, gcc-help

On Mon, 2022-01-10 at 16:47 +0000, Thomas Sobczynski via Gcc-help wrote:
> I would appreciate insight on a compilation error while building GCC
> 11 to run on Windows, targeting bare metal ARM, from a GNU/Linux build
> environment (specifically Ubuntu via WSL2).
> 
> I have a current (within a few days) clone of the Git repo at the HEAD
> of releases/gcc-11.
> 
> 
> *** Source tree:
> $ git status
> On branch releases/gcc-11
> Your branch is up to date with 'origin/releases/gcc-11'.
> 
> 
> *** Build environment:
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
> OFFLOAD_TARGET_NAMES=nvptx-none:hsa
> OFFLOAD_TARGET_DEFAULT=1
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-
> 17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-
> 9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-
> c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-
> 9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-
> build-id --libexecdir=/usr/lib --without-included-gettext --enable-
> threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --
> enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-
> libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify -
> -enable-plugin --enable-default-pie --with-system-zlib --with-target-
> system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-
> werror --with-arch-32=i686 --with-abi=m64 --with-multilib-
> list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-
> offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-
> nvptx/usr,hsa --without-cuda-driver --enable-checking=release --
> build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-
> gnu
> Thread model: posix
> gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
> 
> 
> For better or worse, I'm using GNU Make to drive the build process
> from the next level up from the GCC source tree, i.e. my Make is
> calling $(MAKE) to invoke the GCC build. Extracting the recipe steps,
> here is how I'm attempting to build GCC:
> 
> Recipe steps:
> 
> # Obtain GCC source for the release branch of interest.
> #
> # "If you do not intend to make changes to the source, you can avoid
> installing these build tools by running contrib/gcc_update."
> # https://gcc.gnu.org/git.html
> 
> git clone --branch releases/gcc-11 --depth 1
> git://gcc.gnu.org/git/gcc.git $(COMPILER_ROOT)/gcc
> cd $(COMPILER_ROOT)/gcc && contrib/gcc_update
> 
> # "If you also intend to build binutils (either to upgrade an existing
> installation or for use in place of the corresponding tools of your
> OS), unpack the binutils distribution ... in the same directory..."
> # https://gcc.gnu.org/install/download.html
> # https://www.gnu.org/software/binutils/
> 
> git clone --branch binutils-2_37 --depth 1
> git://sourceware.org/git/binutils-gdb.git
> $(COMPILER_ROOT)/gcc/binutils
> 
> # "Likewise the GMP, MPFR and MPC libraries can be automatically built
> together with GCC. You may simply run the
> contrib/download_prerequisites script in the GCC source directory to
> set up everything."
> 
> cd $(COMPILER_ROOT)/gcc && contrib/download_prerequisites
> 
> # Configuration
> # https://gcc.gnu.org/install/configure.html
> #
> # "The build machine is the system which you are using, the host
> machine is the system where you want to run the resulting compiler
> (normally the build machine), and the target machine is the system for
> which you want the compiler to generate code."
> # We're going to use WSL + Ubuntu + GCC to build a toolchain to run on
> Windows targeting ARM.
> 
> cd $(COMPILER_ROOT)/build && $(COMPILER_ROOT)/gcc/configure --
> host=x86_64-w64-mingw32 --target=arm-none-eabi --
> prefix=${TOOLCHAIN_ROOT} --enable-vtable-verify --with-multilib-
> list=aprofile,rmprofile --enable-target-optspace --enable-
> languages=c,c++,lto --enable-large-address-aware
> 
> # Build the cross-compiler
> # https://gcc.gnu.org/install/build.html
> 
> $(MAKE) -C $(COMPILER_ROOT)/build
> 
> 
> 
> I have made one change to a config script to get as far as I have:
> 
> 
> $ git diff -- config/mh-mingw
> diff --git a/config/mh-mingw b/config/mh-mingw
> index e91367a71..a25d9dfd0 100644
> --- a/config/mh-mingw
> +++ b/config/mh-mingw
> @@ -11,5 +11,5 @@ STAGE4_CXXFLAGS += -D__USE_MINGW_ACCESS
> 
>  # Increase stack limit to a figure based on the Linux default, with
> 4MB added
>  # as GCC turns out to need that much more to pass all the limits-*
> tests.
> -LDFLAGS += -Wl,--stack,12582912
> -BOOT_LDFLAGS += -Wl,--stack,12582912
> +#LDFLAGS += -Wl,--stack,12582912
> +#BOOT_LDFLAGS += -Wl,--stack,12582912
> 
> 
> I commented out those flags because they are not recognized by GCC 9
> on Linux as the toolchain building the compiler. I think these flags
> are only needed for a compiler that is actually running on Windows,
> which I am NOT doing; I am building a compiler FOR Windows.

The option is needed for a GCC build which *will run* on Windows.

On Windows the stack size is hardcoded in the PE executable, so it's
needed to use -Wl,--stack to set a larger stack size.  On UNIX-like it's
determined run-time (with RLIMIT_STACK).

'-Wl,--stack,12582912' just passes '--stack 12582912' to the linker, and
the GNU linker targeting PE platforms supports it.  If your "x86_64-w64-
mingw32-gcc" does not recognize '-Wl,--stack,12582912', it's broken.

You may remove '-Wl,--stack,12582912' and get a compiler which seems to
work (i. e. it can compile a "Hello world" program), but it will then
crash building a complex source code file.

/* snip */

> Granting that I am proceeding from a position of ignorance, I am not
> expecting an attempted invocation of "arm-none-eabi-gcc". My reasoning
> is that the build process is taking place on GNU/Linux, while "arm-
> none-eabi-gcc" is the name I expect for one of the compiler
> executables that will run on Windows.

You need to install arm-none-eabi-gcc on Linux, because otherwise you
won't be able to build libgcc for arm-none-eabi (note that "arm-none-
eabi-gcc.exe", which is just compiled, can't run on Linux).  You may use
"make all-gcc" and "make install-gcc" to skip libgcc, but a GCC build
without libgcc is almost completely useless (such a build is only useful
if you'll build libgcc manually later, or you are debugging GCC itself).

-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-10 16:47 Compiling GCC 11 for Windows targeting ARM on Linux Thomas Sobczynski
  2022-01-10 17:16 ` Xi Ruoyao
@ 2022-01-10 17:24 ` Jonathan Wakely
  2022-01-11  0:27   ` [EXTERNAL] " Thomas Sobczynski
  1 sibling, 1 reply; 12+ messages in thread
From: Jonathan Wakely @ 2022-01-10 17:24 UTC (permalink / raw)
  To: Thomas Sobczynski; +Cc: gcc-help

On Mon, 10 Jan 2022 at 16:49, Thomas Sobczynski via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> I would appreciate insight on a compilation error while building GCC 11 to run on Windows, targeting bare metal ARM, from a GNU/Linux build environment (specifically Ubuntu via WSL2).
>
> I have a current (within a few days) clone of the Git repo at the HEAD of releases/gcc-11.
>
>
> *** Source tree:
> $ git status
> On branch releases/gcc-11
> Your branch is up to date with 'origin/releases/gcc-11'.
>
>
> *** Build environment:
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
> OFFLOAD_TARGET_NAMES=nvptx-none:hsa
> OFFLOAD_TARGET_DEFAULT=1
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> Thread model: posix
> gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
>
>
> For better or worse, I'm using GNU Make to drive the build process from the next level up from the GCC source tree, i.e. my Make is calling $(MAKE) to invoke the GCC build. Extracting the recipe steps, here is how I'm attempting to build GCC:
>
> Recipe steps:
>
> # Obtain GCC source for the release branch of interest.
> #
> # "If you do not intend to make changes to the source, you can avoid installing these build tools by running contrib/gcc_update."
> # https://gcc.gnu.org/git.html
>
> git clone --branch releases/gcc-11 --depth 1 git://gcc.gnu.org/git/gcc.git $(COMPILER_ROOT)/gcc
> cd $(COMPILER_ROOT)/gcc && contrib/gcc_update
>
> # "If you also intend to build binutils (either to upgrade an existing installation or for use in place of the corresponding tools of your OS), unpack the binutils distribution ... in the same directory..."
> # https://gcc.gnu.org/install/download.html
> # https://www.gnu.org/software/binutils/
>
> git clone --branch binutils-2_37 --depth 1 git://sourceware.org/git/binutils-gdb.git $(COMPILER_ROOT)/gcc/binutils
>
> # "Likewise the GMP, MPFR and MPC libraries can be automatically built together with GCC. You may simply run the contrib/download_prerequisites script in the GCC source directory to set up everything."
>
> cd $(COMPILER_ROOT)/gcc && contrib/download_prerequisites
>
> # Configuration
> # https://gcc.gnu.org/install/configure.html
> #
> # "The build machine is the system which you are using, the host machine is the system where you want to run the resulting compiler (normally the build machine), and the target machine is the system for which you want the compiler to generate code."
> # We're going to use WSL + Ubuntu + GCC to build a toolchain to run on Windows targeting ARM.
>
> cd $(COMPILER_ROOT)/build && $(COMPILER_ROOT)/gcc/configure --host=x86_64-w64-mingw32 --target=arm-none-eabi --prefix=${TOOLCHAIN_ROOT} --enable-vtable-verify --with-multilib-list=aprofile,rmprofile --enable-target-optspace --enable-languages=c,c++,lto --enable-large-address-aware
>
[snip]
> /bin/bash: arm-none-eabi-gcc: command not found
> make[3]: *** [Makefile:2165: specs] Error 127
> make[3]: Leaving directory '/home/tsobczynski/Compiler/build/gcc'
> make[2]: *** [Makefile:4458: all-gcc] Error 2
> make[2]: Leaving directory '/home/tsobczynski/Compiler/build'
> make[1]: *** [Makefile:983: all] Error 2
> make[1]: Leaving directory '/home/tsobczynski/Compiler/build'
> make: *** [Makefile:53: /home/tsobczynski/Compiler/build/foo] Error 2
>
>
>
> Granting that I am proceeding from a position of ignorance, I am not expecting an attempted invocation of "arm-none-eabi-gcc". My reasoning is that the build process is taking place on GNU/Linux, while "arm-none-eabi-gcc" is the name I expect for one of the compiler executables that will run on Windows. Just prior to the error, the GCC build copies xgcc.exe to gcc-cross.exe, which I presume is the compiler executable that will ultimately correspond to "arm-none-eabi-gcc.exe".

But that .exe can only run on the --host system, i.e. on Windows. To
build the target libs for the --target system (i.e. arm) you need an
arm compiler that runs on the --build host (i.e. x86_64 Linux).

So to build this combination you need to already have an arm cross
compiler to run on your build system.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-10 17:24 ` Jonathan Wakely
@ 2022-01-11  0:27   ` Thomas Sobczynski
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Sobczynski @ 2022-01-11  0:27 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

> Granting that I am proceeding from a position of ignorance, I am not expecting an attempted invocation of "arm-none-eabi-gcc". My reasoning is that the build process is taking place on GNU/Linux, while "arm-none-eabi-gcc" is the name I expect for one of the compiler executables that will run on Windows. Just prior to the error, the GCC build copies xgcc.exe to gcc-cross.exe, which I presume is the compiler executable that will ultimately correspond to "arm-none-eabi-gcc.exe".

But that .exe can only run on the --host system, i.e. on Windows. To
build the target libs for the --target system (i.e. arm) you need an
arm compiler that runs on the --build host (i.e. x86_64 Linux).

So to build this combination you need to already have an arm cross
compiler to run on your build system.
Thanks for sharing this clarification, Jonathan. Although I referred to the documentation, I did not grasp the prerequisite of a native cross-compiler. The documentation takes pains to spell out the distinction among host, build, and target machines, and that they can be different from each other. Somehow, the need to start with both a native and a cross toolchain for the build machine eluded me.

Regards,
Tom



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-10 17:16 ` Xi Ruoyao
@ 2022-01-11  2:49   ` Thomas Sobczynski
  2022-01-11  3:44     ` Thomas Sobczynski
  2022-01-11 11:09     ` Jonathan Wakely
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas Sobczynski @ 2022-01-11  2:49 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-help

You need to install arm-none-eabi-gcc on Linux, because otherwise you
won't be able to build libgcc for arm-none-eabi (note that "arm-none-
eabi-gcc.exe", which is just compiled, can't run on Linux).  You may use
"make all-gcc" and "make install-gcc" to skip libgcc, but a GCC build
without libgcc is almost completely useless (such a build is only useful
if you'll build libgcc manually later, or you are debugging GCC itself).

--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University


Thank you, Xi, for pointing out the need for the native cross toolchain as well as clarifying the linker flags. I installed the native Linux toolchain for bare-metal ARM, removed my config file edits, and tried again to build for a Windows host targeting ARM.

I am seeing a new error, but it seems to occur further in the build process, so I feel like I'm a step closer. More context around the error is pasted below.

checking whether the arm-none-eabi-gcc     linker (/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [Makefile:13331: configure-target-libstdc++-v3] Error 1

I tried explicitly adding "--disable-shared" to the "configure" script parameters, so I'm confused about why I'm seeing "... supports shared libraries... yes".

Looking at the configure script inside gcc/libstdc++-v3, it seems to test whether "gcc_no_link" is set to "yes" to trigger the error. I looked at how that variable is set, and found this:



cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
int
main ()
{
printf ("hello world\n");
  ;
  return 0;
}
_ACEOF
# FIXME: Cleanup?
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
  (eval $ac_link) 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then :
  gcc_no_link=no
else
  gcc_no_link=yes
fi
if test x$gcc_no_link = xyes; then
  # Setting cross_compile will disable run tests; it will
  # also disable AC_CHECK_FILE but that's generally
  # correct if we can't link.
  cross_compiling=yes
  EXEEXT=
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}
_ACEOF



To my untrained eye, it looks like this is trying to link a simple "hello world" executable (ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5') and if that fails, it sets this "gcc_no_link" flag to turn off further attempts to link executables?

I'm really not sure what the bigger picture is here on this build error, but I am guessing that bare metal ARM doesn't support shared libraries and somehow I have convinced the GCC build to try working with shared libraries anyway?



Here is the tail of the build output:

make[2]: Leaving directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libgcc'
Checking multilib configuration for libstdc++-v3...
Configuring in arm-none-eabi/libstdc++-v3
configure: loading cache ./config.cache
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-none-eabi
checking target system type... arm-none-eabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-none-eabi-strip... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-none-eabi-gcc... arm-none-eabi-gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-none-eabi-gcc     accepts -g... yes
checking for arm-none-eabi-gcc     option to accept ISO C89... none needed
checking whether arm-none-eabi-gcc     understands -c and -o together... yes
checking whether we are using the GNU C++ compiler... yes
checking whether  arm-none-eabi-c++     accepts -g... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking how to run the C preprocessor... arm-none-eabi-gcc     -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether ln -s works... yes
checking for arm-none-eabi-as... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/as
checking for arm-none-eabi-ar... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ar
checking for arm-none-eabi-ranlib... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ranlib
checking whether to enable maintainer-specific portions of Makefiles... no
configure: CPU config directory is cpu/arm
configure: OS config directory is os/generic
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by arm-none-eabi-gcc    ... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld
checking if the linker (/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/nm
checking the name lister (/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/nm) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld option to reload object files... -r
checking for arm-none-eabi-objdump... /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/objdump
checking how to recognize dependent libraries... unknown
checking for arm-none-eabi-ar... (cached) /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ar
checking for arm-none-eabi-strip... (cached) /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/strip
checking for arm-none-eabi-ranlib... (cached) /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ranlib
checking command to parse /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/nm output from arm-none-eabi-gcc     object... failed
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if arm-none-eabi-gcc     supports -fno-rtti -fno-exceptions... no
checking for arm-none-eabi-gcc     option to produce PIC... -fPIC -DPIC
checking if arm-none-eabi-gcc     PIC flag -fPIC -DPIC works... yes
checking if arm-none-eabi-gcc     static flag -static works... no
checking if arm-none-eabi-gcc     supports -c -o file.o... yes
checking if arm-none-eabi-gcc     supports -c -o file.o... (cached) yes
checking whether the arm-none-eabi-gcc     linker (/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [Makefile:13331: configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory '/home/tsobczynski/Compiler/build'


Thanks,
Tom


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-11  2:49   ` [EXTERNAL] " Thomas Sobczynski
@ 2022-01-11  3:44     ` Thomas Sobczynski
  2022-01-11  6:53       ` Xi Ruoyao
  2022-01-11 11:14       ` Jonathan Wakely
  2022-01-11 11:09     ` Jonathan Wakely
  1 sibling, 2 replies; 12+ messages in thread
From: Thomas Sobczynski @ 2022-01-11  3:44 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-help, Thomas Sobczynski

Update: I kept peering at the configure scripts and their embedded comments, and concluded that it's at least worth trying to add "--with-newlib" to the configure script parameters. That may not be the right move, but it did get me further into the build process. However, although its configure script finished, the GCC build seems unable to compile libstdc++ (tail end of output below).

Am I barking up the wrong tree with "--with-newlib"?

Does it make sense that the build is supplying include search directories from the GCC v11 build tree (compiler being compiled) to the native cross compiler which is GCC v9.x? I already misunderstood the build/host/target config earlier. Is it perhaps not _a_ GCC cross toolchain that I need, but perhaps I need to build _the_ compiler (v11) and then turn around and use it to build for the non-native Host?

Thanks,
Tom

make[2]: Leaving directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libgcc'
Checking multilib configuration for libstdc++-v3...
make[2]: Entering directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3'
make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=arm-none-eabi-gcc" "CFLAGS=-g -O2 -g -Os" "CXXFLAGS=-g -O2 -g -Os" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-g -O2 -g -Os" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2 -g -Os" "LIBCFLAGS_FOR_TARGET=-g -O2 -g -Os" "MAKE=make" "MAKEINFO=/home/tsobczynski/Compiler/gcc/missing makeinfo --split-size=5000000 --split-size=5000000 " "SHELL=/bin/bash" "RUNTESTFLAGS=" "exec_prefix=/home/tsobczynski/arm-none-eabi-gcc" "infodir=/home/tsobczynski/arm-none-eabi-gcc/share/info" "libdir=/home/tsobczynski/arm-none-eabi-gcc/lib" "includedir=/home/tsobczynski/arm-none-eabi-gcc/include" "prefix=/home/tsobczynski/arm-none-eabi-gcc" "tooldir=/home/tsobczynski/arm-none-eabi-gcc/arm-none-eabi" "gxx_include_dir=/home/tsobczynski/arm-none-eabi-gcc/arm-none-eabi/include/c++/11.2.1" "AR=/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ar" "AS=/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/as" "LD=/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld" "RANLIB=/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ranlib" "NM=/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/nm" "DESTDIR=" "WERROR=" all-recursive
make[3]: Entering directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3'
Making all in include
make[4]: Entering directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include'
mkdir -p ./arm-none-eabi/bits/stdc++.h.gch
arm-none-eabi-c++     -x c++-header -nostdinc++ -g -O2 -g -Os -fvtable-verify=std -I/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi -I/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include -I/home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++ -I/home/tsobczynski/arm-none-eabi-gcc/include  -O2 -g -std=gnu++0x /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h \
-o arm-none-eabi/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/cassert:43,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:33:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/c++config.h:491:18: error: missing binary operator before token "("
  491 | #if __has_builtin(__builtin_is_constant_evaluated)
      |                  ^
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/cassert:43,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:33:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/c++config.h:732:25: error: missing binary operator before token "("
  732 | #if _GLIBCXX_HAS_BUILTIN(__has_unique_object_representations)
      |                         ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/c++config.h:736:25: error: missing binary operator before token "("
  736 | #if _GLIBCXX_HAS_BUILTIN(__is_aggregate)
      |                         ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/c++config.h:740:25: error: missing binary operator before token "("
  740 | #if _GLIBCXX_HAS_BUILTIN(__builtin_is_constant_evaluated)
      |                         ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/c++config.h:744:25: error: missing binary operator before token "("
  744 | #if _GLIBCXX_HAS_BUILTIN(__is_same)
      |                         ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/c++config.h:748:25: error: missing binary operator before token "("
  748 | #if _GLIBCXX_HAS_BUILTIN(__builtin_launder)
      |                         ^
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:57,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1017:25: error: there are no arguments to '__is_nothrow_constructible' that depend on a template parameter, so a declaration of '__is_nothrow_constructible' must be available [-fpermissive]
 1017 |       = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1017:25: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1017:66: error: template argument 1 is invalid
 1017 |       = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
      |                                                                  ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1023:45: error: expected template-name before '<' token
 1023 |     : public __is_nothrow_constructible_impl<_Tp, _Args...>::type
      |                                             ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1023:45: error: expected '{' before '<' token
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1032:30: error: there are no arguments to '__is_nothrow_constructible' that depend on a template parameter, so a declaration of '__is_nothrow_constructible' must be available [-fpermissive]
 1032 |     : public __bool_constant<__is_nothrow_constructible(_Tp)>
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1032:61: error: template argument 1 is invalid
 1032 |     : public __bool_constant<__is_nothrow_constructible(_Tp)>
      |                                                             ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1048:45: error: expected template-name before '<' token
 1048 |     : public __is_nothrow_constructible_impl<_Tp, const _Tp&>
      |                                             ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1048:45: error: expected '{' before '<' token
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1071:45: error: expected template-name before '<' token
 1071 |     : public __is_nothrow_constructible_impl<_Tp, _Tp&&>
      |                                             ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1071:45: error: expected '{' before '<' token
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1137:25: error: there are no arguments to '__is_nothrow_assignable' that depend on a template parameter, so a declaration of '__is_nothrow_assignable' must be available [-fpermissive]
 1137 |       = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1137:58: error: template argument 1 is invalid
 1137 |       = __bool_constant<__is_nothrow_assignable(_Tp, _Up)>;
      |                                                          ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1142:42: error: expected template-name before '<' token
 1142 |     : public __is_nothrow_assignable_impl<_Tp, _Up>
      |                                          ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1142:42: error: expected '{' before '<' token
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1157:42: error: expected template-name before '<' token
 1157 |     : public __is_nothrow_assignable_impl<_Tp&, const _Tp&>
      |                                          ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1157:42: error: expected '{' before '<' token
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1178:42: error: expected template-name before '<' token
 1178 |     : public __is_nothrow_assignable_impl<_Tp&, _Tp&&>
      |                                          ^
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1178:42: error: expected '{' before '<' token
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::is_nothrow_move_constructible<__sFILE*>':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:152:12:   required from 'struct std::__and_<std::is_nothrow_move_constructible<__sFILE*>, std::is_nothrow_move_assignable<__sFILE*> >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5:   required from 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = __sFILE*; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/basic_file.h:79:34:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1077:12: error: invalid use of incomplete type 'struct std::__is_nothrow_move_constructible_impl<__sFILE*, true>'
 1077 |     struct is_nothrow_move_constructible
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1063:12: note: declaration of 'struct std::__is_nothrow_move_constructible_impl<__sFILE*, true>'
 1063 |     struct __is_nothrow_move_constructible_impl;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::__and_<std::is_nothrow_move_constructible<__sFILE*>, std::is_nothrow_move_assignable<__sFILE*> >':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5:   required from 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = __sFILE*; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/basic_file.h:79:34:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:152:12: error: 'value' is not a member of 'std::is_nothrow_move_constructible<__sFILE*>'
  152 |     struct __and_<_B1, _B2>
      |            ^~~~~~~~~~~~~~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h: In instantiation of 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = __sFILE*; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/basic_file.h:79:34:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5: error: 'value' is not a member of 'std::__and_<std::is_nothrow_move_constructible<__sFILE*>, std::is_nothrow_move_assignable<__sFILE*> >'
  196 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:57,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::is_nothrow_move_constructible<bool>':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:152:12:   required from 'struct std::__and_<std::is_nothrow_move_constructible<bool>, std::is_nothrow_move_assignable<bool> >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5:   required from 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = bool; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/basic_file.h:80:50:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1077:12: error: invalid use of incomplete type 'struct std::__is_nothrow_move_constructible_impl<bool, true>'
 1077 |     struct is_nothrow_move_constructible
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1063:12: note: declaration of 'struct std::__is_nothrow_move_constructible_impl<bool, true>'
 1063 |     struct __is_nothrow_move_constructible_impl;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::__and_<std::is_nothrow_move_constructible<bool>, std::is_nothrow_move_assignable<bool> >':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5:   required from 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = bool; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/basic_file.h:80:50:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:152:12: error: 'value' is not a member of 'std::is_nothrow_move_constructible<bool>'
  152 |     struct __and_<_B1, _B2>
      |            ^~~~~~~~~~~~~~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h: In instantiation of 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = bool; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/arm-none-eabi/bits/basic_file.h:80:50:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5: error: 'value' is not a member of 'std::__and_<std::is_nothrow_move_constructible<bool>, std::is_nothrow_move_assignable<bool> >'
  196 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:57,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::is_nothrow_move_constructible<std::thread::id>':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:152:12:   required from 'struct std::__and_<std::is_nothrow_move_constructible<std::thread::id>, std::is_nothrow_move_assignable<std::thread::id> >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5:   required from 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = std::thread::id; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/std_thread.h:172:33:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1077:12: error: invalid use of incomplete type 'struct std::__is_nothrow_move_constructible_impl<std::thread::id, true>'
 1077 |     struct is_nothrow_move_constructible
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1063:12: note: declaration of 'struct std::__is_nothrow_move_constructible_impl<std::thread::id, true>'
 1063 |     struct __is_nothrow_move_constructible_impl;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::__and_<std::is_nothrow_move_constructible<std::thread::id>, std::is_nothrow_move_assignable<std::thread::id> >':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5:   required from 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = std::thread::id; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/std_thread.h:172:33:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:152:12: error: 'value' is not a member of 'std::is_nothrow_move_constructible<std::thread::id>'
  152 |     struct __and_<_B1, _B2>
      |            ^~~~~~~~~~~~~~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h: In instantiation of 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) [with _Tp = std::thread::id; std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > = void]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/std_thread.h:172:33:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:196:5: error: 'value' is not a member of 'std::__and_<std::is_nothrow_move_constructible<std::thread::id>, std::is_nothrow_move_assignable<std::thread::id> >'
  196 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/vector:67,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/queue:61,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:86:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/random.h:6073:12:   recursively required from 'std::vector<_Tp, _Alloc>::vector() [with _Tp = long unsigned int; _Alloc = std::allocator<long unsigned int>]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/random.h:6073:12:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_vector.h:131:2: error: 'value' is not a member of 'std::is_nothrow_default_constructible<std::allocator<long unsigned int> >'
  131 |  _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
      |  ^~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/regex_automaton.h:192:25:   recursively required from 'std::vector<_Tp, _Alloc>::vector() [with _Tp = unsigned int; _Alloc = std::allocator<unsigned int>]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/regex_automaton.h:192:25:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_vector.h:131:2: error: 'value' is not a member of 'std::is_nothrow_default_constructible<std::allocator<unsigned int> >'
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:57,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::is_nothrow_move_constructible<std::_Rb_tree_key_compare<std::less<long int> > >':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:685:4:   required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >::_Rb_tree_impl(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >&&) [with _Key_compare = std::less<long int>; bool <anonymous> = true; _Key = long int; _Val = std::pair<const long int, long int>; _KeyOfValue = std::_Select1st<std::pair<const long int, long int> >; _Compare = std::less<long int>; _Alloc = std::allocator<std::pair<const long int, long int> >]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:660:9:   required from 'struct std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >::_Rb_tree_impl<std::less<long int>, true>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:706:31:   required from 'class std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_map.h:153:17:   required from 'class std::map<long int, long int>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/regex_automaton.tcc:207:11:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1077:12: error: invalid use of incomplete type 'struct std::__is_nothrow_move_constructible_impl<std::_Rb_tree_key_compare<std::less<long int> >, true>'
 1077 |     struct is_nothrow_move_constructible
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1063:12: note: declaration of 'struct std::__is_nothrow_move_constructible_impl<std::_Rb_tree_key_compare<std::less<long int> >, true>'
 1063 |     struct __is_nothrow_move_constructible_impl;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/map:60,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:81:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h: In instantiation of 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >::_Rb_tree_impl(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >&&) [with _Key_compare = std::less<long int>; bool <anonymous> = true; _Key = long int; _Val = std::pair<const long int, long int>; _KeyOfValue = std::_Select1st<std::pair<const long int, long int> >; _Compare = std::less<long int>; _Alloc = std::allocator<std::pair<const long int, long int> >]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:660:9:   required from 'struct std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >::_Rb_tree_impl<std::less<long int>, true>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:706:31:   required from 'class std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_map.h:153:17:   required from 'class std::map<long int, long int>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/regex_automaton.tcc:207:11:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:685:4: error: 'value' is not a member of 'std::is_nothrow_move_constructible<std::_Rb_tree_key_compare<std::less<long int> > >'
  685 |    _Rb_tree_impl(_Rb_tree_impl&&)
      |    ^~~~~~~~~~~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/move.h:57,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/nested_exception.h:40,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/libsupc++/exception:154,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ios:39,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/istream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/sstream:38,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/complex:45,
                 from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/ccomplex:39,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:54:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits: In instantiation of 'struct std::is_nothrow_copy_constructible<std::less<long int> >':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:660:9:   recursively required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >::_Rb_tree_impl(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >&&) [with _Key_compare = std::less<long int>; bool <anonymous> = true; _Key = long int; _Val = std::pair<const long int, long int>; _KeyOfValue = std::_Select1st<std::pair<const long int, long int> >; _Compare = std::less<long int>; _Alloc = std::allocator<std::pair<const long int, long int> >]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:660:9:   required from 'struct std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >::_Rb_tree_impl<std::less<long int>, true>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:706:31:   required from 'class std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_map.h:153:17:   required from 'class std::map<long int, long int>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/regex_automaton.tcc:207:11:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1054:12: error: invalid use of incomplete type 'struct std::__is_nothrow_copy_constructible_impl<std::less<long int>, true>'
 1054 |     struct is_nothrow_copy_constructible
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/type_traits:1040:12: note: declaration of 'struct std::__is_nothrow_copy_constructible_impl<std::less<long int>, true>'
 1040 |     struct __is_nothrow_copy_constructible_impl;
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/map:60,
                 from /home/tsobczynski/Compiler/gcc/libstdc++-v3/include/precompiled/stdc++.h:81:
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h: In instantiation of 'std::_Rb_tree_key_compare<_Key_compare>::_Rb_tree_key_compare(std::_Rb_tree_key_compare<_Key_compare>&&) [with _Key_compare = std::less<long int>]':
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:660:9:   recursively required from 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >::_Rb_tree_impl(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree_impl<_Key_compare, <anonymous> >&&) [with _Key_compare = std::less<long int>; bool <anonymous> = true; _Key = long int; _Val = std::pair<const long int, long int>; _KeyOfValue = std::_Select1st<std::pair<const long int, long int> >; _Compare = std::less<long int>; _Alloc = std::allocator<std::pair<const long int, long int> >]'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:660:9:   required from 'struct std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >::_Rb_tree_impl<std::less<long int>, true>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:706:31:   required from 'class std::_Rb_tree<long int, std::pair<const long int, long int>, std::_Select1st<std::pair<const long int, long int> >, std::less<long int>, std::allocator<std::pair<const long int, long int> > >'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_map.h:153:17:   required from 'class std::map<long int, long int>'
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/regex_automaton.tcc:207:11:   required from here
/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include/bits/stl_tree.h:160:7: error: 'value' is not a member of 'std::is_nothrow_copy_constructible<std::less<long int> >'
  160 |       _Rb_tree_key_compare(_Rb_tree_key_compare&& __x)
      |       ^~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:1862: arm-none-eabi/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1
make[4]: Leaving directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3/include'
make[3]: *** [Makefile:568: all-recursive] Error 1
make[3]: Leaving directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3'
make[2]: *** [Makefile:493: all] Error 2
make[2]: Leaving directory '/home/tsobczynski/Compiler/build/arm-none-eabi/libstdc++-v3'
make[1]: *** [Makefile:13403: all-target-libstdc++-v3] Error 2


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-11  3:44     ` Thomas Sobczynski
@ 2022-01-11  6:53       ` Xi Ruoyao
  2022-01-11 11:19         ` Jonathan Wakely
  2022-01-11 11:14       ` Jonathan Wakely
  1 sibling, 1 reply; 12+ messages in thread
From: Xi Ruoyao @ 2022-01-11  6:53 UTC (permalink / raw)
  To: Thomas Sobczynski, gcc-help

On Tue, 2022-01-11 at 03:44 +0000, Thomas Sobczynski wrote:
> Update: I kept peering at the configure scripts and their embedded
> comments, and concluded that it's at least worth trying to add "--
> with-newlib" to the configure script parameters. That may not be the
> right move, but it did get me further into the build process. However,
> although its configure script finished, the GCC build seems unable to
> compile libstdc++ (tail end of output below). 
> 
> Am I barking up the wrong tree with "--with-newlib"? 

I think --with-newlib is needed, as it's the de-facto C library on bare
metal ARM.  But you need to install newlib for the target before
building libstdc++, because libstdc++ needs a C library.

And your configuration may trigger
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017, which is fixed in
GCC 11 branch recently.  You may need to "git pull" your GCC 11 branch
to overcome it.

Maybe you can add --disable-libstdcxx and build a GCC without libstdc++,
reboot into Windows, and then compile newlib & libstdc++ for target with
the toolchain just built.

However, honestly I don't do any serious development on Windows...

> Does it make sense that the build is supplying include search
> directories from the GCC v11 build tree (compiler being compiled) to
> the native cross compiler which is GCC v9.x? I already misunderstood
> the build/host/target config earlier. Is it perhaps not_a_ GCC cross
> toolchain that I need, but perhaps I need to build _the_ compiler
> (v11) and then turn around and use it to build for the non-native
> Host?

"__has_builtin" is introduced in GCC 10, so GCC 9 can't recognize it. 
IIRC libstdc++ from a specific GCC version is only expected to be built
with GCC with the same version.

Jonathan?

-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-11  2:49   ` [EXTERNAL] " Thomas Sobczynski
  2022-01-11  3:44     ` Thomas Sobczynski
@ 2022-01-11 11:09     ` Jonathan Wakely
  1 sibling, 0 replies; 12+ messages in thread
From: Jonathan Wakely @ 2022-01-11 11:09 UTC (permalink / raw)
  To: Thomas Sobczynski; +Cc: Xi Ruoyao, gcc-help

On Tue, 11 Jan 2022 at 02:50, Thomas Sobczynski via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> You need to install arm-none-eabi-gcc on Linux, because otherwise you
> won't be able to build libgcc for arm-none-eabi (note that "arm-none-
> eabi-gcc.exe", which is just compiled, can't run on Linux).  You may use
> "make all-gcc" and "make install-gcc" to skip libgcc, but a GCC build
> without libgcc is almost completely useless (such a build is only useful
> if you'll build libgcc manually later, or you are debugging GCC itself).
>
> --
> Xi Ruoyao <xry111@mengyan1223.wang>
> School of Aerospace Science and Technology, Xidian University
>
>
> Thank you, Xi, for pointing out the need for the native cross toolchain as well as clarifying the linker flags. I installed the native Linux toolchain for bare-metal ARM, removed my config file edits, and tried again to build for a Windows host targeting ARM.
>
> I am seeing a new error, but it seems to occur further in the build process, so I feel like I'm a step closer. More context around the error is pasted below.
>
> checking whether the arm-none-eabi-gcc     linker (/usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld) supports shared libraries... yes
> checking dynamic linker characteristics... no
> checking how to hardcode library paths into programs... immediate
> checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
> make[1]: *** [Makefile:13331: configure-target-libstdc++-v3] Error 1
>
> I tried explicitly adding "--disable-shared" to the "configure" script parameters, so I'm confused about why I'm seeing "... supports shared libraries... yes".

Because the checks for dlopen are done whether or not you are building
.so files.

Adding --with-newlib will fix that error.

That's no longer necessary on the Git master branch, because I fixed
it yesterday, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103866

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-11  3:44     ` Thomas Sobczynski
  2022-01-11  6:53       ` Xi Ruoyao
@ 2022-01-11 11:14       ` Jonathan Wakely
  2022-01-12 18:39         ` Thomas Sobczynski
  1 sibling, 1 reply; 12+ messages in thread
From: Jonathan Wakely @ 2022-01-11 11:14 UTC (permalink / raw)
  To: Thomas Sobczynski; +Cc: Xi Ruoyao, gcc-help

On Tue, 11 Jan 2022 at 03:45, Thomas Sobczynski via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Update: I kept peering at the configure scripts and their embedded comments, and concluded that it's at least worth trying to add "--with-newlib" to the configure script parameters. That may not be the right move, but it did get me further into the build process. However, although its configure script finished, the GCC build seems unable to compile libstdc++ (tail end of output below).
>
> Am I barking up the wrong tree with "--with-newlib"?
>
> Does it make sense that the build is supplying include search directories from the GCC v11 build tree (compiler being compiled) to the native cross compiler which is GCC v9.x?

Yes. You are compiling the libstdc++ from GCC 11, so it has to look at
the headers for the GCC 11 version of libstdc++.

You can't use GCC 9 to compile libstdc++ from GCC 11, because GCC 9
doesn't support all the C++ features used in the GCC 11 lirbary (this
is nothing to do with cross compilation, you can never use a
mismatching version of GCC, newer or older, to compile libstdc++, it
just doesn't usually happen unless cross compiling like this).

You need a newer arm cross compiler (ideally it should exactly match
the version of GCC you are trying to build).



> I already misunderstood the build/host/target config earlier. Is it perhaps not _a_ GCC cross toolchain that I need, but perhaps I need to build _the_ compiler (v11) and then turn around and use it to build for the non-native Host?

No.


This might help, it's a script I used last week to build a build!=host
compiler. You'll need to adjust the flags for your own case:

#!/bin/bash

gcc_common_args='--enable-languages=c++ --disable-nls --without-isl
--disable-libcc1 --disable-libgomp --disable-libsanitizer
--disable-libitm --without-lto --disable-multilib'

# Native GCC compiler
mkdir -p ~/build-canada/gcc-native
cd ~/build-canada/gcc-native
$skip1 ~/src/gcc/configure --prefix=$HOME/gcc/12 $gcc_common_args
--disable-bootstrap
make -j10 && make install

# Use the new native GCC
PATH=$HOME/gcc/12/bin:$PATH

# Cross binutils
mkdir -p ~/build-canada/binutils
cd ~/build-canada/binutils
$skip2 ~/src/binutils-gdb/configure --prefix=$HOME/gcc/aarch64
--disable-gdb --disable-sim --disable-werror \
--target=aarch64-none-linux-gnu \
--build=x86_64-pc-linux-gnu \
--with-sysroot=/home/iains/cross-roots/aarch64-none-linux-gnu
make -j10 && make install

# Cross GCC
mkdir -p ~/build-canada/gcc-cross
cd ~/build-canada/gcc-cross
$skip3 ~/src/gcc/configure --prefix=$HOME/gcc/aarch64 $gcc_common_args \
--target=aarch64-none-linux-gnu \
--build=x86_64-pc-linux-gnu \
--with-sysroot=/home/iains/cross-roots/aarch64-none-linux-gnu
make -j10 && make install

# Use new aarch64-none-linux-gnu-ld and aarc64-none-linux-gnu-g++ etc
PATH=$PATH:$HOME/gcc/aarch64/bin

# "Native cross" GCC
mkdir -p ~/build-canada/gcc-native-cross
cd ~/build-canada/gcc-native-cross
$skip4 ~/src/gcc/configure --prefix=/not/going/to/install $gcc_common_args \
--target=aarch64-none-linux-gnu \
--host=aarch64-none-linux-gnu \
--build=x86_64-pc-linux-gnu \
--with-sysroot=/home/iains/cross-roots/aarch64-none-linux-gnu
make -j10
#!/bin/bash

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-11  6:53       ` Xi Ruoyao
@ 2022-01-11 11:19         ` Jonathan Wakely
  0 siblings, 0 replies; 12+ messages in thread
From: Jonathan Wakely @ 2022-01-11 11:19 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: Thomas Sobczynski, gcc-help

On Tue, 11 Jan 2022 at 06:54, Xi Ruoyao wrote:
>
> On Tue, 2022-01-11 at 03:44 +0000, Thomas Sobczynski wrote:
> > Update: I kept peering at the configure scripts and their embedded
> > comments, and concluded that it's at least worth trying to add "--
> > with-newlib" to the configure script parameters. That may not be the
> > right move, but it did get me further into the build process. However,
> > although its configure script finished, the GCC build seems unable to
> > compile libstdc++ (tail end of output below).
> >
> > Am I barking up the wrong tree with "--with-newlib"?
>
> I think --with-newlib is needed, as it's the de-facto C library on bare
> metal ARM.  But you need to install newlib for the target before
> building libstdc++, because libstdc++ needs a C library.

Strictly speaking it doesn't need one, but you have to use
--disable-hosted-libstdcxx --without-headers --with-newlib to tell it
you have no C library.

On the master branch you no longer need the --with-newlib for that
case (PR 103866). Building trunk, or backporting the fix for that bug
to gcc-11, might make life easier.



>
> And your configuration may trigger
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017, which is fixed in
> GCC 11 branch recently.  You may need to "git pull" your GCC 11 branch
> to overcome it.

Yes, building a canadian cross for bare metal, involving Windows, is
like falling out of the ugly tree and hitting every branch on the way
down.

> Maybe you can add --disable-libstdcxx and build a GCC without libstdc++,
> reboot into Windows, and then compile newlib & libstdc++ for target with
> the toolchain just built.
>
> However, honestly I don't do any serious development on Windows...

> > Does it make sense that the build is supplying include search
> > directories from the GCC v11 build tree (compiler being compiled) to
> > the native cross compiler which is GCC v9.x? I already misunderstood
> > the build/host/target config earlier. Is it perhaps not_a_ GCC cross
> > toolchain that I need, but perhaps I need to build _the_ compiler
> > (v11) and then turn around and use it to build for the non-native
> > Host?
>
> "__has_builtin" is introduced in GCC 10, so GCC 9 can't recognize it.
> IIRC libstdc++ from a specific GCC version is only expected to be built
> with GCC with the same version.

Correct.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-11 11:14       ` Jonathan Wakely
@ 2022-01-12 18:39         ` Thomas Sobczynski
  2022-01-12 19:09           ` Jonathan Wakely
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Sobczynski @ 2022-01-12 18:39 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Xi Ruoyao, gcc-help

Thanks much for the pointers thus far. I am now trying to take this in three chunks: build native GCC11 on GNU/Linux, then use that to build GCC11 on/for GNU/Linux targeting ARM, then use the previous two to build GCC11 on GNU/Linux for Windows targeting ARM.

The first step completes, so I have an installed GCC 11 native toolchain for Linux.

The second step doesn't finish; getting hung up on configuring libstdc++.

The tail of the build output leading up to the error:



checking for ISO C99 support to TR1 in <stdint.h>... no
checking for ISO C99 support to TR1 in <math.h>... no
no
no
checking stdbool.h usability... no
checking stdbool.h presence... yes
configure: WARNING: stdbool.h: present but cannot be compiled
configure: WARNING: stdbool.h:     check for missing prerequisite headers?
configure: WARNING: stdbool.h: see the Autoconf documentation
configure: WARNING: stdbool.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdbool.h: proceeding with the compiler's result
checking for stdbool.h... no
checking stdalign.h usability... no
checking stdalign.h presence... yes
configure: WARNING: stdalign.h: present but cannot be compiled
configure: WARNING: stdalign.h:     check for missing prerequisite headers?
configure: WARNING: stdalign.h: see the Autoconf documentation
configure: WARNING: stdalign.h:     section "Present But Cannot Be Compiled"
configure: WARNING: stdalign.h: proceeding with the compiler's result
checking for stdalign.h... no
checking for the value of EOF... configure: error: computing EOF failed
make[2]: *** [Makefile:13316: configure-target-libstdc++-v3] Error 1
make[2]: Leaving directory '/home/tsobczynski/Compiler/build-linux-cross'
make[1]: *** [Makefile:968: all] Error 2
make[1]: Leaving directory '/home/tsobczynski/Compiler/build-linux-cross'



The corresponding part of config.log for the library is:



configure:16488: checking for the value of EOF
configure:16494: /home/tsobczynski/Compiler/build-linux-cross/./gcc/xgcc -B/home/tsobczynski/Compiler/build-linux-cross/./gcc/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/bin/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/lib/ -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/include -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/sys-include    -c -g -O2 -g -Os  conftest.c >&5
conftest.c:14:10: fatal error: stdio.h: No such file or directory
   14 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
configure:16494: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| #define _GLIBCXX_HOSTED 0
| #define _GLIBCXX_VERBOSE 1
| #define _GLIBCXX_USE_LONG_LONG 1
| #define _GLIBCXX_FULLY_DYNAMIC_STRING 0
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| static int test_array [1 - 2 * !((EOF) >= 0)];
| test_array [0] = 0;
| return test_array [0];
|
|   ;
|   return 0;
| }
configure:16494: /home/tsobczynski/Compiler/build-linux-cross/./gcc/xgcc -B/home/tsobczynski/Compiler/build-linux-cross/./gcc/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/bin/ -B/home/tsobczynski/Compiler/linux-cross/arm-none-eabi/lib/ -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/include -isystem /home/tsobczynski/Compiler/linux-cross/arm-none-eabi/sys-include    -c -g -O2 -g -Os  conftest.c >&5
conftest.c:14:10: fatal error: stdio.h: No such file or directory
   14 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminated.
configure:16494: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "package-unused"
| #define PACKAGE_TARNAME "libstdc++"
| #define PACKAGE_VERSION "version-unused"
| #define PACKAGE_STRING "package-unused version-unused"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| #define _GLIBCXX_HOSTED 0
| #define _GLIBCXX_VERBOSE 1
| #define _GLIBCXX_USE_LONG_LONG 1
| #define _GLIBCXX_FULLY_DYNAMIC_STRING 0
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| static int test_array [1 - 2 * !((EOF) < 0)];
| test_array [0] = 0;
| return test_array [0];
|
|   ;
|   return 0;
| }
configure:16497: error: computing EOF failed



The excerpted recipe I'm using to build the native/native/native toolchain:

cd $(COMPILER_ROOT)/build-linux-native && $(COMPILER_ROOT)/gcc/configure --prefix=${LINUX_TOOLCHAIN_ROOT} --enable-vtable-verify --enable-languages=c,c++,lto --disable-multilib --disable-bootstrap --enable-large-address-aware

$(LINUX_TOOLCHAIN_ROOT)/bin/gcc: $(COMPILER_ROOT)/build-linux-native/Makefile
$(MAKE) -j8 -C $(COMPILER_ROOT)/build-linux-native
$(MAKE) -C $(COMPILER_ROOT)/build-linux-native install



The excerpted recipe for the native/native/cross toolchain:


cd $(COMPILER_ROOT)/build-linux-cross && PATH="$(LINUX_TOOLCHAIN_ROOT)/bin:$(PATH)" $(COMPILER_ROOT)/gcc/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=arm-none-eabi --prefix=${LINUX_CROSS_TOOLCHAIN_ROOT} --enable-vtable-verify --with-multilib-list=aprofile,rmprofile --enable-languages=c,c++,lto --enable-large-address-aware --disable-shared --with-newlib

PATH="$(LINUX_TOOLCHAIN_ROOT)/bin:$(PATH)" $(MAKE) -j8 -C $(COMPILER_ROOT)/build-linux-cross
PATH="$(LINUX_TOOLCHAIN_ROOT)/bin:$(PATH)" $(MAKE) -C $(COMPILER_ROOT)/build-linux-cross install



The search paths the configure script is passing to the compiler do not contain 'stdio.h', but the native toolchain I'm using to compile (same GCC 11.2.x) does have it:

$ find linux-cross -name 'stdio.h'
$ find linux -name 'stdio.h'
linux/include/c++/11.2.1/tr1/stdio.h
linux/lib/gcc/x86_64-pc-linux-gnu/11.2.1/include/ssp/stdio.h


I seemed to have the opposite problem earlier, where the GCC 9 native->ARM toolchain I installed was choking on headers from GCC 11 that it couldn't understand, which is why I built a native GCC 11 in the first place. Any thoughts on where I have gone wrong this time?

Thanks,
Tom


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [EXTERNAL] Re: Compiling GCC 11 for Windows targeting ARM on Linux
  2022-01-12 18:39         ` Thomas Sobczynski
@ 2022-01-12 19:09           ` Jonathan Wakely
  0 siblings, 0 replies; 12+ messages in thread
From: Jonathan Wakely @ 2022-01-12 19:09 UTC (permalink / raw)
  To: Thomas Sobczynski; +Cc: Xi Ruoyao, gcc-help

On Wed, 12 Jan 2022 at 18:39, Thomas Sobczynski <tsobczynski@werfen.com> wrote:
>
> Thanks much for the pointers thus far. I am now trying to take this in three chunks: build native GCC11 on GNU/Linux, then use that to build GCC11 on/for GNU/Linux targeting ARM, then use the previous two to build GCC11 on GNU/Linux for Windows targeting ARM.
>
> The first step completes, so I have an installed GCC 11 native toolchain for Linux.
>
> The second step doesn't finish; getting hung up on configuring libstdc++.
>
> The tail of the build output leading up to the error:
>
>
>
> checking for ISO C99 support to TR1 in <stdint.h>... no
> checking for ISO C99 support to TR1 in <math.h>... no
> no
> no
> checking stdbool.h usability... no
> checking stdbool.h presence... yes
> configure: WARNING: stdbool.h: present but cannot be compiled
> configure: WARNING: stdbool.h:     check for missing prerequisite headers?
> configure: WARNING: stdbool.h: see the Autoconf documentation
> configure: WARNING: stdbool.h:     section "Present But Cannot Be Compiled"
> configure: WARNING: stdbool.h: proceeding with the compiler's result
> checking for stdbool.h... no
> checking stdalign.h usability... no
> checking stdalign.h presence... yes
> configure: WARNING: stdalign.h: present but cannot be compiled
> configure: WARNING: stdalign.h:     check for missing prerequisite headers?
> configure: WARNING: stdalign.h: see the Autoconf documentation
> configure: WARNING: stdalign.h:     section "Present But Cannot Be Compiled"
> configure: WARNING: stdalign.h: proceeding with the compiler's result
> checking for stdalign.h... no
> checking for the value of EOF... configure: error: computing EOF failed
> make[2]: *** [Makefile:13316: configure-target-libstdc++-v3] Error 1
> make[2]: Leaving directory '/home/tsobczynski/Compiler/build-linux-cross'
> make[1]: *** [Makefile:968: all] Error 2
> make[1]: Leaving directory '/home/tsobczynski/Compiler/build-linux-cross'

This is fixed by the patch for PR 103866 that I already referred you
to. Either build the Git master branch, or backport the fix to gcc-11.
But I'm repeating myself now.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-01-12 19:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 16:47 Compiling GCC 11 for Windows targeting ARM on Linux Thomas Sobczynski
2022-01-10 17:16 ` Xi Ruoyao
2022-01-11  2:49   ` [EXTERNAL] " Thomas Sobczynski
2022-01-11  3:44     ` Thomas Sobczynski
2022-01-11  6:53       ` Xi Ruoyao
2022-01-11 11:19         ` Jonathan Wakely
2022-01-11 11:14       ` Jonathan Wakely
2022-01-12 18:39         ` Thomas Sobczynski
2022-01-12 19:09           ` Jonathan Wakely
2022-01-11 11:09     ` Jonathan Wakely
2022-01-10 17:24 ` Jonathan Wakely
2022-01-11  0:27   ` [EXTERNAL] " Thomas Sobczynski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).