public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.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>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: linux-next: manual merge of the tip tree with the kbuild tree
Date: Mon, 23 May 2022 15:47:58 +1000	[thread overview]
Message-ID: <20220523154758.11668628@canb.auug.org.au> (raw)
In-Reply-To: <20220523142431.10ff2f77@canb.auug.org.au>

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

Hi all,

On Mon, 23 May 2022 14:24:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the tip tree got a conflict in:
> 
>   scripts/Makefile.build
> 
> between commit:
> 
>   0212301af7bb ("kbuild: do not create *.prelink.o for Clang LTO or IBT")
> 
> from the kbuild tree and commit:
> 
>   753da4179d08 ("objtool: Remove --lto and --vmlinux in favor of --link")
> 
> from the tip tree.
> 
> I am not sure if I fixed this up correctly, please check the final result
> when linux-next is released.
> 
> I fixed it up (I used the former version) 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.

That produced may warnings :-(   so I tried the below resolution instead.

-- 
Cheers,
Stephen Rothwell

70023a983b831421d2bac71f46b94bce024a147b
diff --cc scripts/Makefile.build
index 48712bfc8740,f89d3fcff39f..cbe9b45e7b7d
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@@ -226,18 -244,23 +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 = \
@@@ -404,24 -464,32 +409,25 @@@ $(obj)/modules.order: $(obj-m) FORC
  #
  # Rule to compile a set of .o files into one .a file (with symbol table)
  #
 -quiet_cmd_ar_lib = AR      $@
 -      cmd_ar_lib = $(cmd_update_lto_symversions); $(cmd_ar)
  
  $(obj)/lib.a: $(lib-y) FORCE
 -	$(call if_changed,ar_lib)
 -
 -# NOTE:
 -# Do not replace $(filter %.o,^) with $(real-prereqs). When a single object
 -# module is turned into a multi object module, $^ will contain header file
 -# dependencies recorded in the .*.cmd file.
 -ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),)
 -quiet_cmd_link_multi-m = AR [M]  $@
 -cmd_link_multi-m =						\
 -	$(cmd_update_lto_symversions);				\
 -	rm -f $@; 						\
 -	$(AR) cDPrsT $@ $(filter %.o,$^)
 -else
 -quiet_cmd_link_multi-m = LD [M]  $@
 -      cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^)
 -endif
 +	$(call if_changed,ar)
 +
 +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): FORCE
 -	$(call if_changed,link_multi-m)
 +$(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_rule,ld_multi_m)
  $(call multi_depend, $(multi-obj-m), .o, -objs -y -m)
  
 -targets += $(multi-obj-m)
  targets := $(filter-out $(PHONY), $(targets))
  
  # Add intermediate targets:

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

  parent reply	other threads:[~2022-05-23  5:48 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23  4:24 linux-next: manual merge of the tip tree with the kbuild tree Stephen Rothwell
2022-05-23  5:37 ` Masahiro Yamada
2022-05-23  5:46   ` Stephen Rothwell
2022-05-23  5:47 ` Stephen Rothwell [this message]
2022-05-23 16:23   ` Josh Poimboeuf
2022-05-27  2:19     ` Masahiro Yamada
2022-05-27  4:47       ` Josh Poimboeuf
2022-05-27  6:04         ` Masahiro Yamada
2022-05-27 12:18           ` Masahiro Yamada
2022-05-27 14:59           ` Josh Poimboeuf
  -- strict thread matches above, loose matches on Subject: below --
2024-11-12  2:01 Stephen Rothwell
2024-11-12  9:27 ` Peter Zijlstra
2024-11-21  0:53 ` Stephen Rothwell
2024-05-17  1:30 Stephen Rothwell
2020-09-25  5:25 Stephen Rothwell
2020-10-15  1:57 ` Stephen Rothwell
2019-02-26  2:48 Stephen Rothwell
2018-12-20  4:57 Stephen Rothwell
2018-08-06  4:47 Stephen Rothwell
2018-08-14 23:26 ` Stephen Rothwell
2017-06-23  3:50 Stephen Rothwell
2017-07-03  1:08 ` Stephen Rothwell
2016-09-06  3:43 Stephen Rothwell
2013-02-18  3:35 Stephen Rothwell
2013-02-18  6:31 ` H. Peter Anvin
2012-05-07  5:10 Stephen Rothwell
2012-05-07 19:25 ` Michal Marek
2012-05-07 20:24 ` Sam Ravnborg
2011-05-20  3:36 Stephen Rothwell
2011-05-20  3:54 ` Steven Rostedt
2010-07-01  4:05 Stephen Rothwell

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=20220523154758.11668628@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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