[Qemu-devel] [PATCH v1] roms/ipxe: use configured compiler for ipxe

Olaf Hering posted 1 patch 5 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180418081311.27803-1-olaf@aepfle.de
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test s390x passed
roms/Makefile | 2 ++
1 file changed, 2 insertions(+)
[Qemu-devel] [PATCH v1] roms/ipxe: use configured compiler for ipxe
Posted by Olaf Hering 5 years, 12 months ago
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))

Re: [Qemu-devel] [PATCH v1] roms/ipxe: use configured compiler for ipxe
Posted by Olaf Hering 5 years, 12 months ago
Am Wed, 18 Apr 2018 10:13:10 +0200
schrieb Olaf Hering <olaf@aepfle.de>:

> 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 ...

Scratch that patch. make -C operates just below 'roms/' and does not use
results from configure. The CC variable built into make(1) happens to be cc.

Olaf