public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ryan Hill (dirtyepic)" <dirtyepic@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog toolchain.eclass
Date: Sat, 28 Dec 2013 08:52:36 +0000 (UTC)	[thread overview]
Message-ID: <20131228085236.D11D12004C@flycatcher.gentoo.org> (raw)

dirtyepic    13/12/28 08:52:36

  Modified:             ChangeLog toolchain.eclass
  Log:
  Use version ranges instead of case statements in gcc_do_filter_flags().

Revision  Changes    Path
1.1097               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1097&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1097&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1096&r2=1.1097

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1096
retrieving revision 1.1097
diff -u -r1.1096 -r1.1097
--- ChangeLog	28 Dec 2013 08:11:41 -0000	1.1096
+++ ChangeLog	28 Dec 2013 08:52:36 -0000	1.1097
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1096 2013/12/28 08:11:41 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1097 2013/12/28 08:52:36 dirtyepic Exp $
+
+  28 Dec 2013; Ryan Hill <dirtyepic@gentoo.org> toolchain.eclass:
+  Use version ranges instead of case statements in gcc_do_filter_flags().
 
   28 Dec 2013; Ryan Hill <dirtyepic@gentoo.org> toolchain.eclass:
   Add tc_version_is_between() helper.



1.614                eclass/toolchain.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.614&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.614&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.613&r2=1.614

Index: toolchain.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v
retrieving revision 1.613
retrieving revision 1.614
diff -u -r1.613 -r1.614
--- toolchain.eclass	28 Dec 2013 08:11:41 -0000	1.613
+++ toolchain.eclass	28 Dec 2013 08:52:36 -0000	1.614
@@ -1,6 +1,6 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.613 2013/12/28 08:11:41 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.614 2013/12/28 08:52:36 dirtyepic Exp $
 
 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
 
@@ -1195,7 +1195,6 @@
 
 gcc_do_filter_flags() {
 	strip-flags
-
 	replace-flags -O? -O2
 
 	# dont want to funk ourselves
@@ -1203,66 +1202,58 @@
 
 	filter-flags '-frecord-gcc-switches' # 490738
 
-	case ${GCC_BRANCH_VER} in
-		3.2|3.3)
-			replace-cpu-flags k8 athlon64 opteron x86-64
-			replace-cpu-flags pentium-m pentium3m pentium3
-			replace-cpu-flags G3 750
-			replace-cpu-flags G4 7400
-			replace-cpu-flags G5 7400
+	if tc_version_is_between 3.2 3.4 ; then
+		# XXX: this is so outdated it's barely useful, but it don't hurt...
+		replace-cpu-flags k8 athlon64 opteron x86-64
+		replace-cpu-flags pentium-m pentium3m pentium3
+		replace-cpu-flags G3 750
+		replace-cpu-flags G4 7400
+		replace-cpu-flags G5 7400
 	
-			case $(tc-arch) in
-				amd64)
-					replace-cpu-flags core2 nocona
-					filter-flags '-mtune=*'
-					;;
-				x86)
-					replace-cpu-flags core2 prescott
-					filter-flags '-mtune=*'
-					;;
-			esac
+		case $(tc-arch) in
+			amd64)
+				replace-cpu-flags core2 nocona
+				filter-flags '-mtune=*'
+				;;
+			x86)
+				replace-cpu-flags core2 prescott
+				filter-flags '-mtune=*'
+				;;
+		esac
 
-			# XXX: should add a sed or something to query all supported flags
-			#      from the gcc source and trim everything else ...
-			filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs
-			filter-flags -f{no-,}stack-protector{,-all}
-			filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
-			;;
-		3.4|4.*)
-			case $(tc-arch) in
-				amd64|x86)
-					filter-flags '-mcpu=*'
-					;;
-				alpha)
-					# https://bugs.gentoo.org/454426
-					append-ldflags -Wl,--no-relax
-					;;
-				sparc)
-					# temporary workaround for random ICEs reproduced by multiple users
-					# https://bugs.gentoo.org/457062
-					[[ ${GCC_BRANCH_VER} == 4.6 || ${GCC_BRANCH_VER} == 4.7 ]] && \
-						MAKEOPTS+=" -j1"
-					;;
-				*-macos)
-					# http://gcc.gnu.org/PR25127
-					[[ ${GCC_BRANCH_VER} == 4.0 || ${GCC_BRANCH_VER} == 4.1 ]] && \
-						filter-flags '-mcpu=*' '-march=*' '-mtune=*'
-					;;
-			esac
-			;;
-	esac
+		# XXX: should add a sed or something to query all supported flags
+		#      from the gcc source and trim everything else ...
+		filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs
+		filter-flags -f{no-,}stack-protector{,-all}
+		filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
+	fi
 
-	case ${GCC_BRANCH_VER} in
-		4.6)
-			case $(tc-arch) in
-				amd64|x86)
+	if tc_version_is_at_least 3.4 ; then
+		case $(tc-arch) in
+			amd64|x86)
+				filter-flags '-mcpu=*'
+				if tc_version_is_between 4.6 4.7 ; then
 					# https://bugs.gentoo.org/411333
 					# https://bugs.gentoo.org/466454
 					replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686
-					;;
-			esac
-			;;
-	esac
+				fi
+				;;
+			alpha)
+				# https://bugs.gentoo.org/454426
+				append-ldflags -Wl,--no-relax
+				;;
+			sparc)
+				# temporary workaround for random ICEs reproduced by multiple users
+				# https://bugs.gentoo.org/457062
+				tc_version_is_between 4.6 4.8 && MAKEOPTS+=" -j1"
+				;;
+			*-macos)
+				# http://gcc.gnu.org/PR25127
+				tc_version_is_between 4.0 4.2 && \
+					filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+				;;
+		esac
+	fi
 
 	strip-unsupported-flags
 





             reply	other threads:[~2013-12-28  8:52 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-28  8:52 Ryan Hill (dirtyepic) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-02-10  7:22 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog toolchain.eclass Justin Lecher (jlec)
2015-02-10  0:46 Anthony G. Basile (blueness)
2015-02-10  0:34 Anthony G. Basile (blueness)
2015-02-05 23:28 Anthony G. Basile (blueness)
2014-11-04  8:04 Justin Lecher (jlec)
2014-08-05  1:41 Mike Gilbert (floppym)
2014-08-04 23:03 Magnus Granberg (zorry)
2014-06-01 23:00 Ryan Hill (rhill)
2014-05-21 21:30 Ryan Hill (rhill)
2014-05-21 20:39 Ryan Hill (rhill)
2014-05-20 10:41 Ryan Hill (rhill)
2014-05-20  7:39 Ryan Hill (rhill)
2014-05-15  5:18 Ryan Hill (rhill)
2014-03-16 18:38 Ryan Hill (rhill)
2014-02-05  6:18 Ryan Hill (dirtyepic)
2014-02-02 23:43 Ryan Hill (dirtyepic)
2014-01-24  4:13 Ryan Hill (dirtyepic)
2014-01-13  6:02 Ryan Hill (dirtyepic)
2014-01-10 13:59 Magnus Granberg (zorry)
2013-12-30  3:24 Ryan Hill (dirtyepic)
2013-12-28  9:12 Ryan Hill (dirtyepic)
2013-12-28  8:11 Ryan Hill (dirtyepic)
2013-12-28  3:48 Ryan Hill (dirtyepic)
2013-12-27 22:10 Ryan Hill (dirtyepic)
2013-12-23 21:41 Ryan Hill (dirtyepic)
2013-12-21 11:59 Ryan Hill (dirtyepic)
2013-12-19  6:00 Ryan Hill (dirtyepic)
2013-11-25  3:11 Ryan Hill (dirtyepic)
2013-11-09 10:05 Ryan Hill (dirtyepic)
2013-11-09  7:49 Ryan Hill (dirtyepic)
2013-11-07  3:19 Ryan Hill (dirtyepic)
2013-11-05  5:21 Ryan Hill (dirtyepic)
2013-10-15  5:36 Ryan Hill (dirtyepic)
2013-08-15  4:39 Ryan Hill (dirtyepic)
2013-08-10  7:41 Ryan Hill (dirtyepic)
2013-08-10  4:25 Ryan Hill (dirtyepic)
2013-07-24  1:34 Ryan Hill (dirtyepic)
2013-07-18 23:45 Ryan Hill (dirtyepic)
2013-05-15  5:42 Ryan Hill (dirtyepic)
2013-05-15  0:56 Ryan Hill (dirtyepic)
2013-05-15  0:55 Ryan Hill (dirtyepic)
2013-05-09  3:03 Ryan Hill (dirtyepic)
2013-04-05  5:23 Ryan Hill (dirtyepic)
2013-03-16  5:44 Ryan Hill (dirtyepic)
2013-01-15  2:30 Ryan Hill (dirtyepic)
2012-03-22  6:07 Ryan Hill (dirtyepic)
2012-03-10 21:21 Ryan Hill (dirtyepic)
2012-03-10 20:48 Ryan Hill (dirtyepic)
2012-03-10 20:01 Ryan Hill (dirtyepic)
2012-03-10 19:32 Ryan Hill (dirtyepic)
2012-03-10 17:49 Ryan Hill (dirtyepic)
2012-03-03  2:29 Ryan Hill (dirtyepic)
2012-02-20  7:18 Ryan Hill (dirtyepic)
2012-02-12 14:17 Magnus Granberg (zorry)
2012-01-17 16:05 Magnus Granberg (zorry)
2011-12-07  0:29 Ryan Hill (dirtyepic)
2011-11-21  1:43 Ryan Hill (dirtyepic)

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=20131228085236.D11D12004C@flycatcher.gentoo.org \
    --to=dirtyepic@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