SHA256
1
0
forked from pool/qemu
qemu/ipxe-use-gcc6-for-more-compact-code.patch

37 lines
1.2 KiB
Diff

ipxe: use gcc6 for more compact code
We have a strict size limit of 64K which needs to be enforced for
pxe-virtio.rom for migration compatibility. The v4.8 gcc compiler
used in SLE12 doesn't produce as compact code as does more recent
gcc compilers, and the pxe-virtio.rom produced with it doesn't fit
in 64K anymore without taking extraordinary efforts. I was unable
to find enough opportunities in the ipxe code and data to reduce
its size, and found that using a more recent compiler would be the
best solution to keeping the rom size within the 64K size limit.
I also discovered that $(WORKAROUND_CFLAGS) is specific to CC, but
gets used with HOST_CC, so we'd better keep those the same version
to not get in trouble with different supported options.
Signed-off-by: Bruce Rogers <brogers@suse.com>
--- a/src/Makefile
+++ b/src/Makefile
@@ -15,7 +15,7 @@ CROSS_COMPILE ?= $(CROSS)
#
# Locations of tools
#
-HOST_CC := gcc
+HOST_CC := gcc-6
RM := rm -f
TOUCH := touch
MKDIR := mkdir
@@ -24,7 +24,7 @@ ECHO := echo
PRINTF := printf
PERL := perl
TRUE := true
-CC := $(CROSS_COMPILE)gcc
+CC := $(CROSS_COMPILE)gcc-6
CPP := $(CC) -E
AS := $(CROSS_COMPILE)as
LD := $(CROSS_COMPILE)ld