Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing
PATCH 1/1 Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing
Strict aliasing bugs are often hard to find and understand (when the compiler did not omit a warning), and kvm-unit-tests are mainly written by kernel developers who are used to compile their code with -fno-strict-aliasing. So let's use this flag for the kvm-unit-tests, too.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -49,7 +49,7 @@ include $(SRCDIR)/$(TEST_DIR)/Makefile cc-option = $(shell if $(CC) -Werror $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) -COMMON_CFLAGS += -g $(autodepend-flags) +COMMON_CFLAGS += -g $(autodepend-flags) -fno-strict-aliasing COMMON_CFLAGS += -Wall -Wwrite-strings -Wempty-body -Wuninitialized COMMON_CFLAGS += -Wignored-qualifiers -Werror
Signature · 1 line
2.18.1
Quoted 15 lines · Thomas Huth
Strict aliasing bugs are often hard to find and understand (when the compiler did not omit a warning), and kvm-unit-tests are mainly written by kernel developers who are used to compile their code with -fno-strict-aliasing. So let's use this flag for the kvm-unit-tests, too.
Signed-off-by Thomas Huth <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +0
-0
Makefile include $(SRCDIR)/$(TEST_DIR)/Makefile · line 54
Quoted 7 lines
Makefile +1
-1@@ -49,7 +49,7 @@ include $(SRCDIR)/$(TEST_DIR)/Makefile cc-option = $(shell if $(CC) -Werror $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) -COMMON_CFLAGS += -g $(autodepend-flags) +COMMON_CFLAGS += -g $(autodepend-flags) -fno-strict-aliasing COMMON_CFLAGS += -Wall -Wwrite-strings -Wempty-body -Wuninitialized COMMON_CFLAGS += -Wignored-qualifiers -Werror
Signature · 3 lines
Thanks, David / dhildenb
Paolo Bonzini
maintainerQuoted 1 line · David Hildenbrand
I think you meat Reviewed :) Applied, thanks.
Paolo
Quoted 4 lines · Paolo Bonzini
Quoted 1 line · David Hildenbrand
I think you meat Reviewed :) Applied, thanks.
Yeah, whatever works for you ;)
Signature · 3 lines
Thanks, David / dhildenb