Re: [kvm-unit-tests PATCH] Always compile the kvm-unit-tests with -fno-common

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

 



On 12/05/2020 11.55, Thomas Huth wrote:
> The new GCC v10 uses -fno-common by default. To avoid that we commit
> code that declares global variables twice and thus fails to link with
> the latest version, we should also compile with -fno-common when using
> older versions of the compiler.
> 
> Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 754ed65..3ff2f91 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) -fno-strict-aliasing
> +COMMON_CFLAGS += -g $(autodepend-flags) -fno-strict-aliasing -fno-common

Oh, wait, this breaks the non-x86 builds due to "extern-less" struct
auxinfo auxinfo in libauxinfo.h !
Drew, why isn't this declared in auxinfo.c instead?

 Thomas




[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