aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-03-10 06:06:12 -0400
committerAnton Blanchard <anton@samba.org>2014-04-22 20:08:07 -0400
commit721aeaa9fdf35a672eef8ebdc4cd04bde38c3cea (patch)
tree74b624cf1a5b1198eb0465ef7080e258d7d7413b
parent24a1bdc358bf3c533f7d575202e92aaca0f91761 (diff)
powerpc: Build little endian ppc64 kernel with ABIv2
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>
-rw-r--r--arch/powerpc/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index e8dd01af504d..5ba603b2fb4a 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -113,9 +113,13 @@ else
113endif 113endif
114endif 114endif
115 115
116CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc 116CFLAGS-$(CONFIG_PPC64) := -mtraceback=no
117CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) 117ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
118AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) 118CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,-mcall-aixdesc)
119AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
120else
121CFLAGS-$(CONFIG_PPC64) += -mcall-aixdesc
122endif
119CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) 123CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc)
120CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) 124CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
121CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) 125CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)