Richard Henderson <[email protected]> writes:
> On aa64, "cross-compiling" to aa32, with
>
> CC=arm-linux-gnueabihf-gcc
So this is different from ./configure --cross-cc=arch-linux-gnueabihf-
>
> configure determines
>
> aarch64-linux-user/config-target.mak:CROSS_CC_GUEST="aarch64-linux-gnu-gcc"
> aarch64-linux-user/config-target.mak:CROSS_CC_GUEST_STATIC=y
> aarch64-softmmu/config-target.mak:CROSS_CC_GUEST="aarch64-linux-gnu-gcc"
> aarch64-softmmu/config-target.mak:CROSS_CC_GUEST_STATIC=y
> arm-linux-user/config-target.mak:CROSS_CC_GUEST="cc"
> arm-linux-user/config-target.mak:CROSS_CC_GUEST_STATIC=y
> arm-softmmu/config-target.mak:CROSS_CC_GUEST="cc"
> arm-softmmu/config-target.mak:CROSS_CC_GUEST_STATIC=y
>
> which results in
>
> BUILD arm guest-tests with cc
> cc: error: unrecognized command line option ‘-marm’; did you mean ‘-fasm’?
>
> Because of course cc is the aa64 host compiler.
Hmm the build target is determined by check_define which uses $cc so I'm
guessing all those setting cross_FOO to host_cc should be using cc
instead?
In fact looking deeper I'm not sure what HOST_CC is meant to be used
for. We export it to make but the only place I can find it in the source
tree is:
$(feat-dst)gen-features: $(feat-src)gen-features.c
$(call quiet-command,$(HOST_CC) $(QEMU_INCLUDES) -o $@
$<,"CC","$(TARGET_DIR)gen-features")
As part of s390x - weird.
>
>
> r~
--
Alex Bennée