Skip to content

Commit

Permalink
arm64: Only disable LTO for vDSO when Clang is used
Browse files Browse the repository at this point in the history
GCC LTO works fine on the vDSO.

Signed-off-by: Sultan Alsawaf <[email protected]>
  • Loading branch information
kerneltoast authored and Arjun-Ingole committed Jan 26, 2022
1 parent c86f409 commit 8a0e717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/kernel/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \
--build-id -n -T
ccflags-y := -fno-stack-protector
ccflags-y += -DDISABLE_BRANCH_PROFILING -ffixed-x18
ccflags-y += $(DISABLE_LTO)
ccflags-y += $(call cc-option, -fno-whole-program)

# Force -O2 to avoid libgcc dependencies
CFLAGS_REMOVE_vgettimeofday.o = -pg -Os
CFLAGS_vgettimeofday.o = -O2 -fPIC
ifneq ($(cc-name),clang)
ccflags-y += $(DISABLE_LTO)
CFLAGS_vgettimeofday.o += -mcmodel=tiny
endif

Expand Down

0 comments on commit 8a0e717

Please sign in to comment.