From d9df1dc7455a50a218f11e43b4d366726efc8714 Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Wed, 1 Nov 2017 11:23:22 -0700 Subject: [PATCH] FROMLIST: arm64: fix -m for GNU gold GNU gold supports different emulations than bfd. Use aarch64_elf64_*_vec instead of aarch64linux. Bug: 62093296 Bug: 67506682 Change-Id: I538c69571dc035afb15c7093471b5184f3bf453b (am from https://patchwork.kernel.org/patch/10083925/) Acked-by: Yury Norov Signed-off-by: Sami Tolvanen --- arch/arm64/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 519d13a4d92f..90a387a0d013 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -79,14 +79,22 @@ KBUILD_CPPFLAGS += -mbig-endian CHECKFLAGS += -D__AARCH64EB__ AS += -EB LD += -EB +ifeq ($(ld-name),gold) +LDFLAGS += -maarch64_elf64_be_vec +else LDFLAGS += -maarch64linuxb +endif UTS_MACHINE := aarch64_be else KBUILD_CPPFLAGS += -mlittle-endian CHECKFLAGS += -D__AARCH64EL__ AS += -EL LD += -EL +ifeq ($(ld-name),gold) +LDFLAGS += -maarch64_elf64_le_vec +else LDFLAGS += -maarch64linux +endif UTS_MACHINE := aarch64 endif -- 2.20.1