Thanks Nathan for finding this out! We changed the propeller option with this patch: https://github.com/llvm/llvm-project/pull/110039 Currently, this patch is only in the ToT clang (v20) and not yet released in v19. I'll add a compiler version check to the patch: if the clang version >= 20, use the new option. If this patch is later released in v19.x clang, I'll have to update the check accordingly. If I don't hear objections, I'll send a fixup on top of Masahiro's branch. Thanks, -Rong On Thu, Nov 7, 2024 at 12:45 PM Nathan Chancellor <nathan@xxxxxxxxxx> wrote: > > Hi Rong, > > On Sat, Nov 02, 2024 at 10:51:14AM -0700, Rong Xu wrote: > > diff --git a/scripts/Makefile.propeller b/scripts/Makefile.propeller > > new file mode 100644 > > index 0000000000000..344190717e471 > > --- /dev/null > > +++ b/scripts/Makefile.propeller > > @@ -0,0 +1,28 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > + > > +# Enable available and selected Clang Propeller features. > > +ifdef CLANG_PROPELLER_PROFILE_PREFIX > > + CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=list=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt -ffunction-sections > > + KBUILD_LDFLAGS += --symbol-ordering-file=$(CLANG_PROPELLER_PROFILE_PREFIX)_ld_profile.txt --no-warn-symbol-ordering > > +else > > + CFLAGS_PROPELLER_CLANG := -fbasic-block-sections=labels > > +endif > > It appears that '-fbasic-block-sections=labels' has been deprecated in > the main branch of LLVM, as I see a warning repeated over and over when > building allmodconfig: > > clang: warning: argument '-fbasic-block-sections=labels' is deprecated, use '-fbasic-block-address-map' instead [-Wdeprecated] > > https://github.com/llvm/llvm-project/commit/7b7747dc1d3da1a829503ea9505b4cecce4f5bda > > Sorry that I missed this during testing, as I was only using clang-19 at > the time. > > I think you can send a fixup on top of Masahiro's branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/log/?h=kbuild > > > +# Propeller requires debug information to embed module names in the profiles. > > +# If CONFIG_DEBUG_INFO is not enabled, set -gmlt option. Skip this for AutoFDO, > > +# as the option should already be set. > > +ifndef CONFIG_DEBUG_INFO > > + ifndef CONFIG_AUTOFDO_CLANG > > + CFLAGS_PROPELLER_CLANG += -gmlt > > + endif > > +endif > > + > > +ifdef CONFIG_LTO_CLANG_THIN > > + ifdef CLANG_PROPELLER_PROFILE_PREFIX > > + KBUILD_LDFLAGS += --lto-basic-block-sections=$(CLANG_PROPELLER_PROFILE_PREFIX)_cc_profile.txt > > + else > > + KBUILD_LDFLAGS += --lto-basic-block-sections=labels > > I think this might have a similar problem but I have not tested. > > > + endif > > +endif > > + > > +export CFLAGS_PROPELLER_CLANG > > Cheers, > Nathan