Closed ghost closed 5 years ago
When cross-compiling netbsd-curses for aarch64 the following happens:
[...] Generating terminfo hash TERMINFODIR=./terminfo TOOL_AWK=awk TOOL_NBPERF=nbperf/nbperf TOOL_SED=sed TOOL_SORT=sort TOOL_TIC=tic/host_tic /bin/sh libterminfo/genhash libterminfo/term.h nbperf/nbperf > libterminfo/hash.c libterminfo/genhash: 60: libterminfo/genhash: nbperf/nbperf: Exec format error make[1]: *** [GNUmakefile:478: libterminfo/hash.c] Error 2 make[1]: Leaving directory '/mnt/build/tools/tools-src/curses/netbsd-curses-0.3.1' make: *** [Makefile:8: all] Error 2
The "Exec format error" is obvious since nbperf was built for aarch64, and the host machine is x86_64.
make(1) is called with the following flags:
CC = cc HOSTCC = /mnt/build/tools/aarch64/bin/clang CFLAGS_HOST = -B/mnt/build/tools/aarch64/bin # it contains ld, a symlink to ld.lld
Was something done incorrectly or incompletely?
see README:
CC - the C compiler HOSTCC - the C compiler used for host programs when crosscompiling.
you got it the wrong way round
When cross-compiling netbsd-curses for aarch64 the following happens:
The "Exec format error" is obvious since nbperf was built for aarch64, and the host machine is x86_64.
make(1) is called with the following flags:
Was something done incorrectly or incompletely?