Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	 Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	 linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: Implement ARCH_HAS_CC_CAN_LINK
Date: Thu, 15 Jan 2026 21:50:20 -0700 (MST)	[thread overview]
Message-ID: <74cdaaf4-598d-29f8-584a-3c6a242adee1@kernel.org> (raw)
In-Reply-To: <20251222-cc-can-link-riscv-v1-1-633e39e4a60d@linutronix.de>

[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]

Hi,

On Mon, 22 Dec 2025, Thomas Weißschuh wrote:

> The generic CC_CAN_LINK detection relies on -m32/-m64 compiler flags.
> These are not supported by riscv compilers.
> 
> Use architecture-specific logic using -mabi instead.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> ---
>  arch/riscv/Kconfig | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 6b39f37f769a..b4c1f922eed5 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -25,6 +25,7 @@ config RISCV
>  	select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
>  	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
>  	select ARCH_HAS_BINFMT_FLAT
> +	select ARCH_HAS_CC_CAN_LINK
>  	select ARCH_HAS_CURRENT_STACK_POINTER
>  	select ARCH_HAS_DEBUG_VIRTUAL if MMU
>  	select ARCH_HAS_DEBUG_VM_PGTABLE
> @@ -1351,6 +1352,16 @@ config PORTABLE
>  config ARCH_PROC_KCORE_TEXT
>  	def_bool y
>  
> +config ARCH_CC_CAN_LINK
> +	bool
> +	default $(cc_can_link_user,-mabi=lp64d) if 64BIT
> +	default $(cc_can_link_user,-mabi=ilp32d)
> +
> +config ARCH_USERFLAGS
> +	string
> +	default "-mabi=lp64d" if 64BIT
> +	default "-mabi=ilp32d"
> +

Any reason why this patch shouldn't use the non-d ABI variants, as the 
rest of arch/riscv/Kconfig does?  I suspect this may not work for 
!CONFIG_FPU builds.


- Paul

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-01-16  4:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-22  8:27 [PATCH] riscv: Implement ARCH_HAS_CC_CAN_LINK Thomas Weißschuh
2026-01-16  4:50 ` Paul Walmsley [this message]
2026-01-16  6:05   ` 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=74cdaaf4-598d-29f8-584a-3c6a242adee1@kernel.org \
    --to=pjw@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=thomas.weissschuh@linutronix.de \
    /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