Inconsistent use of envvars in the makefiles
umarcor opened this issue · 1 comments
In order to cross-compile MAMBO for aarch64 in a x86_64 machine, the gcc executable name must be split in two envvars:
CROSS_COMPILE="aarch64-linux-gnu-"
CC="gcc"
This is because CC
is rewritten in pie/makefile#L1. See also makefile#L29.
However, this does not work with the makefile in subdir test
. There, target portable
defaults to calling $(CC)
, so CC="aarch64-linux-gnu-gcc"
is required and CROSS_COMPILE
is not used at all. See test/makefile#L17.
This is also the case for cross-compiling libelf
(which is a dependency of mambo): CC="aarch64-linux-gnu-gcc" CFLAGS="-static -O2" ./configure
.
What is the rationale behind this difference?
Everyone here builds MAMBO natively on ARM, so cross-compiling support wasn't maintained. I'll modify all the makefiles to be consistent.