1 |
commit: 47fb35c76dcc9817569374de8d3c66ac69fccef6 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 11 17:41:26 2018 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 11 17:55:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47fb35c7 |
7 |
|
8 |
sys-devel/binutils-hppa64: Fix 2.30 (bug #647318). |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
sys-devel/binutils-hppa64/Manifest | 2 +- |
13 |
.../binutils-hppa64/binutils-hppa64-2.30.ebuild | 384 +-------------------- |
14 |
2 files changed, 10 insertions(+), 376 deletions(-) |
15 |
|
16 |
diff --git a/sys-devel/binutils-hppa64/Manifest b/sys-devel/binutils-hppa64/Manifest |
17 |
index 4dceb00bfc5..fa1dc6f3019 100644 |
18 |
--- a/sys-devel/binutils-hppa64/Manifest |
19 |
+++ b/sys-devel/binutils-hppa64/Manifest |
20 |
@@ -25,4 +25,4 @@ DIST binutils-2.29.1-patches-2.tar.xz 18528 BLAKE2B 514496d6c9609362782d66b6cecb |
21 |
DIST binutils-2.29.1.tar.bz2 29123355 BLAKE2B 83de518a27bae0f13c57b1979493dd7f7cabae424cff5e8495d1f064da24b6ef9e1c19d1d1adad2dca7142372782023f66b4b4223170a49b96ba3834266fe878 SHA512 4063d34555526922376ccceb3f14b43e287442e82a8038cf50f4f51ad97d438c672c0e310ca4b856c9aff5aa9911073e256e8298a7a3f1844eeb60b90d955592 |
22 |
DIST binutils-2.29.tar.bz2 29073316 BLAKE2B 0eb7bbefa1ac5f4d753ca9328d339a466d4f75c69d5d860802aded8e42ce4293f65c72a0f0596b170e90e1cc3ded23ea30576948cb875eea044cb02bb55bb2d3 SHA512 8148587d7e4f14ebcbcb3f984b116deaae5d4008228628acde14bc242a64a4b53faf1f6077a2c4ca4750e2f254b698ba506bd657f79e1202e87e7029b0069337 |
23 |
DIST binutils-2.30-patches-1.tar.xz 13884 BLAKE2B 86d160144e4ae3213838ccd07d008a96f210dbe8d894f2043420bd0003f8e0611564f77dadf60780da61278bbac41130922703fef69ba8ac451bcae5d9c65cf4 SHA512 cf38328bac920c1159e73727a9bb46bd462fa60650c90ee8a3d6221d447c678fdd79c6886efc52e35897d535dd717c1dc363bcb3f201aacd15ace078694456da |
24 |
-DIST binutils-2.30.tar.xz 20286700 BLAKE2B 2dd5436a15a601011a1950e6082ec00082f5916fb82ce95ceab424fd8dc19f6daa7ac32a149f222ccdcc603354165cc206fde070eaa44fe2cc5e57486efc7868 SHA512 e747ea20d8d79fcd21b9d9f6695059caa7189d60f19256da398e34b789fea9a133c32b192e9693b5828d27683739b0198431bf8b3e39fb3b04884cf89d9aa839 |
25 |
+DIST binutils-2.30.tar.bz2 29541188 BLAKE2B 10d3988e8cd7fad549b0f42e1cdf7ca5d6be13325fcea316f80dfd760ff7f1b7b13243dd47f2f8b14697219563ef75099c842960607e3dc05afb1a7b18acdb9b SHA512 c3ce91aa20f058ec589bf18c722bf651331b394db6378900cc813cc0eea3a331a96584d5ae090630b627369510397dccc9edfcd43d4aeefc99579f277a05c72c |
26 |
|
27 |
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild |
28 |
index 36883ada0ff..e34fd3087ab 100644 |
29 |
--- a/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild |
30 |
+++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.30.ebuild |
31 |
@@ -1,392 +1,26 @@ |
32 |
# Copyright 1999-2018 Gentoo Foundation |
33 |
# Distributed under the terms of the GNU General Public License v2 |
34 |
|
35 |
-EAPI=6 |
36 |
+EAPI="5" |
37 |
|
38 |
export CTARGET=hppa64-${CHOST#*-} |
39 |
|
40 |
-inherit eutils libtool flag-o-matic gnuconfig multilib versionator |
41 |
+PATCHVER="1" |
42 |
+ELF2FLT_VER="" |
43 |
+inherit toolchain-binutils |
44 |
|
45 |
-DESCRIPTION="Tools necessary to build programs" |
46 |
-HOMEPAGE="https://sourceware.org/binutils/" |
47 |
-LICENSE="GPL-3+" |
48 |
-IUSE="+cxx doc multitarget +nls static-libs test" |
49 |
+DESCRIPTION="binutils package for building 64bit kernels on HPPA" |
50 |
|
51 |
-# Variables that can be set here: |
52 |
-# PATCH_VER - the patchset version |
53 |
-# Default: empty, no patching |
54 |
-# PATCH_BINUTILS_VER - the binutils version in the patchset name |
55 |
-# - Default: PV |
56 |
-# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/... |
57 |
-# for the patchsets |
58 |
-# Default: dilfridge :) |
59 |
- |
60 |
-PATCH_VER=1 |
61 |
- |
62 |
-case ${PV} in |
63 |
- 9999) |
64 |
- BVER="git" |
65 |
- EGIT_REPO_URI="https://sourceware.org/git/binutils-gdb.git" |
66 |
- inherit git-r3 |
67 |
- S=${WORKDIR}/binutils |
68 |
- EGIT_CHECKOUT_DIR=${S} |
69 |
- ;; |
70 |
- *) |
71 |
- BVER=${PV} |
72 |
- SRC_URI="mirror://gnu/binutils/binutils-${BVER}.tar.xz https://sourceware.org/pub/binutils/releases/binutils-${BVER}.tar.xz" |
73 |
- ;; |
74 |
-esac |
75 |
-SLOT="${BVER}" |
76 |
KEYWORDS="-* ~hppa" |
77 |
|
78 |
-# |
79 |
-# The Gentoo patchset |
80 |
-# |
81 |
-PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${BVER}} |
82 |
-PATCH_DEV=${PATCH_DEV:-dilfridge} |
83 |
- |
84 |
-[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI} |
85 |
- https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" |
86 |
- |
87 |
-# |
88 |
-# The cross-compile logic |
89 |
-# |
90 |
-export CTARGET=${CTARGET:-${CHOST}} |
91 |
-if [[ ${CTARGET} == ${CHOST} ]] ; then |
92 |
- if [[ ${CATEGORY} == cross-* ]] ; then |
93 |
- export CTARGET=${CATEGORY#cross-} |
94 |
- fi |
95 |
-fi |
96 |
-is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; } |
97 |
- |
98 |
-# |
99 |
-# The dependencies |
100 |
-# |
101 |
-RDEPEND=" |
102 |
- >=sys-devel/binutils-config-3 |
103 |
- sys-libs/zlib |
104 |
-" |
105 |
-DEPEND="${RDEPEND} |
106 |
- doc? ( sys-apps/texinfo ) |
107 |
- test? ( dev-util/dejagnu ) |
108 |
- nls? ( sys-devel/gettext ) |
109 |
- sys-devel/flex |
110 |
- virtual/yacc |
111 |
-" |
112 |
-if is_cross ; then |
113 |
- # The build assumes the host has libiberty and such when cross-compiling |
114 |
- # its build tools. We should probably make binutils itself build a local |
115 |
- # copy to use, but until then, be lazy. |
116 |
- DEPEND+=" >=sys-libs/binutils-libs-${PV}" |
117 |
-fi |
118 |
- |
119 |
-MY_BUILDDIR=${WORKDIR}/build |
120 |
- |
121 |
-src_unpack() { |
122 |
- case ${PV} in |
123 |
- 9999) |
124 |
- git-r3_src_unpack; |
125 |
- ;; |
126 |
- *) |
127 |
- default |
128 |
- ;; |
129 |
- esac |
130 |
- mkdir -p "${MY_BUILDDIR}" |
131 |
-} |
132 |
- |
133 |
-src_prepare() { |
134 |
- if [[ ! -z ${PATCH_VER} ]] ; then |
135 |
- einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" |
136 |
- eapply "${WORKDIR}/patch"/*.patch |
137 |
- fi |
138 |
- |
139 |
- # This check should probably go somewhere else, like pkg_pretend. |
140 |
- if [[ ${CTARGET} == *-uclibc* ]] ; then |
141 |
- if grep -qs 'linux-gnu' "${S}"/ltconfig ; then |
142 |
- die "sorry, but this binutils doesn't yet support uClibc :(" |
143 |
- fi |
144 |
- fi |
145 |
- |
146 |
- # Make sure our explicit libdir paths don't get clobbered. #562460 |
147 |
- sed -i \ |
148 |
- -e 's:@bfdlibdir@:@libdir@:g' \ |
149 |
- -e 's:@bfdincludedir@:@includedir@:g' \ |
150 |
- {bfd,opcodes}/Makefile.in || die |
151 |
- |
152 |
- # Fix locale issues if possible #122216 |
153 |
- if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then |
154 |
- einfo "Fixing misc issues in configure files" |
155 |
- for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do |
156 |
- ebegin " Updating ${f/${S}\/}" |
157 |
- patch "${f}" "${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \ |
158 |
- || eerror "Please file a bug about this" |
159 |
- eend $? |
160 |
- done |
161 |
- fi |
162 |
- |
163 |
- # Fix conflicts with newer glibc #272594 |
164 |
- if [[ -e libiberty/testsuite/test-demangle.c ]] ; then |
165 |
- sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c |
166 |
- fi |
167 |
- |
168 |
- # Apply things from PATCHES and user dirs |
169 |
- default |
170 |
- |
171 |
- # Run misc portage update scripts |
172 |
- gnuconfig_update |
173 |
- elibtoolize --portage --no-uclibc |
174 |
-} |
175 |
- |
176 |
-toolchain-binutils_bugurl() { |
177 |
- printf "https://bugs.gentoo.org/" |
178 |
-} |
179 |
-toolchain-binutils_pkgversion() { |
180 |
- printf "Gentoo ${BVER}" |
181 |
- [[ -n ${PATCH_VER} ]] && printf " p${PATCH_VER}" |
182 |
-} |
183 |
- |
184 |
-src_configure() { |
185 |
- # Setup some paths |
186 |
- LIBPATH=/usr/$(get_libdir)/binutils/${CTARGET}/${BVER} |
187 |
- INCPATH=${LIBPATH}/include |
188 |
- DATAPATH=/usr/share/binutils-data/${CTARGET}/${BVER} |
189 |
- if is_cross ; then |
190 |
- BINPATH=/usr/${CHOST}/${CTARGET}/binutils-bin/${BVER} |
191 |
- else |
192 |
- BINPATH=/usr/${CTARGET}/binutils-bin/${BVER} |
193 |
- fi |
194 |
- |
195 |
- # Make sure we filter $LINGUAS so that only ones that |
196 |
- # actually work make it through #42033 |
197 |
- strip-linguas -u */po |
198 |
- |
199 |
- # Keep things sane |
200 |
- strip-flags |
201 |
- |
202 |
- local x |
203 |
- echo |
204 |
- for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do |
205 |
- einfo "$(printf '%10s' ${x}:) ${!x}" |
206 |
- done |
207 |
- echo |
208 |
- |
209 |
- cd "${MY_BUILDDIR}" |
210 |
- local myconf=() |
211 |
- |
212 |
- # enable gold (installed as ld.gold) and ld's plugin architecture |
213 |
- if use cxx ; then |
214 |
- myconf+=( --enable-gold ) |
215 |
- myconf+=( --enable-plugins ) |
216 |
- fi |
217 |
- |
218 |
- if use nls ; then |
219 |
- myconf+=( --without-included-gettext ) |
220 |
- else |
221 |
- myconf+=( --disable-nls ) |
222 |
- fi |
223 |
- |
224 |
- myconf+=( --with-system-zlib ) |
225 |
- |
226 |
- # For bi-arch systems, enable a 64bit bfd. This matches |
227 |
- # the bi-arch logic in toolchain.eclass. #446946 |
228 |
- # We used to do it for everyone, but it's slow on 32bit arches. #438522 |
229 |
- case $(tc-arch) in |
230 |
- ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; |
231 |
- esac |
232 |
- |
233 |
- use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) |
234 |
- |
235 |
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} ) |
236 |
- |
237 |
- is_cross && myconf+=( |
238 |
- --with-sysroot="${EPREFIX}"/usr/${CTARGET} |
239 |
- --enable-poison-system-directories |
240 |
- ) |
241 |
- |
242 |
- # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ |
243 |
- # on everyone in alpha (for now), we'll just enable it when possible |
244 |
- has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) |
245 |
- has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) |
246 |
- |
247 |
- # mips can't do hash-style=gnu ... |
248 |
- if [[ $(tc-arch) != mips ]] ; then |
249 |
- myconf+=( --enable-default-hash-style=gnu ) |
250 |
- fi |
251 |
- |
252 |
- myconf+=( |
253 |
- --prefix="${EPREFIX}"/usr |
254 |
- --host=${CHOST} |
255 |
- --target=${CTARGET} |
256 |
- --datadir="${EPREFIX}"${DATAPATH} |
257 |
- --datarootdir="${EPREFIX}"${DATAPATH} |
258 |
- --infodir="${EPREFIX}"${DATAPATH}/info |
259 |
- --mandir="${EPREFIX}"${DATAPATH}/man |
260 |
- --bindir="${EPREFIX}"${BINPATH} |
261 |
- --libdir="${EPREFIX}"${LIBPATH} |
262 |
- --libexecdir="${EPREFIX}"${LIBPATH} |
263 |
- --includedir="${EPREFIX}"${INCPATH} |
264 |
- --enable-obsolete |
265 |
- --enable-shared |
266 |
- --enable-threads |
267 |
- # Newer versions (>=2.27) offer a configure flag now. |
268 |
- --enable-relro |
269 |
- # Newer versions (>=2.24) make this an explicit option. #497268 |
270 |
- --enable-install-libiberty |
271 |
- --disable-werror |
272 |
- --with-bugurl="$(toolchain-binutils_bugurl)" |
273 |
- --with-pkgversion="$(toolchain-binutils_pkgversion)" |
274 |
- $(use_enable static-libs static) |
275 |
- ${EXTRA_ECONF} |
276 |
- # Disable modules that are in a combined binutils/gdb tree. #490566 |
277 |
- --disable-{gdb,libdecnumber,readline,sim} |
278 |
- # Strip out broken static link flags. |
279 |
- # https://gcc.gnu.org/PR56750 |
280 |
- --without-stage1-ldflags |
281 |
- ) |
282 |
- echo ./configure "${myconf[@]}" |
283 |
- "${S}"/configure "${myconf[@]}" || die |
284 |
- |
285 |
- # Prevent makeinfo from running if doc is unset. |
286 |
- if ! use doc ; then |
287 |
- sed -i \ |
288 |
- -e '/^MAKEINFO/s:=.*:= true:' \ |
289 |
- Makefile || die |
290 |
- fi |
291 |
-} |
292 |
- |
293 |
-src_compile() { |
294 |
- cd "${MY_BUILDDIR}" |
295 |
- emake all |
296 |
- |
297 |
- # only build info pages if the user wants them |
298 |
- if use doc ; then |
299 |
- emake info |
300 |
- fi |
301 |
- |
302 |
- # we nuke the manpages when we're left with junk |
303 |
- # (like when we bootstrap, no perl -> no manpages) |
304 |
- find . -name '*.1' -a -size 0 -delete |
305 |
-} |
306 |
- |
307 |
-src_test() { |
308 |
- cd "${MY_BUILDDIR}" |
309 |
- emake -k check |
310 |
-} |
311 |
+# 66_all_binutils-2.22-warn-textrel.patch fails to apply with |
312 |
+# patch-2.5.9, so require a version that for sure works |
313 |
+DEPEND+=" >=sys-devel/patch-2.6.1" |
314 |
|
315 |
src_install() { |
316 |
- local x d |
317 |
+ toolchain-binutils_src_install |
318 |
|
319 |
- cd "${MY_BUILDDIR}" |
320 |
- emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install |
321 |
- rm -rf "${ED}"/${LIBPATH}/bin |
322 |
- use static-libs || find "${ED}" -name '*.la' -delete |
323 |
- |
324 |
- # Newer versions of binutils get fancy with ${LIBPATH} #171905 |
325 |
- cd "${ED}"/${LIBPATH} |
326 |
- for d in ../* ; do |
327 |
- [[ ${d} == ../${BVER} ]] && continue |
328 |
- mv ${d}/* . || die |
329 |
- rmdir ${d} || die |
330 |
- done |
331 |
- |
332 |
- # Now we collect everything intp the proper SLOT-ed dirs |
333 |
- # When something is built to cross-compile, it installs into |
334 |
- # /usr/$CHOST/ by default ... we have to 'fix' that :) |
335 |
- if is_cross ; then |
336 |
- cd "${ED}"/${BINPATH} |
337 |
- for x in * ; do |
338 |
- mv ${x} ${x/${CTARGET}-} |
339 |
- done |
340 |
- |
341 |
- if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then |
342 |
- mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} |
343 |
- mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ |
344 |
- rm -r "${ED}"/usr/${CHOST}/{include,lib} |
345 |
- fi |
346 |
- fi |
347 |
- insinto ${INCPATH} |
348 |
- local libiberty_headers=( |
349 |
- # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. |
350 |
- demangle.h |
351 |
- dyn-string.h |
352 |
- fibheap.h |
353 |
- hashtab.h |
354 |
- libiberty.h |
355 |
- objalloc.h |
356 |
- splay-tree.h |
357 |
- ) |
358 |
- doins "${libiberty_headers[@]/#/${S}/include/}" || die |
359 |
- if [[ -d ${ED}/${LIBPATH}/lib ]] ; then |
360 |
- mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ |
361 |
- rm -r "${ED}"/${LIBPATH}/lib |
362 |
- fi |
363 |
- |
364 |
- # Generate an env.d entry for this binutils |
365 |
- insinto /etc/env.d/binutils |
366 |
- cat <<-EOF > "${T}"/env.d |
367 |
- TARGET="${CTARGET}" |
368 |
- VER="${BVER}" |
369 |
- LIBPATH="${EPREFIX}${LIBPATH}" |
370 |
- EOF |
371 |
- newins "${T}"/env.d ${CTARGET}-${BVER} |
372 |
- |
373 |
- # Handle documentation |
374 |
- if ! is_cross ; then |
375 |
- cd "${S}" |
376 |
- dodoc README |
377 |
- docinto bfd |
378 |
- dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO |
379 |
- docinto binutils |
380 |
- dodoc binutils/ChangeLog binutils/NEWS binutils/README |
381 |
- docinto gas |
382 |
- dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* |
383 |
- docinto gprof |
384 |
- dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl |
385 |
- docinto ld |
386 |
- dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO |
387 |
- docinto libiberty |
388 |
- dodoc libiberty/ChangeLog* libiberty/README |
389 |
- docinto opcodes |
390 |
- dodoc opcodes/ChangeLog* |
391 |
- fi |
392 |
- |
393 |
- # Remove shared info pages |
394 |
- rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} |
395 |
- |
396 |
- # Trim all empty dirs |
397 |
- find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null |
398 |
- |
399 |
- # the hppa64 hack; this should go into 9999 as a PN-conditional |
400 |
# tweak the default fake list a little bit |
401 |
cd "${D}"/etc/env.d/binutils |
402 |
sed -i '/FAKE_TARGETS=/s:"$: hppa64-linux":' ${CTARGET}-${BVER} || die |
403 |
} |
404 |
- |
405 |
-pkg_postinst() { |
406 |
- # Make sure this ${CTARGET} has a binutils version selected |
407 |
- [[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0 |
408 |
- binutils-config ${CTARGET}-${BVER} |
409 |
-} |
410 |
- |
411 |
-pkg_postrm() { |
412 |
- local current_profile=$(binutils-config -c ${CTARGET}) |
413 |
- |
414 |
- # If no other versions exist, then uninstall for this |
415 |
- # target ... otherwise, switch to the newest version |
416 |
- # Note: only do this if this version is unmerged. We |
417 |
- # rerun binutils-config if this is a remerge, as |
418 |
- # we want the mtimes on the symlinks updated (if |
419 |
- # it is the same as the current selected profile) |
420 |
- if [[ ! -e ${EPREFIX}${BINPATH}/ld ]] && [[ ${current_profile} == ${CTARGET}-${BVER} ]] ; then |
421 |
- local choice=$(binutils-config -l | grep ${CTARGET} | awk '{print $2}') |
422 |
- choice=${choice//$'\n'/ } |
423 |
- choice=${choice/* } |
424 |
- if [[ -z ${choice} ]] ; then |
425 |
- env -i ROOT="${ROOT}" binutils-config -u ${CTARGET} |
426 |
- else |
427 |
- binutils-config ${choice} |
428 |
- fi |
429 |
- elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${BVER} ]] ; then |
430 |
- binutils-config ${CTARGET}-${BVER} |
431 |
- fi |
432 |
-} |