diff mbox series

[kvm-unit-tests,2/4] powerpc: Probe whether the compiler understands -mabi=no-altivec

Message ID 20210622135517.234801-3-thuth@redhat.com (mailing list archive)
State New, archived
Headers show
Series Test compiling with Clang in the Travis-CI | expand

Commit Message

Thomas Huth June 22, 2021, 1:55 p.m. UTC
Clang does not support "-mabi=no-altivec", so let's check whether
this option is supported before using it.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 powerpc/Makefile.common | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
index 4c3121a..12c280c 100644
--- a/powerpc/Makefile.common
+++ b/powerpc/Makefile.common
@@ -17,9 +17,11 @@  all: directories $(TEST_DIR)/boot_rom.bin $(tests-all)
 
 ##################################################################
 
+mabi_no_altivec := $(call cc-option,-mabi=no-altivec,"")
+
 CFLAGS += -std=gnu99
 CFLAGS += -ffreestanding
-CFLAGS += -O2 -msoft-float -mabi=no-altivec -mno-altivec
+CFLAGS += -O2 -msoft-float -mno-altivec $(mabi_no_altivec)
 CFLAGS += -I $(SRCDIR)/lib -I $(SRCDIR)/lib/libfdt -I lib
 CFLAGS += -Wa,-mregnames