From owner-svn-src-all@FreeBSD.ORG Wed Jan 5 13:00:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 331D41065749; Wed, 5 Jan 2011 13:00:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 026648FC08; Wed, 5 Jan 2011 13:00:27 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A8A4C46B39; Wed, 5 Jan 2011 08:00:26 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 55DAC8A009; Wed, 5 Jan 2011 08:00:25 -0500 (EST) From: John Baldwin To: Gleb Kurtsou Date: Wed, 5 Jan 2011 07:59:50 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20101102; KDE/4.4.5; amd64; ; ) References: <201101042051.p04KpSGk054564@svn.freebsd.org> <20110105011635.GA4952@freebsd.org> <20110105121910.GA1841@tops.skynet.lt> In-Reply-To: <20110105121910.GA1841@tops.skynet.lt> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201101050759.50877.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 05 Jan 2011 08:00:25 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Alexander Best , svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r216977 - in head/libexec/rtld-elf: amd64 i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 13:00:27 -0000 On Wednesday, January 05, 2011 7:19:10 am Gleb Kurtsou wrote: > On (05/01/2011 01:16), Alexander Best wrote: > > On Tue Jan 4 11, Dimitry Andric wrote: > > > Author: dim > > > Date: Tue Jan 4 20:51:28 2011 > > > New Revision: 216977 > > > URL: http://svn.freebsd.org/changeset/base/216977 > > > > > > Log: > > > On amd64 and i386, tell the compiler to refrain from generating SSE, > > > 3DNow, MMX and floating point instructions in rtld-elf. > > > > > > Otherwise, _rtld_bind() (and whatever it calls) could possibly clobber > > > function arguments that are passed in SSE/3DNow/MMX/FP registers, > > > usually floating point values. This can happen, for example, when clang > > > generates SSE code for memset() or memcpy() calls. > > > > the sorting order for these flags seems to be: > > > > -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 > > > > see 'grep -R "\-no-sse" /usr/src'. maybe the sorting order should stay > > consistent? > > > > also what's the status of clang? will these flags make sure that newer > > cpu extension won't be activated? i checked > > contrib/llvm/tools/clang/include/clang/Driver/Options.td > > and clang has support for: > > > > -m3dnowa > > -mssse3 > > -msse4a > > -msse4 > > -msse4_1 > > -msse4_2 > > -maes > > -mavx > > > > since these extensions only get set in a hand full of files maybe special > > cases for CC == clang can be added. > Why not to add NO_HWFLOAT knob (or similar) into makefile > infrastructure. And set CFLAGS accordingly, depending on CC, arch, etc. > These flags are getting rather common in tree. It strikes me that we really want clang/gcc to have some sort of '-mno-hwfloat' so we don't keep having to add new flags in the future. -- John Baldwin