Re: [kvm-unit-tests PATCH] Makefile: Compile the kvm-unit-tests with -fno-strict-aliasing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>


-- 
Thanks,

David / dhildenb




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux