Skip to content

Commit 0f6372e

Browse files
samitolvanenmasahir0y
authored andcommitted
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>
1 parent 0fa21cf commit 0f6372e

5 files changed

Lines changed: 1 addition & 9 deletions

File tree

arch/arm64/kernel/vdso/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
3131
ccflags-y += -DDISABLE_BRANCH_PROFILING
3232

3333
CFLAGS_REMOVE_vgettimeofday.o = $(CC_FLAGS_FTRACE) -Os $(CC_FLAGS_SCS) $(GCC_PLUGINS_CFLAGS)
34-
KBUILD_CFLAGS += $(DISABLE_LTO)
3534
KASAN_SANITIZE := n
3635
UBSAN_SANITIZE := n
3736
OBJECT_FILES_NON_STANDARD := y

arch/sparc/vdso/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Building vDSO images for sparc.
44
#
55

6-
KBUILD_CFLAGS += $(DISABLE_LTO)
7-
86
VDSO64-$(CONFIG_SPARC64) := y
97
VDSOCOMPAT-$(CONFIG_COMPAT) := y
108

arch/x86/entry/vdso/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ ARCH_REL_TYPE_ABS := R_X86_64_JUMP_SLOT|R_X86_64_GLOB_DAT|R_X86_64_RELATIVE|
99
ARCH_REL_TYPE_ABS += R_386_GLOB_DAT|R_386_JMP_SLOT|R_386_RELATIVE
1010
include $(srctree)/lib/vdso/Makefile
1111

12-
KBUILD_CFLAGS += $(DISABLE_LTO)
13-
1412
# Sanitizer runtimes are unavailable and cannot be linked here.
1513
KASAN_SANITIZE := n
1614
UBSAN_SANITIZE := n

kernel/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ KASAN_SANITIZE_kcov.o := n
3838
KCSAN_SANITIZE_kcov.o := n
3939
CFLAGS_kcov.o := $(call cc-option, -fno-conserve-stack) -fno-stack-protector
4040

41-
# cond_syscall is currently not LTO compatible
42-
CFLAGS_sys_ni.o = $(DISABLE_LTO)
43-
4441
obj-y += sched/
4542
obj-y += locking/
4643
obj-y += power/

scripts/Makefile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ endif
111111
# ---------------------------------------------------------------------------
112112

113113
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 $@ $<
115115

116116
$(obj)/%.s: $(src)/%.c FORCE
117117
$(call if_changed_dep,cc_s_c)

0 commit comments

Comments
 (0)