aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2014-02-08 03:01:05 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2014-02-13 23:21:57 -0500
commit67424d5a22124fa2d115faa8f32d12506989628f (patch)
tree602e76a0a1435121e14f7388d2b4bedf3c7f4c0e /arch/x86
parent634676c203f130c8efa138296c2efba219821346 (diff)
x86, lto: Disable LTO for the x86 VDSO
The VDSO does not play well with LTO, so just disable LTO for it. Also pass a 32bit linker flag for the 32bit version. [ hpa: change braces to parens to match kernel Makefile style ] Signed-off-by: Andi Kleen <ak@linux.intel.com> Link: http://lkml.kernel.org/r/1391846481-31491-1-git-send-email-ak@linux.intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/vdso/Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index fd14be1d1472..9206ac7961a5 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -2,6 +2,8 @@
2# Building vDSO images for x86. 2# Building vDSO images for x86.
3# 3#
4 4
5KBUILD_CFLAGS += $(DISABLE_LTO)
6
5VDSO64-$(CONFIG_X86_64) := y 7VDSO64-$(CONFIG_X86_64) := y
6VDSOX32-$(CONFIG_X86_X32_ABI) := y 8VDSOX32-$(CONFIG_X86_X32_ABI) := y
7VDSO32-$(CONFIG_X86_32) := y 9VDSO32-$(CONFIG_X86_32) := y
@@ -35,7 +37,8 @@ export CPPFLAGS_vdso.lds += -P -C
35 37
36VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ 38VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
37 -Wl,--no-undefined \ 39 -Wl,--no-undefined \
38 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 40 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \
41 $(DISABLE_LTO)
39 42
40$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so 43$(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
41 44
@@ -127,7 +130,7 @@ vdso32.so-$(VDSO32-y) += sysenter
127vdso32-images = $(vdso32.so-y:%=vdso32-%.so) 130vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
128 131
129CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) 132CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
130VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1 133VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf_i386 -Wl,-soname=linux-gate.so.1
131 134
132# This makes sure the $(obj) subdirectory exists even though vdso32/ 135# This makes sure the $(obj) subdirectory exists even though vdso32/
133# is not a kbuild sub-make subdirectory. 136# is not a kbuild sub-make subdirectory.
@@ -181,7 +184,8 @@ quiet_cmd_vdso = VDSO $@
181 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ 184 -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \
182 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' 185 sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@'
183 186
184VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 187VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) \
188 $(LTO_CFLAGS)
185GCOV_PROFILE := n 189GCOV_PROFILE := n
186 190
187# 191#