public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Friedrich Oslage (bluebird)" <bluebird@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/glibc/files/eblits: common.eblit
Date: Tue, 23 Dec 2008 11:59:43 +0000	[thread overview]
Message-ID: <E1LF5vL-0004ac-Pi@stork.gentoo.org> (raw)

bluebird    08/12/23 11:59:43

  Modified:             common.eblit
  Log:
  Add support to optimize for UltraSPARC T1 and T2 cpus
  (Portage version: 2.2_rc18/cvs/Linux 2.6.28-rc9-00039-g4c75e14 i686)

Revision  Changes    Path
1.7                  sys-libs/glibc/files/eblits/common.eblit

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?r1=1.6&r2=1.7

Index: common.eblit
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- common.eblit	22 Jun 2008 14:05:56 -0000	1.6
+++ common.eblit	23 Dec 2008 11:59:43 -0000	1.7
@@ -1,6 +1,6 @@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.6 2008/06/22 14:05:56 bluebird Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.7 2008/12/23 11:59:43 bluebird Exp $
 
 # We need to be able to set alternative headers for
 # compiling for non-native platform
@@ -99,12 +99,27 @@
 			append-flags "-fcall-used-g6"
 			filter-flags "-mvis"
 
+			GLIBCMAJOR=$(get_version_component_range 1 ${PV})
+			GLIBCMINOR=$(get_version_component_range 2 ${PV})
+
+			# set CTARGET_OPT so glibc can use cpu-specific .S files for better performance
+			# - UltraSPARC T1 (niagara) support requires >= glibc 2.8
+			# - UltraSPARC T2 (niagara2) support requires >= glibc 2.7
+
 			if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
 				case ${ABI} in
 					sparc64)
 						filter-flags -Wa,-xarch -Wa,-A
 
-						if is-flag "-mcpu=ultrasparc3"; then
+						if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
+							CTARGET_OPT="sparc64v2-unknown-linux-gnu"
+							append-flags "-Wa,-xarch=v9b"
+							export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
+						elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
+							CTARGET_OPT="sparc64v-unknown-linux-gnu"
+							append-flags "-Wa,-xarch=v9b"
+							export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
+						elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
 							CTARGET_OPT="sparc64b-unknown-linux-gnu"
 							append-flags "-Wa,-xarch=v9b"
 							export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
@@ -115,7 +130,11 @@
 						fi
 					;;
 					*)
-						if is-flag "-mcpu=ultrasparc3"; then
+						if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
+							CTARGET_OPT="sparcv9v2-unknown-linux-gnu"
+						elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
+							CTARGET_OPT="sparcv9v-unknown-linux-gnu"
+						elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
 							CTARGET_OPT="sparcv9b-unknown-linux-gnu"
 						else
 							CTARGET_OPT="sparcv9-unknown-linux-gnu"
@@ -123,9 +142,13 @@
 					;;
 				esac
 			else
-				if is-flag "-mcpu=ultrasparc3"; then
+				if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
+					CTARGET_OPT="sparcv9v2-unknown-linux-gnu"
+				elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
+					CTARGET_OPT="sparcv9v-unknown-linux-gnu"
+				elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
 					CTARGET_OPT="sparcv9b-unknown-linux-gnu"
-				elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
+				elif { is_crosscompile && want_nptl; } || is-flagq "-mcpu=ultrasparc2" || is-flagq "-mcpu=ultrasparc"; then
 					CTARGET_OPT="sparcv9-unknown-linux-gnu"
 				fi
 			fi






             reply	other threads:[~2008-12-23 11:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 11:59 Friedrich Oslage (bluebird) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-30  5:28 [gentoo-commits] gentoo-x86 commit in sys-libs/glibc/files/eblits: common.eblit Mike Frysinger (vapier)
2015-05-30  4:30 Mike Frysinger (vapier)
2014-10-18 23:09 Mike Frysinger (vapier)
2014-09-10 19:15 Mike Frysinger (vapier)
2014-08-21 13:59 Mike Frysinger (vapier)
2014-07-28  5:46 Mike Frysinger (vapier)
2014-06-14  8:07 Ryan Hill (rhill)
2014-01-16 17:38 Mike Frysinger (vapier)
2014-01-10 15:18 Magnus Granberg (zorry)
2014-01-05  3:11 Mike Gilbert (floppym)
2013-10-30 17:04 Mike Frysinger (vapier)
2012-08-10 19:44 Mike Frysinger (vapier)
2012-06-19 22:06 Mike Frysinger (vapier)
2011-11-17 21:22 Mike Frysinger (vapier)
2011-08-19 23:03 Mike Frysinger (vapier)
2011-03-20 22:39 Mike Frysinger (vapier)
2011-03-20 21:28 Mike Frysinger (vapier)
2011-03-20 21:25 Mike Frysinger (vapier)
2011-03-18 20:24 Mike Frysinger (vapier)
2011-03-10  8:04 Mike Frysinger (vapier)
2011-03-10  7:35 Mike Frysinger (vapier)
2011-03-10  6:50 Mike Frysinger (vapier)
2011-03-09  8:10 Mike Frysinger (vapier)
2010-06-16  1:43 Magnus Granberg (zorry)
2009-12-01  4:57 Mike Frysinger (vapier)
2009-01-28 18:11 Mike Frysinger (vapier)
2008-06-22 14:05 Friedrich Oslage (bluebird)
2007-11-18  3:28 Mike Frysinger (vapier)
2007-10-10 19:52 Mike Frysinger (vapier)
2007-10-07  3:18 Mike Frysinger (vapier)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LF5vL-0004ac-Pi@stork.gentoo.org \
    --to=bluebird@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox