On 08/15/2016 10:41 AM, Christian Borntraeger wrote: > On 08/10/2016 03:57 PM, Paolo Bonzini wrote: >> From: Marc-André Lureau <marcandre.lur...@redhat.com> >> >> 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 <marcandre.lur...@redhat.com> >> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> >> Message-Id: <20160805082421.21994-2-marcandre.lur...@redhat.com> >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > > > 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...