[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1471434403-25291-4-git-send-email-ynorov@caviumnetworks.com>
Date: Wed, 17 Aug 2016 14:46:28 +0300
From: Yury Norov <ynorov@...iumnetworks.com>
To: <arnd@...db.de>, <catalin.marinas@....com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<linux-arch@...r.kernel.org>, <libc-alpha@...rceware.org>
CC: <schwidefsky@...ibm.com>, <heiko.carstens@...ibm.com>,
<ynorov@...iumnetworks.com>, <pinskia@...il.com>,
<broonie@...nel.org>, <joseph@...esourcery.com>,
<christoph.muellner@...obroma-systems.com>,
<bamvor.zhangjian@...wei.com>, <szabolcs.nagy@....com>,
<klimov.linux@...il.com>, <Nathan_Lynch@...tor.com>,
<agraf@...e.de>, <Prasun.Kapoor@...iumnetworks.com>,
<kilobyte@...band.pl>, <geert@...ux-m68k.org>,
<philipp.tomsich@...obroma-systems.com>,
<manuel.montezelo@...il.com>, <linyongting@...wei.com>,
<maxim.kuvyrkov@...aro.org>, <davem@...emloft.net>,
<zhouchengming1@...wei.com>, <cmetcalf@...hip.com>,
Andrew Pinski <apinski@...ium.com>,
Andrew Pinski <Andrew.Pinski@...iumnetworks.com>
Subject: [PATCH 03/18] arm64: ensure the kernel is compiled for LP64
From: Andrew Pinski <apinski@...ium.com>
The kernel needs to be compiled as a LP64 binary for ARM64, even when
using a compiler that defaults to code-generation for the ILP32 ABI.
Consequently, we need to explicitly pass '-mabi=lp64' (supported on
gcc-4.9 and newer).
Signed-off-by: Andrew Pinski <Andrew.Pinski@...iumnetworks.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@...obroma-systems.com>
Signed-off-by: Christoph Muellner <christoph.muellner@...obroma-systems.com>
Signed-off-by: Yury Norov <ynorov@...iumnetworks.com>
Reviewed-by: David Daney <ddaney@...iumnetworks.com>
---
arch/arm64/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 5b54f8c..4800227 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -34,14 +34,19 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += $(call cc-option, -mpc-relative-literal-loads)
KBUILD_AFLAGS += $(lseinstr)
+KBUILD_CFLAGS += $(call cc-option,-mabi=lp64)
+KBUILD_AFLAGS += $(call cc-option,-mabi=lp64)
+
ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
KBUILD_CPPFLAGS += -mbig-endian
AS += -EB
LD += -EB
+LDFLAGS += -maarch64linuxb
else
KBUILD_CPPFLAGS += -mlittle-endian
AS += -EL
LD += -EL
+LDFLAGS += -maarch64linux
endif
CHECKFLAGS += -D__aarch64__
--
2.7.4
Powered by blists - more mailing lists