Re: [PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller
From: Nathan Chancellor
Date: Fri May 29 2026 - 20:53:33 EST
On Wed, 27 May 2026 14:45:08 -0700, xur@xxxxxxxxxx <xur@xxxxxxxxxx> wrote:
> diff --git a/arch/Kconfig b/arch/Kconfig
> index e510c585ea84..e4eaca9c917c 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -879,12 +879,8 @@ config AUTOFDO_CLANG
>
> If unsure, say N.
>
> -config ARCH_SUPPORTS_PROPELLER_CLANG
> - bool
> -
> config PROPELLER_CLANG
> bool "Enable Clang's Propeller build"
> - depends on ARCH_SUPPORTS_PROPELLER_CLANG
It does not look like '-fbasic-block-address-map' or its predecessor,
'-fbasic-block-sections=labels', are supported by all architectures?
This will break allmodconfig for some architectures in that case, so
this needs to addressed with some other dependency.
| $ make -skj"$(nproc)" ARCH=arm LLVM=1 mrproper allmodconfig all
| ...
| clang: error: unsupported option '-fbasic-block-address-map' for target 'armv6k-unknown-linux-gnueabi'
| ...
|
| $ make -skj"$(nproc)" ARCH=s390 LLVM=1 mrproper allmodconfig all
| ...
| clang: error: unsupported option '-fbasic-block-address-map' for target 's390x-unknown-linux-gnu'
| ...
Maybe something like
depends on CC_IS_CLANG && $(cc-option,-fbasic-block-address-map)
then cleaning up scripts/Makefile.propeller to use it exclusively?
>
> diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
> index e1ac876200a3..44a42e7c66cf 100644
> --- a/arch/arm64/kernel/vmlinux.lds.S
> +++ b/arch/arm64/kernel/vmlinux.lds.S
> @@ -368,6 +368,9 @@ SECTIONS
>
> STABS_DEBUG
> DWARF_DEBUG
> +#ifdef CONFIG_PROPELLER_CLANG
> + .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
I would prefer to take the opportunity to consolidate this into
include/asm-generic/vmlinux.lds.h with something like this:
| diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
| index 44a42e7c66cf..8aaf404980a7 100644
| --- a/arch/arm64/kernel/vmlinux.lds.S
| +++ b/arch/arm64/kernel/vmlinux.lds.S
| @@ -368,9 +368,7 @@ SECTIONS
|
| STABS_DEBUG
| DWARF_DEBUG
| -#ifdef CONFIG_PROPELLER_CLANG
| - .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
| -#endif
| + PROPELLER_DATA
| MODINFO
| ELF_DETAILS
|
| diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
| index 4711a35e706c..d93611675d8a 100644
| --- a/arch/x86/kernel/vmlinux.lds.S
| +++ b/arch/x86/kernel/vmlinux.lds.S
| @@ -423,9 +423,7 @@ SECTIONS
|
| STABS_DEBUG
| DWARF_DEBUG
| -#ifdef CONFIG_PROPELLER_CLANG
| - .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
| -#endif
| + PROPELLER_DATA
|
| MODINFO
| ELF_DETAILS
| diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
| index 60c8c22fd3e4..7a157a1320b9 100644
| --- a/include/asm-generic/vmlinux.lds.h
| +++ b/include/asm-generic/vmlinux.lds.h
| @@ -1011,6 +1011,13 @@
| #define PERCPU_DECRYPTED_SECTION
| #endif
|
| +#ifdef CONFIG_PROPELLER_CLANG
| +#define PROPELLER_DATA \
| + .llvm_bb_addr_map : { *(.llvm_bb_addr_map) }
| +#else
| +#define PROPELLER_DATA
| +#endif
| +
|
| /*
| * Default discarded sections.
That keeps the ifdef in one place and makes it easy to add this to other
architecture linker scripts as they gain support for Propeller. Are
there any other architectures that need this added? Or are arm64 and
x86_64 the only supported architectures?
--
Cheers,
Nathan