clang and -mfpmath=387 on ARCH=amd64

Alexander Best arundel at freebsd.org
Sat Dec 11 11:47:07 UTC 2010


hi there,

clang doesn't seem to make use of -mfpmath=387 on ARCH=amd64 and complains
about it (e.g. during TARGET=buildkernel).

any thoughts about the attached patch?

cheers.
alex

-- 
a13x
-------------- next part --------------
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 4d8636c..d5077ea 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -65,8 +65,11 @@ INLINE_LIMIT?=	15000
 # reserved for user applications.
 #
 .if ${MACHINE_CPUARCH} == "amd64"
+.if ${CC:T:Mclang} != "clang"
+CFLAGS+=	-mfpmath=387
+.endif
 CFLAGS+=	-mcmodel=kernel -mno-red-zone \
-		-mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \
+		-mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \
 		-msoft-float -fno-asynchronous-unwind-tables
 INLINE_LIMIT?=	8000
 .endif


More information about the freebsd-toolchain mailing list