rpms/kernel/devel build-with-fno-dwarf2-cfi-asm.patch, NONE, 1.1 kernel.spec, 1.1326, 1.1327
Kyle McMartin
kyle at fedoraproject.org
Tue Feb 24 06:59:59 UTC 2009
Author: kyle
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17719
Modified Files:
kernel.spec
Added Files:
build-with-fno-dwarf2-cfi-asm.patch
Log Message:
* Tue Feb 24 2009 Kyle McMartin <kyle at redhat.com> 2.6.29-0.147.rc6
- Build the kernel (and modules via Kbuild) with -fno-dwarf2-cfi-asm.
Should resolve bz#486545. Thanks to aoliva@ for pointing out this way
to fix ppc64.
build-with-fno-dwarf2-cfi-asm.patch:
--- NEW FILE build-with-fno-dwarf2-cfi-asm.patch ---
From: Kyle McMartin <kyle at redhat.com>
On ppc64 (at least) gcc-4.4 is defaulting to generating .eh_frame
sections, which are, for the kernel, fairly pointless. Additionally, on
ppc64 this generates a relocation format which the kernel module loader
does not currently support (R_PPC64_REL32.)
Alexandre Oliva verifies that -fno-dwarf2-cfi-asm prevents this
.eh_frame section from being generated.
These seem to be used for unwinding, but it doesn't look like we
currently use them anywhere. (In fact, we explicitly dump them in the
x86_64 linker script.)
If these .eh_frame sections are eventually used, adding a per-arch
CONFIG_WANT_UNWIND check would be trivial.
(This was reported against Fedora, which appears to be the only distro
doing any building against gcc-4.4 at present: RH bz#486545.)
Signed-off-by: Kyle McMartin <kyle at redhat.com>
Cc: roland at redhat.com
Cc: aoliva at redhat.com
---
diff --git a/Makefile b/Makefile
index df6ce3e..d66a512 100644
--- a/Makefile
+++ b/Makefile
@@ -566,6 +566,11 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
# disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
+# gcc-4.4 defaults to generating .eh_frame sections, but we aren't
+# interested in those currently. additionally, it causes issues on some
+# architectures.
+KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
+
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
# But warn user when we do so
warn-assign = \
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1326
retrieving revision 1.1327
diff -u -r1.1326 -r1.1327
--- kernel.spec 24 Feb 2009 02:20:33 -0000 1.1326
+++ kernel.spec 24 Feb 2009 06:59:29 -0000 1.1327
@@ -579,6 +579,9 @@
# build tweak for build ID magic, even for -vanilla
Patch05: linux-2.6-makefile-after_link.patch
+# ppc64 goes kerspalt with .eh_frame
+Patch06: build-with-fno-dwarf2-cfi-asm.patch
+
%if !%{nopatches}
# revert upstream patches we get via other methods
@@ -992,6 +995,8 @@
ApplyPatch linux-2.6-makefile-after_link.patch
+ApplyPatch build-with-fno-dwarf2-cfi-asm.patch
+
#
# misc small stuff to make things compile
#
@@ -1745,6 +1750,11 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Tue Feb 24 2009 Kyle McMartin <kyle at redhat.com> 2.6.29-0.147.rc6
+- Build the kernel (and modules via Kbuild) with -fno-dwarf2-cfi-asm.
+ Should resolve bz#486545. Thanks to aoliva@ for pointing out this way
+ to fix ppc64.
+
* Mon Feb 23 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-0.146.rc6
- Enable MTRR sanitizer by default.
More information about the fedora-extras-commits
mailing list