1 commit de2a8cf98ecdde25231d6c5e7901e2cffaf32af9
2 Author: H. Peter Anvin <hpa@linux.intel.com>
3 Date: Mon Dec 13 16:01:38 2010 -0800
5 x86, gcc-4.6: Use gcc -m options when building vdso
7 The vdso Makefile passes linker-style -m options not to the linker but
8 to gcc. This happens to work with earlier gcc, but fails with gcc
9 4.6. Pass gcc-style -m options, instead.
11 Note: all currently supported versions of gcc supports -m32, so there
12 is no reason to conditionalize it any more.
14 Reported-by: H. J. Lu <hjl.tools@gmail.com>
15 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
16 LKML-Reference: <tip-*@git.kernel.org>
17 Cc: <stable@kernel.org>
19 diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
20 index 4a2afa1..b6552b1 100644
21 --- a/arch/x86/vdso/Makefile
22 +++ b/arch/x86/vdso/Makefile
23 @@ -25,7 +25,7 @@ targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y)
25 export CPPFLAGS_vdso.lds += -P -C
27 -VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -Wl,-soname=linux-vdso.so.1 \
28 +VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \
29 -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
31 $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so
32 @@ -69,7 +69,7 @@ vdso32.so-$(VDSO32-y) += sysenter
33 vdso32-images = $(vdso32.so-y:%=vdso32-%.so)
35 CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds)
36 -VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1
37 +VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1
39 # This makes sure the $(obj) subdirectory exists even though vdso32/
40 # is not a kbuild sub-make subdirectory.