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
This commit is contained in:
Dimitry Andric 2012-03-13 19:18:34 +00:00
parent cce345c2c9
commit 4391754075
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=232933

View File

@ -46,16 +46,16 @@ CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \
# 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