[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.7 v4 01/36] build-sys: fix building with m
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH for-2.7 v4 01/36] build-sys: fix building with make CFLAGS=.. argument |
Date: |
Mon, 8 Aug 2016 10:58:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 05/08/2016 10:23, address@hidden 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>
Applying this patch for 2.7.
Paolo
> ---
> 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] [PATCH for-2.7 v4 00/36] Various memory leak fixes, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 01/36] build-sys: fix building with make CFLAGS=.. argument, marcandre . lureau, 2016/08/05
- Re: [Qemu-devel] [PATCH for-2.7 v4 01/36] build-sys: fix building with make CFLAGS=.. argument,
Paolo Bonzini <=
- [Qemu-devel] [PATCH for-2.7 v4 02/36] tests: fix test-qga leaks, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 03/36] glib-compat: add g_(s)list_free_full(), marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 04/36] qga: free the whole blacklist, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 05/36] qga: free remaining leaking state, marcandre . lureau, 2016/08/05
- [Qemu-devel] [PATCH for-2.7 v4 06/36] tests: fix test-cutils leaks, marcandre . lureau, 2016/08/05