1 |
dirtyepic 13/12/28 08:52:36 |
2 |
|
3 |
Modified: ChangeLog toolchain.eclass |
4 |
Log: |
5 |
Use version ranges instead of case statements in gcc_do_filter_flags(). |
6 |
|
7 |
Revision Changes Path |
8 |
1.1097 eclass/ChangeLog |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1097&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1097&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1096&r2=1.1097 |
13 |
|
14 |
Index: ChangeLog |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v |
17 |
retrieving revision 1.1096 |
18 |
retrieving revision 1.1097 |
19 |
diff -u -r1.1096 -r1.1097 |
20 |
--- ChangeLog 28 Dec 2013 08:11:41 -0000 1.1096 |
21 |
+++ ChangeLog 28 Dec 2013 08:52:36 -0000 1.1097 |
22 |
@@ -1,6 +1,9 @@ |
23 |
# ChangeLog for eclass directory |
24 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1096 2013/12/28 08:11:41 dirtyepic Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1097 2013/12/28 08:52:36 dirtyepic Exp $ |
27 |
+ |
28 |
+ 28 Dec 2013; Ryan Hill <dirtyepic@g.o> toolchain.eclass: |
29 |
+ Use version ranges instead of case statements in gcc_do_filter_flags(). |
30 |
|
31 |
28 Dec 2013; Ryan Hill <dirtyepic@g.o> toolchain.eclass: |
32 |
Add tc_version_is_between() helper. |
33 |
|
34 |
|
35 |
|
36 |
1.614 eclass/toolchain.eclass |
37 |
|
38 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.614&view=markup |
39 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?rev=1.614&content-type=text/plain |
40 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/toolchain.eclass?r1=1.613&r2=1.614 |
41 |
|
42 |
Index: toolchain.eclass |
43 |
=================================================================== |
44 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v |
45 |
retrieving revision 1.613 |
46 |
retrieving revision 1.614 |
47 |
diff -u -r1.613 -r1.614 |
48 |
--- toolchain.eclass 28 Dec 2013 08:11:41 -0000 1.613 |
49 |
+++ toolchain.eclass 28 Dec 2013 08:52:36 -0000 1.614 |
50 |
@@ -1,6 +1,6 @@ |
51 |
# Copyright 1999-2013 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.613 2013/12/28 08:11:41 dirtyepic Exp $ |
54 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.614 2013/12/28 08:52:36 dirtyepic Exp $ |
55 |
|
56 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
57 |
|
58 |
@@ -1195,7 +1195,6 @@ |
59 |
|
60 |
gcc_do_filter_flags() { |
61 |
strip-flags |
62 |
- |
63 |
replace-flags -O? -O2 |
64 |
|
65 |
# dont want to funk ourselves |
66 |
@@ -1203,66 +1202,58 @@ |
67 |
|
68 |
filter-flags '-frecord-gcc-switches' # 490738 |
69 |
|
70 |
- case ${GCC_BRANCH_VER} in |
71 |
- 3.2|3.3) |
72 |
- replace-cpu-flags k8 athlon64 opteron x86-64 |
73 |
- replace-cpu-flags pentium-m pentium3m pentium3 |
74 |
- replace-cpu-flags G3 750 |
75 |
- replace-cpu-flags G4 7400 |
76 |
- replace-cpu-flags G5 7400 |
77 |
+ if tc_version_is_between 3.2 3.4 ; then |
78 |
+ # XXX: this is so outdated it's barely useful, but it don't hurt... |
79 |
+ replace-cpu-flags k8 athlon64 opteron x86-64 |
80 |
+ replace-cpu-flags pentium-m pentium3m pentium3 |
81 |
+ replace-cpu-flags G3 750 |
82 |
+ replace-cpu-flags G4 7400 |
83 |
+ replace-cpu-flags G5 7400 |
84 |
|
85 |
- case $(tc-arch) in |
86 |
- amd64) |
87 |
- replace-cpu-flags core2 nocona |
88 |
- filter-flags '-mtune=*' |
89 |
- ;; |
90 |
- x86) |
91 |
- replace-cpu-flags core2 prescott |
92 |
- filter-flags '-mtune=*' |
93 |
- ;; |
94 |
- esac |
95 |
+ case $(tc-arch) in |
96 |
+ amd64) |
97 |
+ replace-cpu-flags core2 nocona |
98 |
+ filter-flags '-mtune=*' |
99 |
+ ;; |
100 |
+ x86) |
101 |
+ replace-cpu-flags core2 prescott |
102 |
+ filter-flags '-mtune=*' |
103 |
+ ;; |
104 |
+ esac |
105 |
|
106 |
- # XXX: should add a sed or something to query all supported flags |
107 |
- # from the gcc source and trim everything else ... |
108 |
- filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs |
109 |
- filter-flags -f{no-,}stack-protector{,-all} |
110 |
- filter-flags -fvisibility-inlines-hidden -fvisibility=hidden |
111 |
- ;; |
112 |
- 3.4|4.*) |
113 |
- case $(tc-arch) in |
114 |
- amd64|x86) |
115 |
- filter-flags '-mcpu=*' |
116 |
- ;; |
117 |
- alpha) |
118 |
- # https://bugs.gentoo.org/454426 |
119 |
- append-ldflags -Wl,--no-relax |
120 |
- ;; |
121 |
- sparc) |
122 |
- # temporary workaround for random ICEs reproduced by multiple users |
123 |
- # https://bugs.gentoo.org/457062 |
124 |
- [[ ${GCC_BRANCH_VER} == 4.6 || ${GCC_BRANCH_VER} == 4.7 ]] && \ |
125 |
- MAKEOPTS+=" -j1" |
126 |
- ;; |
127 |
- *-macos) |
128 |
- # http://gcc.gnu.org/PR25127 |
129 |
- [[ ${GCC_BRANCH_VER} == 4.0 || ${GCC_BRANCH_VER} == 4.1 ]] && \ |
130 |
- filter-flags '-mcpu=*' '-march=*' '-mtune=*' |
131 |
- ;; |
132 |
- esac |
133 |
- ;; |
134 |
- esac |
135 |
+ # XXX: should add a sed or something to query all supported flags |
136 |
+ # from the gcc source and trim everything else ... |
137 |
+ filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs |
138 |
+ filter-flags -f{no-,}stack-protector{,-all} |
139 |
+ filter-flags -fvisibility-inlines-hidden -fvisibility=hidden |
140 |
+ fi |
141 |
|
142 |
- case ${GCC_BRANCH_VER} in |
143 |
- 4.6) |
144 |
- case $(tc-arch) in |
145 |
- amd64|x86) |
146 |
+ if tc_version_is_at_least 3.4 ; then |
147 |
+ case $(tc-arch) in |
148 |
+ amd64|x86) |
149 |
+ filter-flags '-mcpu=*' |
150 |
+ if tc_version_is_between 4.6 4.7 ; then |
151 |
# https://bugs.gentoo.org/411333 |
152 |
# https://bugs.gentoo.org/466454 |
153 |
replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686 |
154 |
- ;; |
155 |
- esac |
156 |
- ;; |
157 |
- esac |
158 |
+ fi |
159 |
+ ;; |
160 |
+ alpha) |
161 |
+ # https://bugs.gentoo.org/454426 |
162 |
+ append-ldflags -Wl,--no-relax |
163 |
+ ;; |
164 |
+ sparc) |
165 |
+ # temporary workaround for random ICEs reproduced by multiple users |
166 |
+ # https://bugs.gentoo.org/457062 |
167 |
+ tc_version_is_between 4.6 4.8 && MAKEOPTS+=" -j1" |
168 |
+ ;; |
169 |
+ *-macos) |
170 |
+ # http://gcc.gnu.org/PR25127 |
171 |
+ tc_version_is_between 4.0 4.2 && \ |
172 |
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*' |
173 |
+ ;; |
174 |
+ esac |
175 |
+ fi |
176 |
|
177 |
strip-unsupported-flags |