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

From: Will Deacon <[email-masked]>
Date: Tue, 2 Jun 2026 10:43:18 +0100

On Mon, Jun 01, 2026 at 11:18:27AM -0700, Rong Xu wrote:
> On Fri, May 29, 2026 at 5:47 PM Nathan Chancellor <[email-masked]> wrote:
> > On Wed, 27 May 2026 14:45:08 -0700, [email-masked] <[email-masked]> 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.

I still don't think it has anything to do with the arch. If the compiler
supports the option, then we can use it. The arch code in the kernel
doesn't need to do anything, right? So can you just check if the
compiler accepts the option using a 'depends on $(cc-option, ...)' line?

Will