configure allows to run a dedicated compiler binary, which is stored in
CC and HOST_CC variables, and overrides the default 'cc' command.
This command however is not used when building ipxe from source.
"make -C roms pxerom" invokes the buildsystem of ipxe.git, which has the
command "gcc" hardcoded. That binary may not be suitable to build ipxe.
Reuse the same compiler command that is used to build qemu by specifying
CC and HOST_CC as make commandline option to override the built-in
defaults of ipxe.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
roms/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/roms/Makefile b/roms/Makefile
index 02b69fbac8..982bf105a3 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -127,11 +127,13 @@ efi-rom-%: build-pxe-roms build-efi-roms
build-pxe-roms:
$(MAKE) -C ipxe/src CONFIG=qemu \
+ CC=$(CC) HOST_CC=$(HOST_CC) \
CROSS_COMPILE=$(x86_64_cross_prefix) \
$(patsubst %,bin/%.rom,$(pxerom_targets))
build-efi-roms: build-pxe-roms
$(MAKE) -C ipxe/src CONFIG=qemu \
+ CC=$(CC) HOST_CC=$(HOST_CC) \
CROSS_COMPILE=$(x86_64_cross_prefix) \
$(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \
$(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))