From: Brian Cain <brian.cain@oss.qualcomm.com>
To: linux-hexagon@vger.kernel.org
Cc: sid.manning@oss.qualcomm.com, pierrick.bouvier@oss.qualcomm.com,
Brian Cain <brian.cain@oss.qualcomm.com>
Subject: [PATCH 3/7] hexagon: stop passing -mv${CONFIG_HEXAGON_ARCH_VERSION} to the linker
Date: Sat, 5 Sep 2026 19:17:08 -0700 [thread overview]
Message-ID: <20260906021712.2498266-4-brian.cain@oss.qualcomm.com> (raw)
In-Reply-To: <20260906021712.2498266-1-brian.cain@oss.qualcomm.com>
ldflags-y is probed with cc-option, which checks whether the compiler
accepts the flag, then the result is appended to KBUILD_LDFLAGS, which
is passed straight to $(LD) -- the linker, not the compiler. This
presumed the linker was ld.qcld (aka ld.eld), which does accept the
-mvNN flags. ld.lld does not: it parses "-mvNN" as "-m vNN", i.e. a
request for an emulation named "vNN", which does not exist, and fails
with "unknown emulation: vNN".
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
arch/hexagon/Makefile | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/hexagon/Makefile b/arch/hexagon/Makefile
index 4d393bd8163a..86c96d11b329 100644
--- a/arch/hexagon/Makefile
+++ b/arch/hexagon/Makefile
@@ -26,11 +26,9 @@ KBUILD_CFLAGS_MODULE += -mlong-calls
cflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
aflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
-ldflags-y += $(call cc-option,-mv${CONFIG_HEXAGON_ARCH_VERSION})
KBUILD_CFLAGS += $(cflags-y)
KBUILD_AFLAGS += $(aflags-y)
-KBUILD_LDFLAGS += $(ldflags-y)
# Thread-info register will be r19. This value is not configureable;
# it is hard-coded in several files.
--
2.34.1
next prev parent reply other threads:[~2026-09-06 2:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 2:17 [PATCH 0/7] Hexagon build/syscall/etc fixes Brian Cain
2026-09-06 2:17 ` [PATCH 1/7] hexagon: disable the LLVM packetizer Brian Cain
2026-09-06 2:17 ` [PATCH 2/7] hexagon: define ELF_CORE_EFLAGS for V4-and-later architectures Brian Cain
2026-09-06 2:17 ` Brian Cain [this message]
2026-09-06 2:17 ` [PATCH 4/7] hexagon: read the thread-info register with a volatile asm Brian Cain
2026-09-06 2:17 ` [PATCH 5/7] hexagon: let do_work_pending return without pending work Brian Cain
2026-09-06 2:17 ` [PATCH 6/7] hexagon: set the user stack pointer in start_thread Brian Cain
2026-09-06 2:17 ` [PATCH 7/7] hexagon: return -ENOSYS for unimplemented syscalls Brian Cain
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260906021712.2498266-4-brian.cain@oss.qualcomm.com \
--to=brian.cain@oss.qualcomm.com \
--cc=linux-hexagon@vger.kernel.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=sid.manning@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox