qemu-devel
[Top][All Lists]
Advanced

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




reply via email to

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