1 |
vapier 08/03/17 01:51:50 |
2 |
|
3 |
Modified: toolchain.eclass |
4 |
Log: |
5 |
add url/branding support for gcc-4.3+ |
6 |
|
7 |
Revision Changes Path |
8 |
1.347 eclass/toolchain.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?rev=1.347&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?rev=1.347&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/toolchain.eclass?r1=1.346&r2=1.347 |
13 |
|
14 |
Index: toolchain.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v |
17 |
retrieving revision 1.346 |
18 |
retrieving revision 1.347 |
19 |
diff -u -r1.346 -r1.347 |
20 |
--- toolchain.eclass 16 Feb 2008 22:27:51 -0000 1.346 |
21 |
+++ toolchain.eclass 17 Mar 2008 01:51:49 -0000 1.347 |
22 |
@@ -1,6 +1,6 @@ |
23 |
-# Copyright 1999-2007 Gentoo Foundation |
24 |
+# Copyright 1999-2008 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.346 2008/02/16 22:27:51 vapier Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.347 2008/03/17 01:51:49 vapier Exp $ |
28 |
# |
29 |
# Maintainer: Toolchain Ninjas <toolchain@g.o> |
30 |
|
31 |
@@ -562,7 +562,7 @@ |
32 |
fi |
33 |
|
34 |
# rebrand to make bug reports easier |
35 |
- release_version="${release_version/Gentoo/Gentoo Hardened}" |
36 |
+ BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} |
37 |
} |
38 |
|
39 |
# now we generate different spec files so that the user can select a compiler |
40 |
@@ -1010,7 +1010,7 @@ |
41 |
done |
42 |
} |
43 |
gcc_src_unpack() { |
44 |
- local release_version="Gentoo ${GCC_PVR}" |
45 |
+ export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}" |
46 |
|
47 |
[[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && die "Sorry, this version does not support uClibc" |
48 |
|
49 |
@@ -1024,7 +1024,7 @@ |
50 |
guess_patch_type_in_dir "${WORKDIR}"/patch |
51 |
EPATCH_MULTI_MSG="Applying Gentoo patches ..." \ |
52 |
epatch "${WORKDIR}"/patch |
53 |
- release_version="${release_version} p${PATCH_VER}" |
54 |
+ BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}" |
55 |
fi |
56 |
if [[ -n ${UCLIBC_VER} ]] ; then |
57 |
guess_patch_type_in_dir "${WORKDIR}"/uclibc |
58 |
@@ -1055,17 +1055,7 @@ |
59 |
disgusting_gcc_multilib_HACK || die "multilib hack failed" |
60 |
fi |
61 |
|
62 |
- local version_string=${GCC_CONFIG_VER} |
63 |
- |
64 |
- # Backwards support... add the BRANCH_UPDATE for 3.3.5-r1 and 3.4.3-r1 |
65 |
- # which set it directly rather than using ${GCC_PV} |
66 |
- if [[ ${GCC_PVR} == "3.3.5-r1" || ${GCC_PVR} = "3.4.3-r1" ]] ; then |
67 |
- version_string="${version_string} ${BRANCH_UPDATE}" |
68 |
- fi |
69 |
- |
70 |
- einfo "patching gcc version: ${version_string} (${release_version})" |
71 |
- gcc_version_patch "${version_string}" "${release_version}" |
72 |
- |
73 |
+ gcc_version_patch |
74 |
if [[ ${GCCMAJOR}.${GCCMINOR} > 4.0 ]] ; then |
75 |
if [[ -n ${SNAPSHOT} || -n ${PRERELEASE} ]] ; then |
76 |
echo ${PV/_/-} > "${S}"/gcc/BASE-VER |
77 |
@@ -1326,6 +1316,13 @@ |
78 |
[[ ${CTARGET} == *-uclibc* ]] && [[ ${GCCMAJOR}.${GCCMINOR} > 3.3 ]] \ |
79 |
&& confgcc="${confgcc} --enable-clocale=uclibc" |
80 |
|
81 |
+ set -- \ |
82 |
+ ${confgcc} \ |
83 |
+ --with-bugurl=http://bugs.gentoo.org/ \ |
84 |
+ --with-pkgversion="${BRANDING_GCC_PKGVERSION}" \ |
85 |
+ "$@" \ |
86 |
+ ${EXTRA_ECONF} |
87 |
+ |
88 |
# Nothing wrong with a good dose of verbosity |
89 |
echo |
90 |
einfo "PREFIX: ${PREFIX}" |
91 |
@@ -1334,7 +1331,7 @@ |
92 |
einfo "DATAPATH: ${DATAPATH}" |
93 |
einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}" |
94 |
echo |
95 |
- einfo "Configuring GCC with: ${confgcc//--/\n\t--} ${@} ${EXTRA_ECONF}" |
96 |
+ einfo "Configuring GCC with: ${@//--/\n\t--}" |
97 |
echo |
98 |
|
99 |
# Build in a separate build tree |
100 |
@@ -1343,8 +1340,8 @@ |
101 |
|
102 |
# and now to do the actual configuration |
103 |
addwrite /dev/zero |
104 |
- "${S}"/configure ${confgcc} $@ ${EXTRA_ECONF} \ |
105 |
- || die "failed to run configure" |
106 |
+ echo "${S}"/configure "$@" |
107 |
+ "${S}"/configure "$@" || die "failed to run configure" |
108 |
|
109 |
# return to whatever directory we were in before |
110 |
popd > /dev/null |
111 |
@@ -1966,7 +1963,7 @@ |
112 |
|
113 |
# modify the bounds checking patch with a regression patch |
114 |
epatch "${WORKDIR}/bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch" |
115 |
- release_version="${release_version}, HTB-${HTB_GCC_VER}-${HTB_VER}" |
116 |
+ BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, HTB-${HTB_GCC_VER}-${HTB_VER}" |
117 |
} |
118 |
|
119 |
# patch in ProPolice Stack Smashing protection |
120 |
@@ -2028,7 +2025,7 @@ |
121 |
fi |
122 |
fi |
123 |
|
124 |
- release_version="${release_version}, ssp-${PP_FVER:-${PP_GCC_VER}-${PP_VER}}" |
125 |
+ BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, ssp-${PP_FVER:-${PP_GCC_VER}-${PP_VER}}" |
126 |
if want_libssp ; then |
127 |
update_gcc_for_libssp |
128 |
else |
129 |
@@ -2089,7 +2086,7 @@ |
130 |
-e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \ |
131 |
-i "${S}"/gcc/Makefile.in |
132 |
|
133 |
- release_version="${release_version}, pie-${PIE_VER}" |
134 |
+ BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}" |
135 |
} |
136 |
|
137 |
should_we_gcc_config() { |
138 |
@@ -2259,17 +2256,20 @@ |
139 |
|
140 |
# This function allows us to gentoo-ize gcc's version number and bugzilla |
141 |
# URL without needing to use patches. |
142 |
-# |
143 |
-# Travis Tilley <lv@g.o> (02 Sep 2004) |
144 |
-# |
145 |
gcc_version_patch() { |
146 |
- [[ -z $1 ]] && die "no arguments to gcc_version_patch" |
147 |
+ # gcc-4.3+ has configure flags (whoo!) |
148 |
+ tc_version_is_at_least 4.3 && return 0 |
149 |
+ |
150 |
+ local version_string=${GCC_CONFIG_VER} |
151 |
+ [[ -n ${BRANCH_UPDATE} ]] && version_string="${version_string} ${BRANCH_UPDATE}" |
152 |
+ |
153 |
+ einfo "patching gcc version: ${version_string} (${BRANDING_GCC_PKGVERSION})" |
154 |
|
155 |
if grep -qs VERSUFFIX "${S}"/gcc/version.c ; then |
156 |
- sed -i -e "s~VERSUFFIX \"\"~VERSUFFIX \" ($2)\"~" \ |
157 |
+ sed -i -e "s~VERSUFFIX \"\"~VERSUFFIX \" (${BRANDING_GCC_PKGVERSION})\"~" \ |
158 |
"${S}"/gcc/version.c || die "failed to update VERSUFFIX with Gentoo branding" |
159 |
else |
160 |
- version_string="$1 ($2)" |
161 |
+ version_string="${version_string} (${BRANDING_GCC_PKGVERSION})" |
162 |
sed -i -e "s~\(const char version_string\[\] = \"\).*\(\".*\)~\1$version_string\2~" \ |
163 |
"${S}"/gcc/version.c || die "failed to update version.c with Gentoo branding." |
164 |
fi |
165 |
|
166 |
|
167 |
|
168 |
-- |
169 |
gentoo-commits@l.g.o mailing list |