[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 11/12] pc-bios/s390-ccw: Optimize the s390-netboot.im
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 11/12] pc-bios/s390-ccw: Optimize the s390-netboot.img for size |
Date: |
Tue, 19 Jun 2018 14:04:33 +0200 |
From: Thomas Huth <address@hidden>
The -O2 optimization flag is passed via CFLAGS to the firmware Makefile,
but in netbook.mak, we've got some rules that only use QEMU_CFLAGS for
compiling the libc and libnet from SLOF, so these files get compiled
without optimization so far. Use CFLAGS here, too, to create faster
and smaller code.
We can additionally save some more bytes in the firmware images by compi-
ling the code with -fno-asynchronous-unwind-tables. This will omit some
ELF sections (used for stack unwinding for example) from the image that
we do not need in the firmware.
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
pc-bios/s390-ccw/Makefile | 1 +
pc-bios/s390-ccw/netboot.mak | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
index 439e3cc9c9..1eb316b02f 100644
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -15,6 +15,7 @@ OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \
QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
+QEMU_CFLAGS += -fno-asynchronous-unwind-tables
QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
LDFLAGS += -Wl,-pie -nostdlib
diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak
index 8af0cfd2da..14e96b2aa6 100644
--- a/pc-bios/s390-ccw/netboot.mak
+++ b/pc-bios/s390-ccw/netboot.mak
@@ -19,7 +19,7 @@ s390-netboot.img: s390-netboot.elf
# libc files:
-LIBC_CFLAGS := $(QEMU_CFLAGS) $(LIBC_INC) $(LIBNET_INC)
+LIBC_CFLAGS := $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC)
CTYPE_OBJS = isdigit.o isxdigit.o toupper.o
%.o : $(SLOF_DIR)/lib/libc/ctype/%.c
@@ -52,7 +52,7 @@ libc.a: $(LIBCOBJS)
LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \
dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o
-LIBNETCFLAGS := $(QEMU_CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC) $(LIBNET_INC)
+LIBNETCFLAGS := $(QEMU_CFLAGS) $(CFLAGS) -DDHCPARCH=0x1F $(LIBC_INC)
$(LIBNET_INC)
%.o : $(SLOF_DIR)/lib/libnet/%.c
$(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@
$<,"CC","$(TARGET_DIR)$@")
--
2.14.4
- [qemu-s390x] [PULL 01/12] virtio-ccw: clean up notify, (continued)
- [qemu-s390x] [PULL 01/12] virtio-ccw: clean up notify, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 03/12] vfio-ccw: remove orb.c64 (64 bit data addresses) check, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 02/12] vfio-ccw: add force unlimited prefetch property, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 05/12] s390x/cpumodels: add z14 Model ZR1, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 04/12] s390x/ipl: Try to detect Linux vs non Linux for initial IPL PSW, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 08/12] pc-bios/s390-ccw/net: Update code for the latest changes in SLOF, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 06/12] pc-bios/s390-ccw: define loadparm length, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 07/12] roms: Update SLOF submodule to current status, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 09/12] pc-bios/s390-ccw/net: Add support for pxelinux-style config files, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 10/12] pc-bios/s390-ccw/net: Try to load pxelinux.cfg file accoring to the UUID, Cornelia Huck, 2018/06/19
- [qemu-s390x] [PULL 11/12] pc-bios/s390-ccw: Optimize the s390-netboot.img for size,
Cornelia Huck <=
- [qemu-s390x] [PULL 12/12] pc-bios/s390-ccw: Update the s390-netboot.img binary, Cornelia Huck, 2018/06/19
- Re: [qemu-s390x] [PULL 00/12] next round of s390x patches, Peter Maydell, 2018/06/20