From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1FySvj-00003A-1p for garchives@archives.gentoo.org; Thu, 06 Jul 2006 12:26:03 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k66CNhrC007660; Thu, 6 Jul 2006 12:23:43 GMT Received: from smtp-out5.blueyonder.co.uk (smtp-out5.blueyonder.co.uk [195.188.213.8]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k66CJAl3025088 for ; Thu, 6 Jul 2006 12:19:10 GMT Received: from [172.23.170.147] (helo=anti-virus03-10) by smtp-out5.blueyonder.co.uk with smtp (Exim 4.52) id 1FySp3-0006UE-LE for gentoo-dev@lists.gentoo.org; Thu, 06 Jul 2006 13:19:09 +0100 Received: from [82.41.57.20] (helo=snowdrop.home) by asmtp-out2.blueyonder.co.uk with esmtpa (Exim 4.52) id 1FySp3-0005P1-0c for gentoo-dev@lists.gentoo.org; Thu, 06 Jul 2006 13:19:09 +0100 Date: Thu, 6 Jul 2006 13:19:05 +0100 From: Ciaran McCreesh To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Replacing cpu-feature USE flags Message-ID: <20060706131905.3ba12b49@snowdrop.home> In-Reply-To: <200607061252.33028@enterprise.flameeyes.is-a-geek.org> References: <200607061252.33028@enterprise.flameeyes.is-a-geek.org> X-Mailer: Sylpheed-Claws 2.3.1 (GTK+ 2.8.19; i686-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id k66CNht2007660 X-Archives-Salt: cb65f1b3-96db-4b3e-8e89-d9f364805130 X-Archives-Hash: e78dcefabc24ad45b3f599ec80ec76e9 On Thu, 6 Jul 2006 12:52:29 +0200 "Diego 'Flameeyes' Petten=C3=B2" wrote: | Right now we have mmx, 3dnow, 3dnowex, sse, sse2 and so on useflags | present in the tree, almost never used to get new dependencies, but | usually used to supply econf switches. |=20 | This works as long as the user enable the flags, but for AMD64 the | story was, until now, that we simply enabled them when they worked, | because we had some minimum support available. Unfortunately this | became a problem with the introduction of nocona, because that is an | amd64-like system but with no 3dnow. And there is the problem that | sse3 is supported only in later versions of Athlon64 and so on. The other option here... Is to rename the x86 flags to x86_mmx, x86_3dnow etc, and use amd64_sse3 for amd64 flags, since they're not really the same as the x86 flags. There's probably some USE_EXPAND trickery that can be used here... CPU_FEATURE_X86=3D"mmx sse" -> cpu_feature_x86_mmx etc might be cleaner? | To try to clean up this mess, and to make it simpler to work in=20 | cross-compilation, I thought of using the definitions created by the | C Preprocessor (CPP) by default for the given CFLAGS. Basically when=20 | using -march=3Dathlon64, the preprocessor will enable a few definitions | that tells the availability of MMX, 3dNOW, SSE and so on... if we | wrap that around, we can use it to know if it's the case of enabling | something or not. This is customisable by the user by setting the | CFLAGS themselves. If one does not want MMX instructions to be | generated, but still want the rest of Athlon64 optimisations, it's | simply the matter of using "-march=3Dathlon64 -mno-mmx". Sounds rather flaky and unreliable... | SPARC team: I'd like to know if VIS does a similar thing, would make | simpler for instance its handling in xine-lib ebuild. VIS is present on all v9 CPUs. GCC's VIS support, however, sucks. --=20 Ciaran McCreesh Mail : ciaran dot mccreesh at blueyonder.co.uk --=20 gentoo-dev@gentoo.org mailing list