[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qemu-s390x] [PATCH] pc-bios/s390-ccw: Optimize the s390-ccw bios fo

From: Christian Borntraeger
Subject: Re: [qemu-s390x] [PATCH] pc-bios/s390-ccw: Optimize the s390-ccw bios for size
Date: Thu, 14 Jun 2018 12:55:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 06/14/2018 10:48 AM, Thomas Huth wrote:
> Since we're storing the firmware blobs in the QEMU git repository, it
> would be nice if the blobs would be a little bit smaller. By using -Os
> and -fno-asynchronous-unwind-tables the size of the s390-ccw.img can be
> decreased by ca. 4kB, and the size of s390-netboot.img even by ca. 45kB.
> The change of speed of the firmware should not really matter compared to
> a binary that has been compiled with -O2 since the firmware still starts
> very fast.

> Signed-off-by: Thomas Huth <address@hidden>
> ---
>  pc-bios/s390-ccw/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> diff --git a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
> index 439e3cc..f22a5ca 100644
> --- a/pc-bios/s390-ccw/Makefile
> +++ b/pc-bios/s390-ccw/Makefile
> @@ -13,6 +13,7 @@ OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o 
> \
>         virtio.o virtio-scsi.o virtio-blkdev.o libc.o
>  QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
> +QEMU_CFLAGS += -Os -fno-asynchronous-unwind-tables

Hmm, it looks like that the O2 comes after Os for me (which would override Os).

cc -iquote /home/cborntra/REPOS/qemu/build/. -iquote . -iquote 
/home/cborntra/REPOS/qemu/tcg -iquote /home/cborntra/REPOS/qemu/tcg/s390 
-I/home/cborntra/REPOS/qemu/build/linux-headers -iquote . -iquote 
/home/cborntra/REPOS/qemu -iquote /home/cborntra/REPOS/qemu/accel/tcg -iquote 
/home/cborntra/REPOS/qemu/include -Werror -Wstrict-prototypes -Wredundant-decls 
-Wall -Wundef -Wwrite-strings -Wmissing-prototypes -Wexpansion-to-defined 
-Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body 
-Wnested-externs -Wformat-security -Wformat-y2k -Winit-self 
-Wignored-qualifiers -Wold-style-declaration -Wold-style-definition 
-Wtype-limits -Os -fno-asynchronous-unwind-tables -ffreestanding 
-fno-delete-null-pointer-checks -msoft-float -march=z900 -fPIE 
-fno-strict-aliasing   -fno-stack-protector -MMD -MP -MT libc.o -MF ./libc.d 
-O2 -g  -c -o libc.o /home/cborntra/REPOS/qemu/pc-bios/s390-ccw/libc.c

so the effect is only because of the -fno-asynchronous-unwind-tables.

>  QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
>  QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
>  QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]