linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: linuxppc-dev@lists.ozlabs.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	llvm@lists.linux.dev, Nick Desaulniers <ndesaulniers@google.com>,
	Alan Modra <amodra@au1.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Daniel Axtens <dja@axtens.net>
Subject: [PATCH llvm 2/6] powerpc: check for support for -Wa,-m{power4,any}
Date: Tue, 21 Dec 2021 16:59:00 +1100	[thread overview]
Message-ID: <20211221055904.555763-3-aik@ozlabs.ru> (raw)
In-Reply-To: <20211221055904.555763-1-aik@ozlabs.ru>

From: Daniel Axtens <dja@axtens.net>

LLVM's integrated assembler does not like either -Wa,-mpower4
or -Wa,-many. So just don't pass them if they're not supported.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 arch/powerpc/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index e9aa4e8b07dd..5f16ac1583c5 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -245,7 +245,9 @@ cpu-as-$(CONFIG_E500)		+= -Wa,-me500
 # When using '-many -mpower4' gas will first try and find a matching power4
 # mnemonic and failing that it will allow any valid mnemonic that GAS knows
 # about. GCC will pass -many to GAS when assembling, clang does not.
-cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= -Wa,-mpower4 -Wa,-many
+# LLVM IAS doesn't understand either flag: https://github.com/ClangBuiltLinux/linux/issues/675
+# but LLVM IAS only supports ISA >= 2.06 for Book3S 64 anyway...
+cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= $(call as-option,-Wa$(comma)-mpower4) $(call as-option,-Wa$(comma)-many)
 cpu-as-$(CONFIG_PPC_E500MC)	+= $(call as-option,-Wa$(comma)-me500mc)
 
 KBUILD_AFLAGS += $(cpu-as-y)
-- 
2.30.2


  parent reply	other threads:[~2021-12-21  6:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-21  5:58 [PATCH kernel 0/6] powerpc: Build with LLVM_IAS=1 Alexey Kardashevskiy
2021-12-21  5:58 ` [PATCH llvm 1/6] powerpc/toc: PowerPC64 future proof kernel toc, revised for lld Alexey Kardashevskiy
2021-12-21  5:59 ` Alexey Kardashevskiy [this message]
2021-12-21  5:59 ` [PATCH llvm 3/6] powerpc/64/asm: Inline BRANCH_TO_C000 Alexey Kardashevskiy
2021-12-21  5:59 ` [PATCH llvm 4/6] powerpc/64/asm: Do not reassign labels Alexey Kardashevskiy
2021-12-21  5:59 ` [PATCH llvm 5/6] powerpc/mm: Switch obsolete dssall to .long Alexey Kardashevskiy
2021-12-21  5:59 ` [PATCH llvm 6/6] powerpc/mm/book3s64/hash: Switch pre 2.06 tlbiel " Alexey Kardashevskiy
2021-12-26 21:52 ` [PATCH kernel 0/6] powerpc: Build with LLVM_IAS=1 Michael Ellerman

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=20211221055904.555763-3-aik@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=amodra@au1.ibm.com \
    --cc=dja@axtens.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=llvm@lists.linux.dev \
    --cc=ndesaulniers@google.com \
    --cc=npiggin@gmail.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;
as well as URLs for NNTP newsgroup(s).