public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Masahiro Yamada <masahiroy@kernel•org>
Cc: Josh Poimboeuf <jpoimboe@redhat•com>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead•org>
Subject: linux-next: manual merge of the kbuild tree with Linus' tree
Date: Fri, 27 May 2022 10:08:44 +1000	[thread overview]
Message-ID: <20220527100844.2f8ded56@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3285 bytes --]

Hi all,

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

  scripts/Makefile.build

between commit:

  753da4179d08 ("objtool: Remove --lto and --vmlinux in favor of --link")

from Linus' tree and commits:

  3eec672cbc9b ("kbuild: do not create *.prelink.o for Clang LTO or IBT")
  7414d89fd7cd ("kbuild: make *.mod rule robust against too long argument error")

from the kbuild 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 scripts/Makefile.build
index 06400504150b,1754adba7010..000000000000
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@@ -226,23 -226,18 +230,19 @@@ objtool_args =								
  cmd_objtool = $(if $(objtool-enabled), ; $(objtool) $(objtool_args) $@)
  cmd_gen_objtooldep = $(if $(objtool-enabled), { echo ; echo '$@: $$(wildcard $(objtool))' ; } >> $(dot-target).cmd)
  
 -endif # CONFIG_STACK_VALIDATION
 +endif # CONFIG_OBJTOOL
  
- ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),)
- 
- # Skip objtool for LLVM bitcode
- $(obj)/%.o: objtool-enabled :=
- 
- else
  
  # 'OBJECT_FILES_NON_STANDARD := y': skip objtool checking for a directory
  # 'OBJECT_FILES_NON_STANDARD_foo.o := 'y': skip objtool checking for a file
  # 'OBJECT_FILES_NON_STANDARD_foo.o := 'n': override directory skip for a file
  
- $(obj)/%.o: objtool-enabled = $(if $(filter-out y%, \
- 	$(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y)
+ is-standard-object = $(if $(filter-out y%, $(OBJECT_FILES_NON_STANDARD_$(basetarget).o)$(OBJECT_FILES_NON_STANDARD)n),y)
  
- endif
+ delay-objtool := $(or $(CONFIG_LTO_CLANG),$(CONFIG_X86_KERNEL_IBT))
+ 
+ $(obj)/%.o: objtool-enabled = $(if $(is-standard-object),$(if $(delay-objtool),$(is-single-obj-m),y))
++$(obj)/%.o: linked-object := y
  
  ifdef CONFIG_TRIM_UNUSED_KSYMS
  cmd_gen_ksymdeps = \
@@@ -421,18 -408,18 +413,19 @@@ $(obj)/modules.order: $(obj-m) FORC
  $(obj)/lib.a: $(lib-y) FORCE
  	$(call if_changed,ar)
  
- ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),)
- quiet_cmd_link_multi-m = AR [M]  $@
- cmd_link_multi-m =						\
- 	rm -f $@; 						\
- 	$(AR) cDPrsT $@ @$(patsubst %.o,%.mod,$@)
- else
- quiet_cmd_link_multi-m = LD [M]  $@
-       cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ @$(patsubst %.o,%.mod,$@)
- endif
+ quiet_cmd_ld_multi_m = LD [M]  $@
+       cmd_ld_multi_m = $(LD) $(ld_flags) -r -o $@ @$(patsubst %.o,%.mod,$@) $(cmd_objtool)
+ 
+ define rule_ld_multi_m
+ 	$(call cmd_and_savecmd,ld_multi_m)
+ 	$(call cmd,gen_objtooldep)
+ endef
  
+ $(multi-obj-m): objtool-enabled := $(delay-objtool)
+ $(multi-obj-m): part-of-module := y
++$(multi-obj-m): linked-object := y
  $(multi-obj-m): %.o: %.mod FORCE
- 	$(call if_changed,link_multi-m)
+ 	$(call if_changed_rule,ld_multi_m)
  $(call multi_depend, $(multi-obj-m), .o, -objs -y -m)
  
  targets := $(filter-out $(PHONY), $(targets))

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2022-05-27  0:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27  0:08 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-10-06 18:16 linux-next: manual merge of the kbuild tree with Linus' tree Stephen Rothwell
2022-04-03 22:09 Stephen Rothwell
2021-04-26 23:02 Stephen Rothwell
2021-02-22 22:24 Stephen Rothwell
2020-06-04 22:59 Stephen Rothwell
2019-05-01 22:46 Stephen Rothwell
2017-05-02 22:14 Stephen Rothwell
2016-09-12  1:32 Stephen Rothwell
2016-09-12  2:53 ` Nicholas Piggin
2016-09-12  9:03   ` Michal Marek
2016-09-12 23:39     ` Stephen Rothwell
2016-09-13  4:02       ` Stephen Rothwell
2016-09-13  4:09         ` Nicholas Piggin
2016-09-13  7:48         ` Arnd Bergmann
2016-09-13  9:12           ` Nicholas Piggin
2016-07-28  1:50 Stephen Rothwell
2015-07-02  0:30 Stephen Rothwell
2015-07-02  6:47 ` Geert Uytterhoeven
2015-07-02  7:17   ` Michal Marek
2015-07-02  9:18     ` Geert Uytterhoeven
2015-07-02 19:53       ` Michal Marek
2015-07-03 11:56         ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220527100844.2f8ded56@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=jpoimboe@redhat$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=masahiroy@kernel$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox