allmodconfig builds failing to link on arm64

Nathan Chancellor nathan at kernel.org
Wed Apr 13 08:04:46 PDT 2022


On Wed, Apr 13, 2022 at 10:26:14AM +0100, Will Deacon wrote:
> Hi Nathan,
> 
> On Fri, Apr 08, 2022 at 11:37:24AM -0700, Nathan Chancellor wrote:
> > On Fri, Apr 08, 2022 at 10:17:21AM -0700, Nathan Chancellor wrote:
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 57c4c995965f..1fd16faa7f31 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -175,8 +175,6 @@ config ARM64
> >  	select HAVE_DEBUG_KMEMLEAK
> >  	select HAVE_DMA_CONTIGUOUS
> >  	select HAVE_DYNAMIC_FTRACE
> > -	select HAVE_DYNAMIC_FTRACE_WITH_REGS \
> > -		if $(cc-option,-fpatchable-function-entry=2)
> >  	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \
> >  		if DYNAMIC_FTRACE_WITH_REGS
> >  	select HAVE_EFFICIENT_UNALIGNED_ACCESS
> > @@ -228,6 +226,17 @@ config ARM64
> >  	help
> >  	  ARM 64-bit (AArch64) Linux support.
> >  
> > +config CLANG_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS
> > +	def_bool CC_IS_CLANG
> > +	# https://github.com/ClangBuiltLinux/linux/issues/1507
> > +	depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
> > +	select HAVE_DYNAMIC_FTRACE_WITH_REGS
> > +
> > +config GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS
> > +	def_bool CC_IS_GCC
> > +	depends on $(cc-option,-fpatchable-function-entry=2)
> > +	select HAVE_DYNAMIC_FTRACE_WITH_REGS
> > +
> >  config 64BIT
> >  	def_bool y
> 
> FWIW, I can confirm that this fixes the problem for me:
> 
> Tested-by: Will Deacon <will at kernel.org.
> 
> Do you plan to post as a separate patch?

Yes, I will go ahead and type up a proper commit message and ship it
along shortly, thanks for the feedback!

Cheers,
Nathan



More information about the linux-arm-kernel mailing list