From f6768ecc3a663559c7e3e4c34080d306bfd7f9a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Wed, 8 Jun 2011 16:25:15 -0400 Subject: [PATCH] compile with gcc-4.6 --- kernel-2.6.spec | 2 ++ linux-2.6-11000-gcc-4.6.patch | 40 +++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 linux-2.6-11000-gcc-4.6.patch diff --git a/kernel-2.6.spec b/kernel-2.6.spec index a68db4c4e..8823eef39 100644 --- a/kernel-2.6.spec +++ b/kernel-2.6.spec @@ -684,6 +684,7 @@ Patch20: linux-2.6-680-htb-hysteresis-tso.patch Patch10000: linux-2.6-10000-gcc-4.5.patch Patch10001: linux-2.6-10001-gcc-4.6-warnoff.patch +Patch11000: linux-2.6-11000-gcc-4.6.patch # empty final patch file to facilitate testing of kernel patches Patch999999: linux-kernel-test.patch @@ -998,6 +999,7 @@ ApplyPatch linux-2.6-660-nmi-watchdog-default.patch ApplyPatch linux-2.6-680-htb-hysteresis-tso.patch ApplyPatch linux-2.6-10000-gcc-4.5.patch ApplyPatch linux-2.6-10001-gcc-4.6-warnoff.patch +ApplyPatch linux-2.6-11000-gcc-4.6.patch #### Planet-Lab #### ApplyOptionalPatch linux-kernel-test.patch diff --git a/linux-2.6-11000-gcc-4.6.patch b/linux-2.6-11000-gcc-4.6.patch new file mode 100644 index 000000000..38198bac8 --- /dev/null +++ b/linux-2.6-11000-gcc-4.6.patch @@ -0,0 +1,40 @@ +commit de2a8cf98ecdde25231d6c5e7901e2cffaf32af9 +Author: H. Peter Anvin +Date: Mon Dec 13 16:01:38 2010 -0800 + + x86, gcc-4.6: Use gcc -m options when building vdso + + The vdso Makefile passes linker-style -m options not to the linker but + to gcc. This happens to work with earlier gcc, but fails with gcc + 4.6. Pass gcc-style -m options, instead. + + Note: all currently supported versions of gcc supports -m32, so there + is no reason to conditionalize it any more. + + Reported-by: H. J. Lu + Signed-off-by: H. Peter Anvin + LKML-Reference: + Cc: + +diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile +index 4a2afa1..b6552b1 100644 +--- a/arch/x86/vdso/Makefile ++++ b/arch/x86/vdso/Makefile +@@ -25,7 +25,7 @@ targets += vdso.so vdso.so.dbg vdso.lds $(vobjs-y) + + export CPPFLAGS_vdso.lds += -P -C + +-VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -Wl,-soname=linux-vdso.so.1 \ ++VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ + -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 + + $(obj)/vdso.o: $(src)/vdso.S $(obj)/vdso.so +@@ -69,7 +69,7 @@ vdso32.so-$(VDSO32-y) += sysenter + vdso32-images = $(vdso32.so-y:%=vdso32-%.so) + + CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) +-VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -Wl,-soname=linux-gate.so.1 ++VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-soname=linux-gate.so.1 + + # This makes sure the $(obj) subdirectory exists even though vdso32/ + # is not a kbuild sub-make subdirectory. -- 2.43.0