From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 78E21138247 for ; Sat, 28 Dec 2013 08:52:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CF58E0A02; Sat, 28 Dec 2013 08:52:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 643E5E0A02 for ; Sat, 28 Dec 2013 08:52:39 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3F55D33F76B for ; Sat, 28 Dec 2013 08:52:38 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2145) id D11D12004C; Sat, 28 Dec 2013 08:52:36 +0000 (UTC) From: "Ryan Hill (dirtyepic)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, dirtyepic@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog toolchain.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog toolchain.eclass X-VCS-Directories: eclass X-VCS-Committer: dirtyepic X-VCS-Committer-Name: Ryan Hill Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20131228085236.D11D12004C@flycatcher.gentoo.org> Date: Sat, 28 Dec 2013 08:52:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f48e66b9-d00f-4e88-878a-c14b833e5cea X-Archives-Hash: 7898b72eee1642d5e178f9a3f9f45da3 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 toolchain.eclass: + Use version ranges instead of case statements in gcc_do_filter_flags(). 28 Dec 2013; Ryan Hill 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 @@ -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