]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
powerpc: Build little endian ppc64 kernel with ABIv2
authorAnton Blanchard <anton@samba.org>
Mon, 10 Mar 2014 10:06:12 +0000 (21:06 +1100)
committerAnton Blanchard <anton@samba.org>
Wed, 23 Apr 2014 00:08:07 +0000 (10:08 +1000)
Build the little endian ppc64 kernel with ABIv2 if the toolchain
supports it. We can identify an ABIv2 capable toolchain by the
-mabi=elfv2 compiler flag.

Signed-off-by: Anton Blanchard <anton@samba.org>
arch/powerpc/Makefile

index e8dd01af504d57d2f278009249a8efd655552d22..5ba603b2fb4a9fe7fc8e0df87ff0d4c5e20e1f62 100644 (file)
@@ -113,9 +113,13 @@ else
 endif
 endif
 
-CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc
-CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
-AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1)
+CFLAGS-$(CONFIG_PPC64) := -mtraceback=no
+ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
+CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,-mcall-aixdesc)
+AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
+else
+CFLAGS-$(CONFIG_PPC64) += -mcall-aixdesc
+endif
 CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc)
 CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
 CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)