]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
treewide: remove DISABLE_LTO
authorSami Tolvanen <samitolvanen@google.com>
Tue, 13 Oct 2020 00:31:45 +0000 (17:31 -0700)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 20 Oct 2020 15:28:53 +0000 (00:28 +0900)
This change removes all instances of DISABLE_LTO from
Makefiles, as they are currently unused, and the preferred
method of disabling LTO is to filter out the flags instead.

Note added by Masahiro Yamada:
DISABLE_LTO was added as preparation for GCC LTO, but GCC LTO was
not pulled into the mainline. (https://lkml.org/lkml/2014/4/8/272)

Suggested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
arch/arm64/kernel/vdso/Makefile
arch/sparc/vdso/Makefile
arch/x86/entry/vdso/Makefile
kernel/Makefile
scripts/Makefile.build

index 3dc4b65da99dc00636dbf71fa8941b3119888110..ce2bb6270a4ef57cefec0a1bb6dee1b0ff79c7b2 100644 (file)
@@ -31,7 +31,6 @@ ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
 ccflags-y += -DDISABLE_BRANCH_PROFILING
 
 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS)
-KBUILD_CFLAGS                  += $(DISABLE_LTO)
 KASAN_SANITIZE                 := n
 UBSAN_SANITIZE                 := n
 OBJECT_FILES_NON_STANDARD      := y
index 469dd23887abbed928f88b64ca36fcf2549756ae..c5e1545bc5cf9e7b1642723abec263fc953be046 100644 (file)
@@ -3,8 +3,6 @@
 # Building vDSO images for sparc.
 #
 
-KBUILD_CFLAGS += $(DISABLE_LTO)
-
 VDSO64-$(CONFIG_SPARC64)       := y
 VDSOCOMPAT-$(CONFIG_COMPAT)    := y
 
index ebba25ed9a38602d7f57cfdc9060273f15a2b432..21243747965d3ccc6a6cd28a4845e28a8e95721b 100644 (file)
@@ -9,8 +9,6 @@ ARCH_REL_TYPE_ABS := R_X86_64_JUMP_SLOT|R_X86_64_GLOB_DAT|R_X86_64_RELATIVE|
 ARCH_REL_TYPE_ABS += R_386_GLOB_DAT|R_386_JMP_SLOT|R_386_RELATIVE
 include $(srctree)/lib/vdso/Makefile
 
-KBUILD_CFLAGS += $(DISABLE_LTO)
-
 # Sanitizer runtimes are unavailable and cannot be linked here.
 KASAN_SANITIZE                 := n
 UBSAN_SANITIZE                 := n
index 9a20016d4900d12cbdbd400018b50b288b3c92ef..347254f07dab14df7f378501c9645e9c76ff5a8a 100644 (file)
@@ -38,9 +38,6 @@ KASAN_SANITIZE_kcov.o := n
 KCSAN_SANITIZE_kcov.o := n
 CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack) -fno-stack-protector
 
-# cond_syscall is currently not LTO compatible
-CFLAGS_sys_ni.o = $(DISABLE_LTO)
-
 obj-y += sched/
 obj-y += locking/
 obj-y += power/
index a467b93234424756b7528c463c65e4b3fbe64916..ae647379b57953d4b291b850f4712a5926d4400f 100644 (file)
@@ -111,7 +111,7 @@ endif
 # ---------------------------------------------------------------------------
 
 quiet_cmd_cc_s_c = CC $(quiet_modtag)  $@
-      cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) $(DISABLE_LTO) -fverbose-asm -S -o $@ $<
+      cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) -fverbose-asm -S -o $@ $<
 
 $(obj)/%.s: $(src)/%.c FORCE
        $(call if_changed_dep,cc_s_c)