X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=scripts%2FMakefile.lib;h=54582673fc1a05e4e04dad3f863304f15b586090;hb=f1583cb1be35c23df60b1c39e3e7e6704d749d0b;hp=10950559b223b906ee73093f7da1fab1bc34db37;hpb=efc1fd601a751d39a189c3ebe14008aea69a5e37;p=linux-2.6-microblaze.git 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)),)