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

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

 



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@xxxxxxxxxx>
---
 powerpc/Makefile.common | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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
 
-- 
2.27.0




[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