From owner-svn-src-head@FreeBSD.ORG Wed Jan 5 12:29:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7DBD106566C; Wed, 5 Jan 2011 12:29:57 +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 86CBA8FC0A; Wed, 5 Jan 2011 12:29:57 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:b1c7:6e17:2223:c629] (unknown [IPv6:2001:7b8:3a7:0:b1c7:6e17:2223:c629]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6ECB95C5A; Wed, 5 Jan 2011 13:29:56 +0100 (CET) Message-ID: <4D246444.1060904@FreeBSD.org> Date: Wed, 05 Jan 2011 13:29:56 +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/20110104 Lanikai/3.1.8pre MIME-Version: 1.0 To: Alexander Best References: <201101042051.p04KpSGk054564@svn.freebsd.org> <20110105011635.GA4952@freebsd.org> In-Reply-To: <20110105011635.GA4952@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r216977 - in head/libexec/rtld-elf: amd64 i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 12:29:57 -0000 On 2011-01-05 02:16, Alexander Best wrote: > 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? I copied the order from sys/conf/kern.mk, lines 69 and 70: -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow \ -msoft-float -fno-asynchronous-unwind-tables I don't particularly care about the order, though. The order you found seems to be the historical order. If people prefer to have the same order everywhere, I'll fix it. > 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 The in-tree clang has support for these "-mno-xxx" options: -mno_3dnow -mno_3dnowa -mno_aes -mno_avx -mno_constant_cfstrings -mno_mmx -mno_omit_leaf_frame_pointer -mno_pascal_strings -mno_red_zone -mno_relax_all -mno_soft_float -mno_sse -mno_sse2 -mno_sse3 -mno_sse4 -mno_sse4_1 -mno_sse4_2 -mno_sse4a -mno_ssse3 -mno_thumb -mno_warn_nonportable_cfstrings so I think you just looked incorrectly. :) > since these extensions only get set in a hand full of files maybe special > cases for CC == clang can be added. I don't think it's necessary. Maybe there could be one central definition (say, in share/sys.mk) for the flags that disable all 'special' features, e.g. for amd64 and i386: CFLAGS_CONSERVATIVE=-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float Similar flags could be defined for other arches too. > also maybe you could have a look at the attached patch. i sent this to hackers@ > and nobody objected, but nobody wanted to commit the patch unfortunately. @@ -26,7 +26,6 @@ CFLAGS= -DBOOTPROG=\"gptboot\" \ -fno-unit-at-a-time \ -mno-align-long-strings \ -mrtd \ - -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ -DGPT \ -D${GPTBOOT_UFS} \ -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ Ehm, this looks wrong, those options should not be removed for anything in sys/boot. Boot programs should normally refrain from using any advanced CPU instructions. What did you want to achieve with this patch?