* [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing
@ 2020-01-22 15:23 Thomas Huth
2020-01-22 15:28 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2020-01-22 15:23 UTC (permalink / raw)
To: kvm, Paolo Bonzini; +Cc: David Hildenbrand, Laurent Vivier, Drew Jones
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 <thuth@redhat.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 4c716da..3834a12 100644
--- a/Makefile
+++ b/Makefile
@@ -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
--
2.18.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing
2020-01-22 15:23 [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing Thomas Huth
@ 2020-01-22 15:28 ` David Hildenbrand
2020-01-22 15:30 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2020-01-22 15:28 UTC (permalink / raw)
To: Thomas Huth, kvm, Paolo Bonzini; +Cc: Laurent Vivier, Drew Jones
On 22.01.20 16:23, Thomas Huth wrote:
> 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 <thuth@redhat.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 4c716da..3834a12 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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
Acked-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing
2020-01-22 15:28 ` David Hildenbrand
@ 2020-01-22 15:30 ` Paolo Bonzini
2020-01-22 15:33 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2020-01-22 15:30 UTC (permalink / raw)
To: David Hildenbrand, Thomas Huth, kvm; +Cc: Laurent Vivier, Drew Jones
On 22/01/20 16:28, David Hildenbrand wrote:
> Acked-by: David Hildenbrand <david@redhat.com>
I think you meat Reviewed :) Applied, thanks.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing
2020-01-22 15:30 ` Paolo Bonzini
@ 2020-01-22 15:33 ` David Hildenbrand
0 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2020-01-22 15:33 UTC (permalink / raw)
To: Paolo Bonzini, Thomas Huth, kvm; +Cc: Laurent Vivier, Drew Jones
On 22.01.20 16:30, Paolo Bonzini wrote:
> On 22/01/20 16:28, David Hildenbrand wrote:
>> Acked-by: David Hildenbrand <david@redhat.com>
>
> I think you meat Reviewed :) Applied, thanks.
Yeah, whatever works for you ;)
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-22 15:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22 15:23 [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing Thomas Huth
2020-01-22 15:28 ` David Hildenbrand
2020-01-22 15:30 ` Paolo Bonzini
2020-01-22 15:33 ` David Hildenbrand
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.