[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 02/14] build-sys: fix building with make CFLAGS=.
From: |
Christian Borntraeger |
Subject: |
Re: [Qemu-devel] [PULL 02/14] build-sys: fix building with make CFLAGS=.. argument |
Date: |
Mon, 15 Aug 2016 11:08:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 |
On 08/15/2016 10:41 AM, Christian Borntraeger wrote:
> On 08/10/2016 03:57 PM, Paolo Bonzini wrote:
>> From: Marc-André Lureau <address@hidden>
>>
>> When calling make with a CFLAGS=.. argument, the -g/-O filter is not
>> applied, which may result with build failure with ASAN for example. It
>> could be solved with an 'override' directive on CFLAGS, but that would
>> actually prevent setting different CFLAGS manually.
>>
>> Instead, filter the CFLAGS argument from the top-level Makefile (so
>> you could still call make with a different CFLAGS argument on a
>> rom/Makefile manually)
>>
>> Signed-off-by: Marc-André Lureau <address@hidden>
>> Reviewed-by: Paolo Bonzini <address@hidden>
>> Message-Id: <address@hidden>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>
>
> This patch breaks the build on the s390-ccw.img bios if I enable
> --enable-debug
>
[...]
>
Something like
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -10,8 +10,10 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)
.PHONY : all clean build-all
OBJECTS = start.o main.o bootmap.o sclp-ascii.o virtio.o virtio-scsi.o
-CFLAGS += -fPIE -fno-stack-protector -ffreestanding -march=z900
-CFLAGS += -fno-delete-null-pointer-checks -msoft-float
+QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
+QEMU_CFLAGS := -ffreestanding -fno-delete-null-pointer-checks -msoft-float
+QEMU_CFLAGS := -march=z900 -fPIE
+QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
LDFLAGS += -Wl,-pie -nostdlib
build-all: s390-ccw.img
seems to help. I need to double check...
- [Qemu-devel] [PULL 00/14] checkpatch, warnings and other fixes, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 03/14] optionrom: add -fno-stack-protector, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 04/14] optionrom: fix compilation with mingw docker target, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 02/14] build-sys: fix building with make CFLAGS=.. argument, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 01/14] linuxboot_dma: avoid guest ABI breakage on gcc vs. clang compilation, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 05/14] atomic: strip "const" from variables declared with typeof, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 06/14] Disable warn about left shifts of negative values, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 07/14] clang: Fix warning reg. expansion to 'defined', Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 08/14] checkpatch: ignore automatically imported Linux headers, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 11/14] checkpatch: check for CVS keywords on all sources, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 10/14] checkpatch: tweak the files in which TABs are checked, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 09/14] timer: set vm_clock disabled default, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 12/14] CODING_STYLE, checkpatch: update line length rules, Paolo Bonzini, 2016/08/10
- [Qemu-devel] [PULL 13/14] checkpatch: bump most warnings to errors, Paolo Bonzini, 2016/08/10