Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 05 Jan 2011 13:29:56 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Alexander Best <arundel@freebsd.org>
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
Message-ID:  <4D246444.1060904@FreeBSD.org>
In-Reply-To: <20110105011635.GA4952@freebsd.org>
References:  <201101042051.p04KpSGk054564@svn.freebsd.org> <20110105011635.GA4952@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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?



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