summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-05-04 18:12:40 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-05-04 18:12:40 +0000
commit7eb056e10ae881bcae4d5224c048afdf310e2569 (patch)
treeba4a97c701c7b38ba0125af3121d4f879c7060d5 /sys-freebsd/freebsd-sources
parentRequire cssutils >=0.9.9 as reported in bug #413253, comment #2. (diff)
downloadgentoo-2-7eb056e10ae881bcae4d5224c048afdf310e2569.tar.gz
gentoo-2-7eb056e10ae881bcae4d5224c048afdf310e2569.tar.bz2
gentoo-2-7eb056e10ae881bcae4d5224c048afdf310e2569.zip
use debian GNU/kFreeBSD patch instead of a sed that lets the modules be built with -O2 for fixing panics on amd64 with gcc 4.4 and later
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)
Diffstat (limited to 'sys-freebsd/freebsd-sources')
-rw-r--r--sys-freebsd/freebsd-sources/ChangeLog7
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-9.0-disable-optimizations.patch30
-rw-r--r--sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild10
3 files changed, 40 insertions, 7 deletions
diff --git a/sys-freebsd/freebsd-sources/ChangeLog b/sys-freebsd/freebsd-sources/ChangeLog
index 3d9afe881437..90a496415671 100644
--- a/sys-freebsd/freebsd-sources/ChangeLog
+++ b/sys-freebsd/freebsd-sources/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-freebsd/freebsd-sources
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.68 2012/05/04 17:38:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/ChangeLog,v 1.69 2012/05/04 18:12:40 aballier Exp $
+
+ 04 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-sources-9.0.ebuild,
+ +files/freebsd-sources-9.0-disable-optimizations.patch:
+ use debian GNU/kFreeBSD patch instead of a sed that lets the modules be built
+ with -O2 for fixing panics on amd64 with gcc 4.4 and later
04 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-sources-9.0.ebuild:
build with -O1 on amd64-fbsd otherwise the kernel does not boot with gcc 4.4
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-9.0-disable-optimizations.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-9.0-disable-optimizations.patch
new file mode 100644
index 000000000000..6160a7b64dc0
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-9.0-disable-optimizations.patch
@@ -0,0 +1,30 @@
+Taken from debian GNU/kFreeBSD.
+
+Regretably, with GCC 4.4 or later this is the only flag combination
+I could find that doesn't cause kernel panics CPU triple-faults or
+other kind of severe breakage.
+
+--- a/sys/conf/kern.pre.mk
++++ b/sys/conf/kern.pre.mk
+@@ -41,6 +41,9 @@
+ .if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing)
+ COPTFLAGS+= -fno-strict-aliasing
+ .endif
++.if !empty(COPTFLAGS:M-O[23s])
++COPTFLAGS+= -O1
++.endif
+ .if !defined(NO_CPU_COPTFLAGS)
+ COPTFLAGS+= ${_CPUCFLAGS}
+ .endif
+--- a/sys/conf/kmod.mk
++++ b/sys/conf/kmod.mk
+@@ -91,6 +91,9 @@
+ .if !empty(CFLAGS:M-O[23s]) && empty(CFLAGS:M-fno-strict-aliasing)
+ CFLAGS+= -fno-strict-aliasing
+ .endif
++.if !empty(CFLAGS:M-O[23s])
++CFLAGS+= -O1
++.endif
+ WERROR?= -Werror
+ CFLAGS+= ${WERROR}
+ CFLAGS+= -D_KERNEL
diff --git a/sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild b/sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild
index 23eeb4b7254c..71e8c1f03901 100644
--- a/sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild
+++ b/sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild,v 1.5 2012/05/04 17:38:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sources/freebsd-sources-9.0.ebuild,v 1.6 2012/05/04 18:12:40 aballier Exp $
inherit bsdmk freebsd flag-o-matic
@@ -33,6 +33,9 @@ src_unpack() {
-e 's:^VERSION=.*:VERSION="${TYPE} ${BRANCH} ${REVISION}":' \
"${S}/conf/newvers.sh"
+ # workaround a kernel panic for amd64-fbsd, bug #408019
+ use amd64-fbsd && epatch "${FILESDIR}/${PN}-9.0-disable-optimizations.patch"
+
# __FreeBSD_cc_version comes from FreeBSD's gcc.
# on 9.0-RELEASE it's 900001.
sed -e "s:-D_KERNEL:-D_KERNEL -D__FreeBSD_cc_version=900001:g" \
@@ -56,11 +59,6 @@ src_unpack() {
# vop_whiteout to tmpfs, so it can be used as an overlay
# unionfs filesystem over the cd9660 readonly filesystem.
epatch "${FILESDIR}/${PN}-7.0-tmpfs_whiteout_stub.patch"
-
- # workaround a kernel panic for amd64-fbsd, bug #408019
- if use amd64-fbsd ; then
- sed -e "s:-O2:-O1:g" -i "${S}/conf/kern.pre.mk" || die
- fi
}
src_compile() {