kern.mk: Prevent gcc4.4 from generating SSSE3, SSE4 and AVX instructions
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 1 Mar 2011 15:39:08 +0000 (23:39 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 1 Mar 2011 15:36:44 +0000 (23:36 +0800)
sys/platform/pc32/conf/kern.mk
sys/platform/pc64/conf/kern.mk

index e876bc9..663429a 100644 (file)
 #
 CFLAGS+=       -mpreferred-stack-boundary=2
 CFLAGS+=       -fno-stack-protector
-CFLAGS+=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
+CFLAGS+=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
+
+.if ${CCVER} == "gcc44"
+CFLAGS+=       -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a \
+               -mno-sse5 
+CFLAGS+=       -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt
+.endif
+
+CFLAGS+=       -msoft-float
 
 INLINE_LIMIT=  8000
index 115d35e..d1a6951 100644 (file)
@@ -9,8 +9,17 @@
 # reserved for user applications.
 #
 CFLAGS+=       -mpreferred-stack-boundary=4
-CFLAGS+=       -mcmodel=kernel -mno-red-zone \
-               -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \
-               -msoft-float -fno-asynchronous-unwind-tables \
-               -fno-omit-frame-pointer
+CFLAGS+=       -mcmodel=kernel -mno-red-zone -mfpmath=387
+
+CFLAGS+=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
+
+.if ${CCVER} == "gcc44"
+CFLAGS+=       -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a \
+               -mno-sse5 
+CFLAGS+=       -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt
+.endif
+
+CFLAGS+=       -msoft-float
+CFLAGS+=       -fno-asynchronous-unwind-tables -fno-omit-frame-pointer
+
 INLINE_LIMIT?= 8000