From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas.schier@linux.dev>,
Nicolas Schier <nsc@kernel.org>, Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
"David S. Miller" <davem@davemloft.net>,
Andreas Larsson <andreas@gaisler.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
"Masahiro Yamada" <masahiroy@kernel.org>,
linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org,
sparclinux@vger.kernel.org,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH v2 09/10] sparc: Implement custom CC_CAN_LINK
Date: Tue, 14 Oct 2025 15:05:24 +0200 [thread overview]
Message-ID: <20251014-kbuild-userprogs-bits-v2-9-faeec46e887a@linutronix.de> (raw)
In-Reply-To: <20251014-kbuild-userprogs-bits-v2-0-faeec46e887a@linutronix.de>
The generic CC_CAN_LINK detection does not work for all architectures.
To make it clearer how the detection works on SPARC create an
architecture-specific variant.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
arch/sparc/Kconfig | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a630d373e6453c745ab8bf58fc5622cf0edaf4c9..68b553a47d039da4368a2de30168aaf80a941148 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -13,6 +13,7 @@ config 64BIT
config SPARC
bool
default y
+ select ARCH_HAS_CC_CAN_LINK
select ARCH_HAS_CPU_CACHE_ALIASING
select ARCH_HAS_DMA_OPS
select ARCH_MIGHT_HAVE_PC_PARPORT if SPARC64 && PCI
@@ -475,4 +476,14 @@ config COMPAT
select ARCH_WANT_OLD_COMPAT_IPC
select COMPAT_OLD_SIGACTION
+config ARCH_CC_CAN_LINK
+ bool
+ default $(cc_can_link_user,-m64) if 64BIT
+ default $(cc_can_link_user,-m32)
+
+config ARCH_USERFLAGS
+ string
+ default "-m64" if 64BIT
+ default "-m32"
+
source "drivers/sbus/char/Kconfig"
--
2.51.0
next prev parent reply other threads:[~2025-10-14 13:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 13:05 [PATCH v2 00/10] kbuild: userprogs: introduce architecture-specific CC_CAN_LINK and userprog flags Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 01/10] kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 02/10] init: deduplicate cc-can-link.sh invocations Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 03/10] kbuild: allow architectures to override CC_CAN_LINK Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 04/10] riscv: Implement custom CC_CAN_LINK Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 05/10] s390: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 06/10] powerpc: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 07/10] MIPS: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 08/10] x86/Kconfig: " Thomas Weißschuh
2025-10-14 13:05 ` Thomas Weißschuh [this message]
2025-10-14 13:05 ` [PATCH v2 10/10] kbuild: simplify CC_CAN_LINK Thomas Weißschuh
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=20251014-kbuild-userprogs-bits-v2-9-faeec46e887a@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=agordeev@linux.ibm.com \
--cc=alex@ghiti.fr \
--cc=andreas@gaisler.com \
--cc=aou@eecs.berkeley.edu \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=masahiroy@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
--cc=npiggin@gmail.com \
--cc=nsc@kernel.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).