diff mbox

[kvm-unit-tests] Make the powerpc tests compilable with GCC 8

Message ID 1528899445-1914-1-git-send-email-thuth@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Huth June 13, 2018, 2:17 p.m. UTC
The new GCC 8.1 is optimizing the code with vector instructions.
However, we have not turned on the vector extension in our kvm-unit-test
code, so the tests crash when they hit such an instruction. Compile
the unit tests without vector extensions to avoid this problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 powerpc/Makefile.common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Vivier June 14, 2018, 7:50 a.m. UTC | #1
On 13/06/2018 16:17, Thomas Huth wrote:
> The new GCC 8.1 is optimizing the code with vector instructions.
> However, we have not turned on the vector extension in our kvm-unit-test
> code, so the tests crash when they hit such an instruction. Compile
> the unit tests without vector extensions to avoid this problem.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  powerpc/Makefile.common | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
> index 63dc166..81c5074 100644
> --- a/powerpc/Makefile.common
> +++ b/powerpc/Makefile.common
> @@ -19,7 +19,7 @@ all: directories $(TEST_DIR)/boot_rom.bin $(tests-all)
>  
>  CFLAGS += -std=gnu99
>  CFLAGS += -ffreestanding
> -CFLAGS += -O2
> +CFLAGS += -O2 -msoft-float -mabi=no-altivec -mno-altivec
>  CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
>  CFLAGS += -Wa,-mregnames
>  
> 

Reviewed-by: Laurent Vivier <lvivier@redhat.com>
diff mbox

Patch

diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
index 63dc166..81c5074 100644
--- a/powerpc/Makefile.common
+++ b/powerpc/Makefile.common
@@ -19,7 +19,7 @@  all: directories $(TEST_DIR)/boot_rom.bin $(tests-all)
 
 CFLAGS += -std=gnu99
 CFLAGS += -ffreestanding
-CFLAGS += -O2
+CFLAGS += -O2 -msoft-float -mabi=no-altivec -mno-altivec
 CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
 CFLAGS += -Wa,-mregnames