archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <>
To: Catalin Marinas <>, Will Deacon <>
Cc: Nick Desaulniers <>,,,,
	Nathan Chancellor <>,
	Arnd Bergmann <>
Subject: [PATCH v2] arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+
Date: Mon,  8 Feb 2021 17:57:20 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Similar to commit 28187dc8ebd9 ("ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN
depends on !LD_IS_LLD"), ld.lld prior to 13.0.0 does not properly
support aarch64 big endian, leading to the following build error when

ld.lld: error: unknown emulation: aarch64linuxb

This has been resolved in LLVM 13. To avoid errors like this, only allow
CONFIG_CPU_BIG_ENDIAN to be selected if using ld.bfd or ld.lld 13.0.0
and newer.

While we are here, the indentation of this symbol used spaces since its
introduction in commit a872013d6d03 ("arm64: kconfig: allow
CPU_BIG_ENDIAN to be selected"). Change it to tabs to be consistent with
kernel coding style.

Reported-by: Arnd Bergmann <>
Signed-off-by: Nathan Chancellor <>

v1 -> v2:

* Conditionally disable CONFIG_CPU_BIG_ENDIAN for older versions of
  ld.lld now that proper support has been added to ld.lld 13+ (thanks to
  the quick work of Fangrui Song).

 arch/arm64/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index f39568b28ec1..912da4e2ab59 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -952,8 +952,9 @@ choice
 	  that is selected here.
-       bool "Build big-endian kernel"
-       help
+	bool "Build big-endian kernel"
+	depends on !LD_IS_LLD || LLD_VERSION >= 130000
+	help
 	  Say Y if you plan on running a kernel with a big-endian userspace.

base-commit: 92bf22614b21a2706f4993b278017e437f7785b3

  parent reply	other threads:[~2021-02-09  0:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  2:24 [PATCH] arm64: Make CPU_BIG_ENDIAN depend on !LD_IS_LLD Nathan Chancellor
2021-02-02  8:04 ` Arnd Bergmann
2021-02-02 19:51   ` Nathan Chancellor
2021-02-02 20:43     ` Arnd Bergmann
2021-02-03 10:08       ` Peter Smith
2021-02-07  2:30 ` Nathan Chancellor
2021-02-09  0:57 ` Nathan Chancellor [this message]
2021-02-09  1:39   ` [PATCH v2] arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+ Nick Desaulniers
2021-02-09 14:35   ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v2] arm64: Make CPU_BIG_ENDIAN depend on ld.bfd or ld.lld 13.0.0+' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox