diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-12-09 10:43:50 +0300 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2021-12-09 10:43:50 +0300 |
| commit | 5d8dfaa71d87f742c53309b95cb6a8b274119027 (patch) | |
| tree | 83fa5199868fb98dbe7dcb0791bc462bac77265b /scripts/Makefile.lib | |
| parent | 8c374ef45416281c7172dc29ed438dfb445795f1 (diff) | |
| parent | 8bb7eca972ad531c9b149c0a51ab43a417385813 (diff) | |
| download | linux-5d8dfaa71d87f742c53309b95cb6a8b274119027.tar.xz | |
Merge tag 'v5.15' into next
Sync up with the mainline to get the latest APIs and DT bindings.
Diffstat (limited to 'scripts/Makefile.lib')
| -rw-r--r-- | scripts/Makefile.lib | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 10950559b223..54582673fc1a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -225,17 +225,23 @@ dtc_cpp_flags = -Wp,-MMD,$(depfile).pre.tmp -nostdinc \ $(addprefix -I,$(DTC_INCLUDE)) \ -undef -D__DTS__ +ifeq ($(CONFIG_LTO_CLANG),y) +# With CONFIG_LTO_CLANG, .o files in modules might be LLVM bitcode, so we +# need to run LTO to compile them into native code (.lto.o) before further +# processing. +mod-prelink-ext := .lto +endif + # Objtool arguments are also needed for modfinal with LTO, so we define # then here to avoid duplication. objtool_args = \ $(if $(CONFIG_UNWINDER_ORC),orc generate,check) \ - $(if $(part-of-module), --module,) \ + $(if $(part-of-module), --module) \ $(if $(CONFIG_FRAME_POINTER),, --no-fp) \ - $(if $(or $(CONFIG_GCOV_KERNEL),$(CONFIG_LTO_CLANG)), \ - --no-unreachable,) \ - $(if $(CONFIG_RETPOLINE), --retpoline,) \ - $(if $(CONFIG_X86_SMAP), --uaccess,) \ - $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount,) + $(if $(CONFIG_GCOV_KERNEL)$(CONFIG_LTO_CLANG), --no-unreachable)\ + $(if $(CONFIG_RETPOLINE), --retpoline) \ + $(if $(CONFIG_X86_SMAP), --uaccess) \ + $(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount) # Useful for describing the dependency of composite objects # Usage: @@ -309,8 +315,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \ -Wno-alias_paths \ -Wno-graph_child_address \ -Wno-simple_bus_reg \ - -Wno-unique_unit_address \ - -Wno-pci_device_reg + -Wno-unique_unit_address endif ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),) |
