All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests] autodetect -Wno-frame-address
@ 2016-10-25 15:06 Paolo Bonzini
  0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2016-10-25 15:06 UTC (permalink / raw)
  To: kvm; +Cc: lprosek, rkrcmar

Not all targets have -Wframe-address, and those that don't will
report an error if -Wno-frame-address is passed (because of -Werror).
So autodetect it.
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 0ffe234..5201472 100644
--- a/Makefile
+++ b/Makefile
@@ -45,14 +45,16 @@ cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
               > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
 
 CFLAGS += -g
-CFLAGS += $(autodepend-flags) -Wall -Werror -Wno-frame-address
+CFLAGS += $(autodepend-flags) -Wall -Werror
 frame-pointer-flag=-f$(if $(KEEP_FRAME_POINTER),no-,)omit-frame-pointer
 fomit_frame_pointer := $(call cc-option, $(frame-pointer-flag), "")
 fnostack_protector := $(call cc-option, -fno-stack-protector, "")
 fnostack_protector_all := $(call cc-option, -fno-stack-protector-all, "")
+wno_frame_address := $(call cc-option, -Wno-frame-address, "")
 CFLAGS += $(fomit_frame_pointer)
 CFLAGS += $(fno_stack_protector)
 CFLAGS += $(fno_stack_protector_all)
+CFLAGS += $(wno_frame_address)
 
 CXXFLAGS += $(CFLAGS)
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-10-25 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-25 15:06 [PATCH kvm-unit-tests] autodetect -Wno-frame-address Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.