summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-debug-O2.patch')
-rw-r--r--sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-debug-O2.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-debug-O2.patch b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-debug-O2.patch
new file mode 100644
index 000000000000..4fa3565207ec
--- /dev/null
+++ b/sys-freebsd/freebsd-sources/files/freebsd-sources-7.2-debug-O2.patch
@@ -0,0 +1,27 @@
+My UltraSPARC U5 panics on boot about a memory alignment error when compiled
+with gcc4 and -O. Compiling with -O2 fixes this, and it should not adversly
+affect debugging.
+
+NOTE: This does not fix the memory alignment panic when loading kernel modules.
+
+Roy Marples (uberlord@gentoo.org)
+
+--- sys/conf/kern.pre.mk.old 2009-05-22 10:09:46 +0000
++++ sys/conf/kern.pre.mk 2009-05-22 10:10:27 +0000
+@@ -22,15 +22,13 @@
+ COPTFLAGS?= -O
+ .else
+ . if defined(DEBUG)
+-_MINUS_O= -O
+ CTFFLAGS+= -g
+ . else
+-_MINUS_O= -O2
+ . endif
+ . if ${MACHINE_ARCH} == "amd64"
+ COPTFLAGS?=-O2 -frename-registers -pipe
+ . else
+-COPTFLAGS?=${_MINUS_O} -pipe
++COPTFLAGS?=-O2 -pipe
+ . endif
+ . if !empty(COPTFLAGS:M-O[23s]) && empty(COPTFLAGS:M-fno-strict-aliasing)
+ COPTFLAGS+= -fno-strict-aliasing