Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

treewide: remove DISABLE_LTO

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>

authored by

Sami Tolvanen and committed by
Masahiro Yamada
0f6372e5 0fa21cf4

+1 -9
-1
arch/arm64/kernel/vdso/Makefile
··· 31 31 ccflags-y += -DDISABLE_BRANCH_PROFILING 32 32 33 33 CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS) 34 - KBUILD_CFLAGS += $(DISABLE_LTO) 35 34 KASAN_SANITIZE := n 36 35 UBSAN_SANITIZE := n 37 36 OBJECT_FILES_NON_STANDARD := y
-2
arch/sparc/vdso/Makefile
··· 3 3 # Building vDSO images for sparc. 4 4 # 5 5 6 - KBUILD_CFLAGS += $(DISABLE_LTO) 7 - 8 6 VDSO64-$(CONFIG_SPARC64) := y 9 7 VDSOCOMPAT-$(CONFIG_COMPAT) := y 10 8
-2
arch/x86/entry/vdso/Makefile
··· 9 9 ARCH_REL_TYPE_ABS += R_386_GLOB_DAT|R_386_JMP_SLOT|R_386_RELATIVE 10 10 include $(srctree)/lib/vdso/Makefile 11 11 12 - KBUILD_CFLAGS += $(DISABLE_LTO) 13 - 14 12 # Sanitizer runtimes are unavailable and cannot be linked here. 15 13 KASAN_SANITIZE := n 16 14 UBSAN_SANITIZE := n
-3
kernel/Makefile
··· 38 38 KCSAN_SANITIZE_kcov.o := n 39 39 CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack) -fno-stack-protector 40 40 41 - # cond_syscall is currently not LTO compatible 42 - CFLAGS_sys_ni.o = $(DISABLE_LTO) 43 - 44 41 obj-y += sched/ 45 42 obj-y += locking/ 46 43 obj-y += power/
+1 -1
scripts/Makefile.build
··· 111 111 # --------------------------------------------------------------------------- 112 112 113 113 quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ 114 - cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< 114 + cmd_cc_s_c = $(CC) $(filter-out $(DEBUG_CFLAGS), $(c_flags)) -fverbose-asm -S -o $@ $< 115 115 116 116 $(obj)/%.s: $(src)/%.c FORCE 117 117 $(call if_changed_dep,cc_s_c)