generate_scno issue using cross compiler (ARM)

Joakim Bech joakim.bech at linaro.org
Thu Dec 29 22:44:23 UTC 2016


Hi,

I'm not sure if I've found an issue or it's me using this the wrong way.
>From commit:
605a705a63d533dceb3c2d489468fcd3aed3963c: tests: generate scno.h from syscallent.h for use by other tests

It fails for me when trying to compile using an ARM toolchain
(aarch64-linux-gnu-gcc) and it's the same all the way to tip on the
master branch.

The error message I get is:
  ./generate_scno > scno.h-t && mv scno.h-t scno.h
  /bin/sh: ./generate_scno: cannot execute binary file: Exec format error
  make: *** [Makefile:5575: scno.h] Error 126

The explanation is pretty simple:
  $ file tests/generate_scno
  tests/generate_scno: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=3ab67cd8b6b0701a34bcdd7cf8fc222c687b6dfe, not stripped

I.e, during the build operation it tries to run the just built
"generate_scno" binary on my host machine (x64), but the binary is built
for ARM/AArch64, hence it fails.

The way I'm building this is:
  $ ./bootstrap
  $ set -e
  $ ./configure --host=aarch64-linux-gnu CC="aarch64-linux-gnu-gcc" LD=aarch64-linux-gnu-ld
  $ CC="aarch64-linux-gnu-gcc" LD=aarch64-linux-gnu-ld make

Have I missed something or is this a cross compiler bug that I've found?
I know too little about autotools, so I cannot give any suggestion how
to fix it.

-- 
Regards,
Joakim




More information about the Strace-devel mailing list