[PATCH v3 2/2] kconfig: Remove the architecture specific config for Propeller

Rong Xu xur at google.com
Mon Jun 1 11:18:27 PDT 2026


Thanks Nathan for the review! My response is inlined.

On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <nathan at kernel.org> wrote:
>
> On Wed, 27 May 2026 14:45:08 -0700, xur at google.com <xur at google.com> 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 '' 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.

Thanks for catching this. Yes. -fbasic-block-address-map currently
only supports Arm64 and X86_64 as of now.
We thought people would only enable this config if they knew Propeller
was supported on that architecture.
But the allmodconfig build breaks this assumption.  I think I have to
keep this config for propeller, and make arm64 opt-in.

>
>   | $ 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?

I think keep ARCH_SUPPORTS_PROPELLER_CLANG is cleaner.

>
> >
> > 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?

I think this is good idea to move to vmlinux.lds.h. I'll change the
patch accordingly.

>
> --
> Cheers,
> Nathan
>



More information about the linux-arm-kernel mailing list