Skip to contentSkip to conversation

Make the powerpc tests compilable with GCC 8

PATCH In review Thomas Huth 2 participants 2 messages Jun 13, 2018 – Jun 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make the powerpc tests compilable with GCC 8

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.

---
 powerpc/Makefile.common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
powerpc/Makefile.common +1 -1
index 63dc166..81c5074 100644
@@ -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
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Thomas Huth

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.

---
 powerpc/Makefile.common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
powerpc/Makefile.common +0 -0
index 63dc166..81c5074 100644

powerpc/Makefile.common all: directories $(TEST_DIR)/boot_rom.bin $(tests-all) · line 25

Quoted 8 lines
powerpc/Makefile.common +1 -1
@@ -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