From owner-freebsd-toolchain@FreeBSD.ORG Sun Dec 12 19:17:31 2010 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7432106564A; Sun, 12 Dec 2010 19:17:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 68D068FC24; Sun, 12 Dec 2010 19:17:31 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:6456:15d6:3f8:ec76] (unknown [IPv6:2001:7b8:3a7:0:6456:15d6:3f8:ec76]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 4BAA85C43; Sun, 12 Dec 2010 20:17:29 +0100 (CET) Message-ID: <4D051FD1.7070100@FreeBSD.org> Date: Sun, 12 Dec 2010 20:17:37 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.14pre) Gecko/20101211 Lanikai/3.1.8pre MIME-Version: 1.0 To: Alexander Best References: <20101211114707.GA60390@freebsd.org> In-Reply-To: <20101211114707.GA60390@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-toolchain@freebsd.org Subject: Re: clang and -mfpmath=387 on ARCH=amd64 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 19:17:31 -0000 On 2010-12-11 12:47, Alexander Best wrote: > 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? I have compiled two GENERIC kernels on amd64 with and without the -mfpmath=386 option, and those resulted in exactly the same binaries (apart from the compilation timestamp). So I think the whole -mfpmath=387 option is nonsensical anyway. The comment just above those CFLAGS in sys/conf/kern.mk says: # For AMD64, we explicitly prohibit the use of FPU, SSE and other SIMD # operations inside the kernel itself. These operations are exclusively # reserved for user applications. However, according to the gcc manual, the -mfpmath option does *not* disable FPU instructions at all, but simply switches the default (for amd64) from SSE to 387 instructions: http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/i386-and-x86_002d64-Options.html#index-march-1052 Since -mno-sse is already specified, this flag may actually be worse than not specifying it at all! :) I suggest to just remove the entire -mfpmath=387 option unconditionally.