From: Matt Turner <mattst88@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>,
Matt Turner <mattst88@gmail.com>,
Magnus Lindholm <linmag7@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Nicolas Schier <nsc@kernel.org>
Cc: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, linux-kbuild@vger.kernel.org
Subject: [PATCH v2 1/2] alpha: pass -Wa,-mev6 only when using GNU as
Date: Wed, 5 Aug 2026 14:55:57 -0400 [thread overview]
Message-ID: <20260805185557.3283233-1-mattst88@gmail.com> (raw)
In-Reply-To: <20260803-alpha-clang-v1-0-1c4ba5ba7a64@gmail.com>
That flag exists to stop gas emulating instructions the assembler thinks
the target lacks. It is a gas-only option, and LLVM's integrated
assembler does not emulate instructions in the first place, so nothing
is needed there.
Condition it on CONFIG_AS_IS_GNU rather than the compiler, so it is
still passed for clang builds using GNU as (LLVM_IAS=0) and omitted only
for the integrated assembler.
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
Only this patch changed; patch 2/2 ("alpha: read $gp and $sp explicitly
for clang") is unchanged from v1 and is not resent.
Changes in v2:
- Drop the scripts/Makefile.clang CLANG_TARGET_FLAGS_alpha entry. It
will be sent separately when the alpha backend is upstreamed to LLVM.
- Condition -Wa,-mev6 on CONFIG_AS_IS_GNU rather than CONFIG_CC_IS_GCC,
so it is still passed for clang builds using GNU as (LLVM_IAS=0).
- Reword the subject and commit message for the reduced scope.
- Link to v1: https://lore.kernel.org/r/20260803-alpha-clang-v1-0-1c4ba5ba7a64@gmail.com
arch/alpha/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/alpha/Makefile b/arch/alpha/Makefile
index 35445ff2e489..7074602dca94 100644
--- a/arch/alpha/Makefile
+++ b/arch/alpha/Makefile
@@ -27,10 +27,16 @@ cpuflags-$(CONFIG_ALPHA_GENERIC) := -mcpu=ev56 -mtune=ev6
cflags-y += $(cpuflags-y)
+KBUILD_CFLAGS += $(cflags-y)
+
# For TSUNAMI, we must have the assembler not emulate our instructions.
# The same is true for IRONGATE, POLARIS, PYXIS.
# BWX is most important, but we don't really want any emulation ever.
-KBUILD_CFLAGS += $(cflags-y) -Wa,-mev6
+# Only gas emulates instructions the target does not implement, and only gas
+# understands -mev6. LLVM's integrated assembler never emulates.
+ifdef CONFIG_AS_IS_GNU
+KBUILD_CFLAGS += -Wa,-mev6
+endif
libs-y += arch/alpha/lib/
--
2.54.0
next prev parent reply other threads:[~2026-08-05 18:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 17:08 [PATCH 0/2] alpha: enable building with clang Matt Turner
2026-08-03 17:08 ` [PATCH 1/2] " Matt Turner
2026-08-03 20:56 ` Magnus Lindholm
2026-08-03 17:08 ` [PATCH 2/2] alpha: read $gp and $sp explicitly for clang Matt Turner
2026-08-03 21:15 ` Magnus Lindholm
2026-08-03 19:51 ` [PATCH 0/2] alpha: enable building with clang Nathan Chancellor
2026-08-05 18:55 ` Matt Turner [this message]
2026-08-05 21:27 ` [PATCH v2 1/2] alpha: pass -Wa,-mev6 only when using GNU as Magnus Lindholm
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=20260805185557.3283233-1-mattst88@gmail.com \
--to=mattst88@gmail.com \
--cc=justinstitt@google.com \
--cc=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=nsc@kernel.org \
--cc=richard.henderson@linaro.org \
/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