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

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).