Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2012 19:18:34 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r232933 - head/sys/conf
Message-ID:  <201203131918.q2DJIYBA058647@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue Mar 13 19:18:34 2012
New Revision: 232933
URL: http://svn.freebsd.org/changeset/base/232933

Log:
  Update comments and CFLAGS in sys/conf/kern.mk, introduced in r221879,
  to match reality: clang does _not_ disable SSE automatically when
  -mno-mmx is used, you have to specify -mno-sse explicitly.
  
  Note this was the case even before r232894, which only makes a change in
  the 'positive' flag case; e.g. when you specify -msse, MMX gets enabled
  too.
  
  MFC after:	1 week

Modified:
  head/sys/conf/kern.mk

Modified: head/sys/conf/kern.mk
==============================================================================
--- head/sys/conf/kern.mk	Tue Mar 13 18:59:19 2012	(r232932)
+++ head/sys/conf/kern.mk	Tue Mar 13 19:18:34 2012	(r232933)
@@ -46,16 +46,16 @@ CWARNEXTRA?=	-Wno-error-tautological-com
 # Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3
 #
 # clang:
-# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2,
-#                          -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
+# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa
+# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
 #
 .if ${MACHINE_CPUARCH} == "i386"
 .if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
-CFLAGS+=	-mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse
+CFLAGS+=	-mno-align-long-strings -mpreferred-stack-boundary=2
 .else
 CFLAGS+=	-mno-aes -mno-avx
 .endif
-CFLAGS+=	-mno-mmx -msoft-float
+CFLAGS+=	-mno-mmx -mno-sse -msoft-float
 INLINE_LIMIT?=	8000
 .endif
 
@@ -93,17 +93,15 @@ INLINE_LIMIT?=	15000
 # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387
 #
 # clang:
-# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2,
-#                          -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
+# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa
+# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42
 # (-mfpmath= is not supported)
 #
 .if ${MACHINE_CPUARCH} == "amd64"
-.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang"
-CFLAGS+=	-mno-sse
-.else
+.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"
 CFLAGS+=	-mno-aes -mno-avx
 .endif
-CFLAGS+=	-mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \
+CFLAGS+=	-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \
 		-fno-asynchronous-unwind-tables
 INLINE_LIMIT?=	8000
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203131918.q2DJIYBA058647>