diff mbox

[v2,05/18] arm64: fix -m for GNU gold

Message ID 20171115213428.22559-6-samitolvanen@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sami Tolvanen Nov. 15, 2017, 9:34 p.m. UTC
GNU gold supports different emulations than bfd. Use aarch64_elf64_*_vec
instead of aarch64linux.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
 arch/arm64/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Yury Norov Nov. 16, 2017, 10:55 a.m. UTC | #1
On Wed, Nov 15, 2017 at 01:34:15PM -0800, Sami Tolvanen wrote:
> GNU gold supports different emulations than bfd. Use aarch64_elf64_*_vec
> instead of aarch64linux.
> 
> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>

Acked-by: Yury Norov <ynorov@caviumnetworks.com>

> ---
>  arch/arm64/Makefile | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index ecd5ed11c764..6059c8169513 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -70,14 +70,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.15.0.448.gf294e3d99a-goog
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Nick Desaulniers Nov. 16, 2017, 4:55 p.m. UTC | #2
This and the ld-name patch can probably be taken separately from the
rest in the LTO series simply for enabling linking w/ gold.
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index ecd5ed11c764..6059c8169513 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -70,14 +70,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