Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 2010 11:47:07 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        freebsd-toolchain@freebsd.org
Subject:   clang and -mfpmath=387 on ARCH=amd64
Message-ID:  <20101211114707.GA60390@freebsd.org>

next in thread | raw e-mail | index | archive | help

--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kern.mk.diff"

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

--IJpNTDwzlM2Ie8A6--



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