WonderfulToolchain / wonderful-i8086

100% libre WonderSwan C toolchain
29 stars 0 forks source link

"Fatal error: no compiled in support for x86_64" when building GCC #5

Closed iamgreaser closed 1 year ago

iamgreaser commented 2 years ago

Using Void Linux, GCC 10.2.1, Binutils 2.32.0.20190814.

make[2]: Entering directory '/home/ben/Downloads/progs/wonderful-i8086/toolchain/build-gcc/gcc'
g++ -c   -g -O2 -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 -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc-ia16/gcc -I../../gcc-ia16/gcc/build -I../../gcc-ia16/gcc/../include  -I../../gcc-ia16/gcc/../libcpp/include  \
    -o build/genmddeps.o ../../gcc-ia16/gcc/genmddeps.c
Assembler messages:
Fatal error: no compiled in support for x86_64
make[2]: *** [Makefile:2495: build/genmddeps.o] Error 1
make[2]: Leaving directory '/home/ben/Downloads/progs/wonderful-i8086/toolchain/build-gcc/gcc'
make[1]: *** [Makefile:4194: install-gcc] Error 2
make[1]: Leaving directory '/home/ben/Downloads/progs/wonderful-i8086/toolchain/build-gcc'
make: *** [Makefile:2282: install] Error 2

g++ in general works fine outside of this situation, even with most of those flags defined.

Of course, running this directly, outside of the build system, results in the same error:

[ben@flamethrower gcc]$ g++ -c   -g -O2 -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 -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc-ia16/gcc -I../../gcc-ia16/gcc/build -I../../gcc-ia16/gcc/../include  -I../../gcc-ia16/gcc/../libcpp/include        -o build/genmddeps.o ../../gcc-ia16/gcc/genmddeps.c
Assembler messages:
Fatal error: no compiled in support for x86_64
[ben@flamethrower gcc]$
asiekierka commented 2 years ago

Sounds like a system issue? But why would it be invoking a non-64-bit GNU assembler?

tkchia commented 2 years ago

Hello @iamgreaser,

Indeed this sounds to me like a problem with the underlying host GCC setup. Are you able to compile a simple "Hello world" program using g++?

Thank you!

iamgreaser commented 2 years ago

Indeed this sounds to me like a problem with the underlying host GCC setup. Are you able to compile a simple "Hello world" program using g++?

As mentioned before:

g++ in general works fine outside of this situation, even with most of those flags defined.

tkchia commented 2 years ago

Hello @iamgreaser,

As mentioned before:

g++ in general works fine outside of this situation, even with most of those flags defined.

Strange. Perhaps try adding a -v option to your above command line (for building build/genmddeps.o)? This should give an idea of what programs the GCC driver is running for the individual compiler passes.

Thank you!

asiekierka commented 2 years ago

Can you try now? I fixed an embarassing typo in build.sh.