[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 10:41:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 |
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
main.o: In function `virtio_setup':
/home/cborntra/REPOS/qemu/pc-bios/s390-ccw/main.c:117: undefined reference to
`__stack_chk_fail'
Looks like it also removes other necessary fixups like -msoft-float.
---
> Makefile | 3 ++-
> pc-bios/optionrom/Makefile | 2 --
> 2 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 0d7647f..50b4b3a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -225,8 +225,9 @@ dtc/%:
> $(SUBDIR_RULES): libqemuutil.a libqemustub.a $(common-obj-y) $(qom-obj-y)
> $(crypto-aes-obj-$(CONFIG_USER_ONLY))
>
> ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
> +# Only keep -O and -g cflags
> romsubdir-%:
> - $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)"
> TARGET_DIR="$*/",)
> + $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V="$(V)"
> TARGET_DIR="$*/" CFLAGS="$(filter -O% -g%,$(CFLAGS))",)
>
> ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
>
> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index 24e175e..6bab490 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -24,8 +24,6 @@ QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS),
> -no-integrated-as)
> QEMU_CFLAGS += -m32 -include $(SRC_PATH)/pc-bios/optionrom/code16gcc.h
> endif
>
> -# Drop gcov and glib flags
> -CFLAGS := $(filter -O% -g%, $(CFLAGS))
> QEMU_INCLUDES += -I$(SRC_PATH)
>
> Wa = -Wa,
>
- [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
- Re: [Qemu-devel] [PULL 02/14] build-sys: fix building with make CFLAGS=.. argument,
Christian Borntraeger <=
- [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