Subject: linux-next: manual merge of the kspp tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Fri, 11 Jun 2021 16:17:46 +1000

Hi all,

Today's linux-next merge of the kspp tree got a conflict in:

  arch/x86/Makefile

between commit:

  0024430e920f ("x86/build: Fix location of '-plugin-opt=' flags")

from Linus' tree and commit:

  095f63b94205 ("x86, lto: Pass -stack-alignment only on LLD < 13.0.0")

from the kspp tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/Makefile
index 2cea1ef283e3,84743ec97c05..000000000000
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@@ -197,12 -203,7 +197,13 @@@ ifdef CONFIG_RETPOLIN
    endif
  endif
  
 -KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE)
 +KBUILD_LDFLAGS += -m elf_$(UTS_MACHINE)
 +
 +ifdef CONFIG_LTO_CLANG
- KBUILD_LDFLAGS	+= -plugin-opt=-code-model=kernel \
- 		   -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
++ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 130000; echo $$?),0)
++KBUILD_LDFLAGS	+= -plugin-opt=-stack-alignment=$(if $(CONFIG_X86_32),4,8)
++endif
 +endif
  
  ifdef CONFIG_X86_NEED_RELOCS
  LDFLAGS_vmlinux := --emit-relocs --discard-none