--host=x86_64-linux-gnu --target=arm-linux-gnueabihf

Reinoud Koornstra reinoudkoornstra@gmail.com
Wed May 9 00:33:00 GMT 2018


Hi Everyone,

I,'m trying to compile gdb for arm that runs on my x86_64 machine.
So I did the configure and then the make, the make fails, see, how can
I remedy this?

make fails here:

[SNIP]

x86_64-linux-gnu-gcc -DHAVE_CONFIG_H
-DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT     -DDEFAULT_INLINE=0
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign
-Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wmissing-prototypes
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition -Wformat-nonliteral
-DMODET   -I. -I. -I../common -I./../common -I../../include
-I./../../include -I../../bfd -I./../../bfd -I../../opcodes
-I./../../opcodes  -g -O2 -static-libstdc++ -static-libgcc  -o run \
          nrun.o libsim.a ../../bfd/libbfd.a
../../opcodes/libopcodes.a  ../../libiberty/libiberty.a -ldl -lnsl
-L../../zlib -lz -lm
/usr/bin/ld: libsim.a(arminit.o): Relocations in generic ELF (EM: 40)
libsim.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[3]: *** [run] Error 1


./configure -host=x86_64-linux-gnu --target=arm-linux-gnueabihf
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... arm-unknown-linux-gnueabihf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to accept ISO C89... none needed
checking for x86_64-linux-gnu-g++... x86_64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-linux-gnu-g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for x86_64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for x86_64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp
--ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for isl 0.16, 0.15, or deprecated 0.14... no
recommended isl version is 0.16 or 0.15, the minimum required isl
version 0.14 is deprecated
checking for isl 0.16 or 0.15... no
checking for default BUILD_CONFIG...
checking for --enable-vtable-verify... no
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing opcodes/Makefile to force reconfigure
*** removing bfd/Makefile to force reconfigure
*** removing readline/Makefile to force reconfigure
*** removing zlib/Makefile to force reconfigure
*** removing libdecnumber/Makefile to force reconfigure
*** removing sim/Makefile to force reconfigure
*** removing gdb/Makefile to force reconfigure
*** removing etc/Makefile to force reconfigure
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for x86_64-linux-gnu-ar... x86_64-linux-gnu-ar
checking for x86_64-linux-gnu-as... x86_64-linux-gnu-as
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-ld... x86_64-linux-gnu-ld
checking for x86_64-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-linux-gnu-nm... x86_64-linux-gnu-nm
checking for x86_64-linux-gnu-ranlib... x86_64-linux-gnu-ranlib
checking for x86_64-linux-gnu-strip... x86_64-linux-gnu-strip
checking for x86_64-linux-gnu-windres... no
checking for windres... no
checking for x86_64-linux-gnu-windmc... no
checking for windmc... no
checking for x86_64-linux-gnu-objcopy... x86_64-linux-gnu-objcopy
checking for x86_64-linux-gnu-objdump... x86_64-linux-gnu-objdump
checking for x86_64-linux-gnu-readelf... x86_64-linux-gnu-readelf
checking for arm-linux-gnueabihf-cc... no
checking for arm-linux-gnueabihf-gcc... arm-linux-gnueabihf-gcc
checking for arm-linux-gnueabihf-c++... arm-linux-gnueabihf-c++
checking for arm-linux-gnueabihf-gcc... arm-linux-gnueabihf-gcc
checking for arm-linux-gnueabihf-gfortran... no
checking for arm-linux-gnueabihf-gccgo... no
checking for arm-linux-gnueabihf-ar... arm-linux-gnueabihf-ar
checking for arm-linux-gnueabihf-as... arm-linux-gnueabihf-as
checking for arm-linux-gnueabihf-dlltool... no
checking for arm-linux-gnueabihf-ld... arm-linux-gnueabihf-ld
checking for arm-linux-gnueabihf-lipo... no
checking for arm-linux-gnueabihf-nm... arm-linux-gnueabihf-nm
checking for arm-linux-gnueabihf-objcopy... arm-linux-gnueabihf-objcopy
checking for arm-linux-gnueabihf-objdump... arm-linux-gnueabihf-objdump
checking for arm-linux-gnueabihf-ranlib... arm-linux-gnueabihf-ranlib
checking for arm-linux-gnueabihf-readelf... arm-linux-gnueabihf-readelf
checking for arm-linux-gnueabihf-strip... arm-linux-gnueabihf-strip
checking for arm-linux-gnueabihf-windres... no
checking for arm-linux-gnueabihf-windmc... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target gccgo... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objcopy... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target readelf... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile

make fails here:

x86_64-linux-gnu-ar rc libsim.a callback.o syscall.o targ-map.o
version.o wrapper.o sim-arange.o sim-bits.o sim-close.o sim-command.o
sim-config.o sim-core.o sim-cpu.o sim-endian.o sim-engine.o
sim-events.o sim-fpu.o sim-hload.o sim-hrw.o sim-io.o sim-info.o
sim-load.o sim-memopt.o sim-model.o sim-module.o sim-options.o
sim-profile.o sim-reason.o sim-reg.o sim-signal.o sim-stop.o
sim-syscall.o sim-trace.o sim-utils.o sim-watch.o   armemu26.o
armemu32.o arminit.o armos.o armsupp.o armvirt.o thumbemu.o armcopro.o
maverick.o iwmmxt.o
x86_64-linux-gnu-ranlib libsim.a
x86_64-linux-gnu-gcc -DHAVE_CONFIG_H
-DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT     -DDEFAULT_INLINE=0
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign
-Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wmissing-prototypes
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition -Wformat-nonliteral
-DMODET   -I. -I. -I../common -I./../common -I../../include
-I./../../include -I../../bfd -I./../../bfd -I../../opcodes
-I./../../opcodes  -g -O2 -c -o nrun.o -MT nrun.o -MMD -MP -MF
.deps/nrun.Tpo ./../common/nrun.c
x86_64-linux-gnu-gcc -DHAVE_CONFIG_H
-DWITH_DEFAULT_ALIGNMENT=STRICT_ALIGNMENT     -DDEFAULT_INLINE=0
-Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign
-Wno-unused -Wunused-value -Wunused-function -Wno-switch
-Wno-char-subscripts -Wmissing-prototypes
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition -Wformat-nonliteral
-DMODET   -I. -I. -I../common -I./../common -I../../include
-I./../../include -I../../bfd -I./../../bfd -I../../opcodes
-I./../../opcodes  -g -O2 -static-libstdc++ -static-libgcc  -o run \
          nrun.o libsim.a ../../bfd/libbfd.a
../../opcodes/libopcodes.a  ../../libiberty/libiberty.a -ldl -lnsl
-L../../zlib -lz -lm
/usr/bin/ld: libsim.a(arminit.o): Relocations in generic ELF (EM: 40)
libsim.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[3]: *** [run] Error 1



More information about the Gdb mailing list