Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils-config/files/
Date: Thu, 06 Aug 2020 21:22:51
Message-Id: 1596748958.81d1707840cc9bbc2ee17ca5a61205516295efde.slyfox@gentoo
1 commit: 81d1707840cc9bbc2ee17ca5a61205516295efde
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 6 21:19:55 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 6 21:22:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81d17078
7
8 sys-devel/binutils-config: drop unused files/
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
12
13 .../binutils-config/files/binutils-config-5.2 | 456 ---------------------
14 sys-devel/binutils-config/files/binutils-config.8 | 67 ---
15 sys-devel/binutils-config/files/binutils.eselect | 45 --
16 3 files changed, 568 deletions(-)
17
18 diff --git a/sys-devel/binutils-config/files/binutils-config-5.2 b/sys-devel/binutils-config/files/binutils-config-5.2
19 deleted file mode 100644
20 index 69ca530a704..00000000000
21 --- a/sys-devel/binutils-config/files/binutils-config-5.2
22 +++ /dev/null
23 @@ -1,456 +0,0 @@
24 -#!/bin/bash
25 -# Copyright 1999-2019 Gentoo Authors
26 -# Distributed under the terms of the GNU General Public License v2
27 -
28 -# Format of /etc/env.d/binutils/:
29 -# config-TARGET: CURRENT=version for TARGET
30 -# TARGET-VER: has a TARGET and VER variable
31 -
32 -EPREFIX="@GENTOO_PORTAGE_EPREFIX@"
33 -if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then
34 - EPREFIX=""
35 -fi
36 -
37 -: ${ROOT:=/}
38 -[[ ${ROOT} != */ ]] && ROOT="${ROOT}/"
39 -[[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}"
40 -
41 -EROOT="${ROOT%/}${EPREFIX}/"
42 -
43 -cd "${EPREFIX}/"
44 -
45 -trap ":" INT QUIT TSTP
46 -
47 -argv0=${0##*/}
48 -FUNCTIONS_SH="${EPREFIX}/lib/gentoo/functions.sh"
49 -source ${FUNCTIONS_SH} || {
50 - echo "${argv0}: Could not source ${FUNCTIONS_SH}!" 1>&2
51 - exit 1
52 -}
53 -esyslog() { :; }
54 -die() { eerror "${argv0}: $*"; exit 1; }
55 -umask 022
56 -
57 -usage() {
58 -cat << USAGE_END
59 -Usage: ${HILITE}binutils-config${NORMAL} ${GOOD}[options]${NORMAL} ${BRACKET}[binutils profile]${NORMAL}
60 -
61 -${HILITE}General Options:${NORMAL}
62 - ${GOOD}-c, --get-current-profile${NORMAL} Print current profile
63 - ${GOOD}-l, --list-profiles${NORMAL} Print a list of available profiles
64 - ${GOOD}-u, --uninstall${NORMAL} Remove all signs of specified target
65 - ${GOOD}-d, --debug${NORMAL} Execute with debug output
66 -
67 -Profile names are of the form: ${BRACKET}<CTARGET>-<binutils version>${NORMAL}
68 -For example: ${BRACKET}i686-pc-linux-gnu-2.15.92.0.2${NORMAL}
69 -
70 -For more info, please see ${HILITE}binutils-config${NORMAL}(8).
71 -USAGE_END
72 -
73 - exit ${1:-1}
74 -}
75 -
76 -mv_if_diff() {
77 - if cmp -s "$1" "$2" ; then
78 - rm -f "$1"
79 - else
80 - mv -f "$1" "$2"
81 - fi
82 -}
83 -atomic_ln() {
84 - local target=$1 linkdir=$2 linkname=$3 linktmp linkfull
85 - linktmp="${linkdir}/.binutils-config.tmp.${linkname}"
86 - linkfull="${linkdir}/${linkname}"
87 - if [[ -d ${linkfull} ]] ; then
88 - # if linking to a dir, we need a little magic to
89 - # make it atomic since `mv -T` is not portable
90 - rm -rf "${linktmp}"
91 - mkdir -p "${linktmp}"
92 - ln -sf "${target}" "${linktmp}/${linkname}"
93 - mv "${linktmp}/${linkname}" "${linktmp}/../"
94 - rmdir "${linktmp}"
95 - else
96 - # `ln` will expand into unlink();symlink(); which
97 - # is not atomic for a small amount of time, but
98 - # `mv` is a single rename() call
99 - ln -sf "${target}" "${linktmp}"
100 - mv "${linktmp}" "${linkfull}"
101 - fi
102 -}
103 -
104 -setup_env() {
105 - unset TARGET VER LIBPATH
106 - source "${ENV_D}/${PROFILE}"
107 - if [[ -z ${TARGET} ]] ; then
108 - eerror "${PROFILE} is invalid (no \$TARGET defined) :("
109 - return 1
110 - fi
111 - if [[ -z ${VER} ]] ; then
112 - eerror "${PROFILE} is invalid (no \$VER defined) :("
113 - return 1
114 - fi
115 -
116 - #
117 - # Generate binary symlinks
118 - #
119 - BINPATH=""
120 - BINPATH_LINKS=""
121 - if [[ ${TARGET} != ${HOST} ]] ; then
122 - #
123 - # Newer paths: /usr/${HOST}/${TARGET}/...
124 - # Older paths: /usr/${TARGET}/...
125 - #
126 - if [[ -d "${EROOT}"/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then
127 - BINPATH="${EPREFIX}"/usr/${HOST}/${TARGET}/binutils-bin/${VER}
128 - BINPATH_LINKS="${EPREFIX}"/usr/libexec/gcc/${TARGET}
129 - fi
130 - fi
131 - if [[ -z ${BINPATH} ]] ; then
132 - BINPATH="${EPREFIX}"/usr/${TARGET}/binutils-bin/${VER}
133 - BINPATH_LINKS="${EPREFIX}"/usr/${TARGET}/bin
134 - fi
135 -}
136 -
137 -# Lists of headers that various versions have installed.
138 -HEADERS=(
139 - ansidecl.h bfd.h bfdlink.h demangle.h dis-asm.h dyn-string.h
140 - fibheap.h hashtab.h libiberty.h objalloc.h plugin-api.h
141 - splay-tree.h symcat.h
142 -)
143 -
144 -switch_profile() {
145 - local x
146 -
147 - ebegin "Switching to ${PROFILE}"
148 -
149 - setup_env || return 1
150 -
151 - cd "${ROOT}/${BINPATH}" || exit 1
152 - mkdir -p "${ROOT}/${BINPATH_LINKS}" "${EROOT}/usr/bin"
153 - for x in * ; do
154 - atomic_ln "${BINPATH}/${x}" "${ROOT}/${BINPATH_LINKS}" "${x}"
155 - atomic_ln "${BINPATH_LINKS}/${x}" "${EROOT}/usr/bin" "${TARGET}-${x}"
156 - if [[ ${TARGET} == ${HOST} ]] ; then
157 - atomic_ln "${TARGET}-${x}" "${EROOT}/usr/bin" "${x}"
158 - fi
159 - done
160 -
161 - #
162 - # Generate library / ldscripts symlinks
163 - #
164 - : ${LIBPATH:=${EPREFIX}/usr/lib/binutils/${TARGET}/${VER}}
165 - cd "${ROOT}/${LIBPATH}" || exit 1
166 - if [[ ${TARGET} == ${HOST} ]] ; then
167 - dstlib=${EROOT}/usr/${HOST}/lib
168 - else
169 - dstlib=${EROOT}/usr/${HOST}/${TARGET}/lib
170 - fi
171 - # When upgrading, we need to clean up ldscripts and libs.
172 - # Don't symlink back in the libs -- the binutils-lib package handles
173 - # these now.
174 - # TODO: Stop requiring even the ldscripts symlink.
175 - mkdir -p "${dstlib}"
176 - rm -rf "${ROOT}/${BINPATH_LINKS}"/ldscripts
177 - atomic_ln "${LIBPATH}/ldscripts" "${dstlib}" "ldscripts"
178 - find -L "${dstlib}" -xtype l -name 'lib*' -delete
179 - # Detect older binutils w/broken rpaths. #562460
180 - # We can hardcode the "/lib" part since that's what the binutils
181 - # configure scripts have. They did not include any other path.
182 - if [[ $(scanelf -qF '%r#F' "${ROOT}/${BINPATH}/as") == */lib ]] ; then
183 - ewarn "Old cross-binutils detected; please re-emerge to fix (see bug #562460)."
184 - for x in lib* ; do
185 - atomic_ln "${LIBPATH}/${x}" "${dstlib}" "${x}"
186 - done
187 - fi
188 -
189 - #
190 - # Clean out old generated include symlinks
191 - #
192 - INCPATH=${LIBPATH}/include
193 - if [[ -d ${ROOT}/${INCPATH} ]] ; then
194 - cd "${ROOT}/${INCPATH}" || exit 1
195 - if [[ ${HOST} != ${TARGET} ]] ; then
196 - # Clean out old path -- cannot use '-exec {} +' syntax here
197 - find . -type f -exec rm -f "${EROOT}/usr/${TARGET}/usr/include/{}" \;
198 - rmdir "${EROOT}/usr/${TARGET}/usr/include" >& /dev/null
199 - rmdir "${EROOT}/usr/${TARGET}/usr" >& /dev/null
200 - rmdir "${EROOT}/usr/${TARGET}" >& /dev/null
201 - fi
202 - fi
203 -
204 - #
205 - # Make sure proper paths get updated
206 - #
207 - local env_update_flag="--no-ldconfig"
208 - if [[ ${TARGET} == ${HOST} ]] ; then
209 - # Delete old config now that binutils-libs installs these files.
210 - # Note: This skips ldconfig update if env.d had LDPATH, but meh.
211 - # Most people have upgraded to ld.so.conf.d, and someone else will
212 - # eventually re-run ldconfig for us.
213 - x="${EROOT}"/etc/ld.so.conf.d/05binutils.conf
214 - if [[ -e ${x} ]]; then
215 - rm -f "${x}"
216 - env_update_flag=""
217 - fi
218 -
219 - DATAPATH="${EPREFIX}"/usr/share/binutils-data/${TARGET}/${VER}
220 - local e="${EROOT}"/etc/env.d/05binutils
221 - local ee="${e}.tmp"
222 - rm -f "${ee}"
223 - [[ -d ${ROOT}/${DATAPATH}/man ]] && echo "MANPATH=${DATAPATH}/man" >> "${ee}"
224 - [[ -d ${ROOT}/${DATAPATH}/info ]] && echo "INFOPATH=${DATAPATH}/info" >> "${ee}"
225 - mv_if_diff "${ee}" "${e}"
226 - fi
227 -
228 - local c="${ENV_D}/config-${TARGET}"
229 - local cc="${c}.tmp"
230 - echo "CURRENT=${VER}" > "${cc}"
231 - mv_if_diff "${cc}" "${c}"
232 -
233 - eend 0
234 -
235 - #
236 - # Regen env.d if need/can be
237 - #
238 - if [[ ${ROOT} == "/" ]] && [[ ${TARGET} == ${HOST} ]] ; then
239 - env-update ${env_update_flag}
240 - echo
241 - ewarn "Please remember to run:"
242 - echo
243 - ewarn " # . ${EPREFIX}/etc/profile"
244 - echo
245 - fi
246 -
247 - return 0
248 -}
249 -
250 -uninstall_target() {
251 - : ${TARGET:=${UARG}}
252 -
253 - if [[ ${TARGET} == ${HOST} ]] ; then
254 - die "refusing to uninstall native binutils"
255 - fi
256 -
257 - shopt -s nullglob
258 - PROFILE=""
259 -
260 - for PROFILE in "${ENV_D}"/${TARGET}-* ; do
261 - ewarn "Removing all signs of ${PROFILE##*/}"
262 - rm -f "${ENV_D}"/${PROFILE}
263 - done
264 - if [[ -z ${PROFILE} ]] && [[ ! -e ${ENV_D}/config-${TARGET} ]] ; then
265 - die "no profiles exist for '${TARGET}'"
266 - fi
267 -
268 - rm -f "${ENV_D}"/config-${TARGET}
269 -
270 - local x
271 - for x in \
272 - addr2line ar as c++filt dwp elf2flt elfedit flthdr gprof \
273 - ld ld.{bfd,gold,real} \
274 - nm objcopy objdump ranlib readelf size strings strip
275 - do
276 - x=(
277 - "${EROOT}"/usr/bin/${TARGET}-${x}
278 - "${EROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x}
279 - "${EROOT}"/usr/libexec/gcc/${TARGET}/${x}
280 - )
281 - rm -f "${x[@]}"
282 - done
283 - for x in "${HEADERS[@]}" ; do
284 - rm -f "${EROOT}"/usr/{${HOST}/,}${TARGET}/{usr/,}include/${x}
285 - done
286 - for x in bfd iberty opcodes ; do
287 - rm -f "${EROOT}"/usr/${HOST}/${TARGET}/lib/lib${x}{{-*,}.so,.a,.la}
288 - done
289 - # Delete broken symlinks
290 - local destdir="${EROOT}/usr/${HOST}/${TARGET}"
291 - rm -f "${destdir}"/lib/ldscripts
292 - find -L "${destdir}"/lib -type l -exec rm {} +
293 - rmdir \
294 - "${destdir}"/{bin,include,lib,usr} \
295 - "${destdir}" \
296 - "${EROOT}"/var/db/pkg/cross-${TARGET} \
297 - "${EROOT}"/usr/{${HOST}/,}${TARGET}/bin \
298 - "${EROOT}"/usr/libexec/gcc/${TARGET} \
299 - 2>/dev/null
300 -
301 - rm -f "${ENV_D}"/${TARGET}-*
302 -}
303 -
304 -set_current_profile() {
305 - if [[ ! -f ${ENV_D}/config-${TARGET} ]] ; then
306 - eerror "${argv0}: unable to locate a profile for target: ${TARGET}"
307 - return 1
308 - fi
309 -
310 - source "${ENV_D}/config-${TARGET}"
311 -
312 - if [[ -z ${CURRENT} ]] ; then
313 - eerror "${argv0}: no binutils profile is active!"
314 - return 1
315 - fi
316 -
317 - echo "${TARGET}-${CURRENT}"
318 -
319 - return 0
320 -}
321 -get_current_profile() { echo "${PROFILE}" ; }
322 -
323 -list_profiles() {
324 - local x i target
325 -
326 - if [[ ${ROOT} != / ]] ; then
327 - echo "Using binutils-config info in ${ROOT}"
328 - fi
329 -
330 - set -- "${ENV_D}"/*
331 - target=
332 - i=1
333 -
334 - for x ; do
335 - # skip broken links and config files
336 - [[ -f ${x} ]] || continue
337 - [[ ${x} == */config-* ]] && continue
338 -
339 - source "${x}"
340 - if [[ ${target} != ${TARGET} ]] ; then
341 - [[ -n ${target} ]] && echo
342 - target=${TARGET}
343 - fi
344 -
345 - x=${x##*/}
346 - if [[ -e ${ENV_D}/config-${TARGET} ]] ; then
347 - source "${ENV_D}/config-${TARGET}"
348 - if [[ ${VER} == ${CURRENT} ]] ; then
349 - [[ ${TARGET} == ${HOST} ]] \
350 - && x="${x} ${GOOD}*${NORMAL}" \
351 - || x="${x} ${HILITE}*${NORMAL}"
352 - fi
353 - fi
354 -
355 - # We would align the [...] field like so:
356 - #printf ' [%*ss] %s\n' ${##} "${i}" "${x}"
357 - # but this breaks simple scripting: `binutils -l | awk '{print $2}'`
358 -
359 - # Or we could align the target col like so:
360 - #printf ' [%s]%*s %s\n' "${i}" $(( ${##} - ${#i} )) "" "${x}"
361 - # but i'm not sold that it looks better
362 -
363 - # So keep it simple ... only makes a diff anyways for crazy people
364 - # like me which have 100+ binutils packages installed ...
365 - echo " [$i] ${x}"
366 - ((++i))
367 - done
368 -}
369 -
370 -set_HOST() {
371 - # Set HOST to CHOST if it isn't already set
372 - : ${HOST:=${CHOST:-$(portageq envvar CHOST)}}
373 -}
374 -
375 -ENV_D="${EROOT}etc/env.d/binutils"
376 -
377 -DEBUG="no"
378 -NEED_ACTION="yes"
379 -DOIT="switch_profile"
380 -PROFILE="current"
381 -HOST=""
382 -TARGET=""
383 -unset UARG
384 -
385 -select_action() {
386 - if [[ ${NEED_ACTION} != "no" ]] ; then
387 - NEED_ACTION="no"
388 - DOIT=$1
389 - else
390 - die "one action at a time!"
391 - fi
392 -}
393 -
394 -while [[ $# -gt 0 ]] ; do
395 - x=$1
396 - shift
397 - case ${x} in
398 - -c|--get-current-profile) select_action get_current_profile ;;
399 - -l|--list|--list-profiles) select_action list_profiles ;;
400 - -u|--uninstall) select_action uninstall_target ;;
401 - -d|--debug) DEBUG="yes" ;;
402 - -h|--help) usage 0 ;;
403 - -V|--version)
404 - ver="@PV@"
405 - echo "binutils-config-${ver/@'PV'@/git}"
406 - exit 0
407 - ;;
408 - -*)
409 - die "invalid switch! Try '--help'."
410 - ;;
411 - *)
412 - if [[ ${UARG+set} == "set" ]] ; then
413 - die "only one profile/target at a time please"
414 - fi
415 - NEED_ACTION="maybe"
416 - UARG=${x}
417 - ;;
418 - esac
419 -done
420 -
421 -[[ ${NEED_ACTION} == "yes" ]] && usage 1
422 -[[ ${DEBUG} == "yes" ]] && set -x
423 -
424 -# All operations need to know the current HOST to figure out
425 -# what is a native target and what is a cross target
426 -set_HOST
427 -
428 -# All operations need to know the profile the user wants
429 -case ${DOIT} in
430 -switch_profile)
431 - # decode user's profile choice
432 - x=${UARG:-$(TARGET=${HOST} set_current_profile)}
433 - PROFILE=""
434 - if [[ -z $(echo ${x} | tr -d '[:digit:]') ]] ; then
435 - # User gave us a # representing the profile
436 - i=1
437 - for y in "${ENV_D}"/* ; do
438 - [[ ${y/config-} != ${y} ]] && continue
439 -
440 - if [[ -f ${y} ]] && [[ ${x} -eq ${i} ]] ; then
441 - PROFILE=${y##*/}
442 - break
443 - fi
444 - ((++i))
445 - done
446 - fi
447 -
448 - if [[ -z ${PROFILE} ]] ; then
449 - # User gave us a full HOST-ver
450 - x=${x##*/}
451 - if [[ -f ${ENV_D}/${x} ]] ; then
452 - # Valid HOST-ver yeah!
453 - PROFILE=${x}
454 - else
455 - # Not a valid HOST-ver ...
456 - if [[ ! -f ${ENV_D}/config-${x} ]] ; then
457 - # Maybe they just gave us a ver ...
458 - if [[ -f ${ENV_D}/${HOST}-${x} ]] ; then
459 - x=${HOST}-${x}
460 - else
461 - die "could not locate '$x' in '${ENV_D}/'!"
462 - fi
463 - PROFILE=${x}
464 - else
465 - # Maybe they just gave us a target ... pick active profile
466 - PROFILE=$(TARGET=${x} set_current_profile)
467 - fi
468 - fi
469 - fi
470 - ;;
471 -*)
472 - # lookup current profile as the user gave us a target
473 - PROFILE=$(TARGET=${UARG:-${HOST}} set_current_profile) || exit 1
474 - ;;
475 -esac
476 -
477 -eval ${DOIT}
478 -
479 -# vim:ts=4
480
481 diff --git a/sys-devel/binutils-config/files/binutils-config.8 b/sys-devel/binutils-config/files/binutils-config.8
482 deleted file mode 100644
483 index e8e64de5815..00000000000
484 --- a/sys-devel/binutils-config/files/binutils-config.8
485 +++ /dev/null
486 @@ -1,67 +0,0 @@
487 -.TH "BINUTILS-CONFIG" "8" "Jan 2005" "Gentoo" "Gentoo"
488 -.SH "NAME"
489 -binutils-config \- manage active versions of the binutils programs
490 -.SH "DESCRIPTION"
491 -The \fBbinutils-config\fR script allows you to switch between different
492 -versions of binutils when you have installed multiple copies (see
493 -USE=multislot). It also allows you to manage multiple cross-compiling
494 -targets simultaneously.
495 -
496 -Remember, you may have one version of binutils active per \fICTARGET\fR,
497 -and changing the version for one target has no bearing on any other. So
498 -changing an active cross-compiler will not break your native compiler
499 -(i.e. \fICHOST\fR).
500 -.SH "SYNOPSIS"
501 -\fBbinutils-config\fR [\fIcrufty options\fR] \fIPROFILE\fR
502 -
503 -\fBbinutils-config\fR \fB--get-current-profile\fR \fI[TARGET]\fR
504 -
505 -\fBbinutils-config\fR \fB--list-profiles\fR
506 -
507 -\fBbinutils-config\fR \fB--uninstall\fR \fITARGET\fR
508 -.SH "GENERIC OPTIONS"
509 -.TP
510 -\fBPROFILE\fR
511 -Change the system to use the specified binutils version. This may take the
512 -form of the list index number (the number shown on the left in the
513 -\fB\-\-list\-profiles\fR output), a full \fITARGET-VERSION\fR (useful when
514 -working with cross-compilers), just a \fITARGET\fR where the \fIVERSION\fR
515 -is picked from the active, or just a binutils \fIVERSION\fR where the
516 -\fITARGET\fR is assumed to be the native \fIHOST\fR value.
517 -.TP
518 -\fBTARGET\fR
519 -Similiar to \fBPROFILE\fR, but this is only the target and no version info
520 -(i.e. \fICTARGET\fR or \fICHOST\fR).
521 -.TP
522 -\fB\-c\fR, \fB\-\-get\-current\-profile\fR \fI[TARGET]\fR
523 -Display the active profile for \fITARGET\fR. If none is specified, the
524 -host system's \fITARGET\fR will be shown (i.e. \fICHOST\fR).
525 -.TP
526 -\fB\-l\fR, \fB\-\-list\-profiles\fR
527 -Show all the profiles that your system currently has installed and what
528 -versions are active. The active native version is noted with a bright green
529 -asterisk while the active cross-compiler versions are noted with a light blue
530 -asterisk.
531 -.TP
532 -\fB-u\fR, \fB\-\-uninstall\fR \fITARGET\fR
533 -This is really for internal use only. Used to remove all traces of the
534 -\fITARGET\fR binutils from your system.
535 -.SH "REPORTING BUGS"
536 -Please report bugs via https://bugs.gentoo.org/
537 -.SH "SEE ALSO"
538 -.BR ar (1),
539 -.BR as (1),
540 -.BR ld (1),
541 -.BR nm (1),
542 -.BR objcopy (1),
543 -.BR ranlib (1),
544 -.BR readelf (1),
545 -.BR strings (1),
546 -.BR strip (1)
547 -.SH "FILES"
548 -.nf
549 -.BR /usr/bin/binutils-config
550 -.BR /etc/env.d/binutils/*
551 -.fi
552 -.SH "AUTHORS"
553 -Mike Frysinger <vapier@g.o>
554
555 diff --git a/sys-devel/binutils-config/files/binutils.eselect b/sys-devel/binutils-config/files/binutils.eselect
556 deleted file mode 100644
557 index a89655aba14..00000000000
558 --- a/sys-devel/binutils-config/files/binutils.eselect
559 +++ /dev/null
560 @@ -1,45 +0,0 @@
561 -# -*-eselect-*- vim: ft=eselect
562 -# Copyright 2005-2015 Gentoo Foundation
563 -# Distributed under the terms of the GNU GPL version 2 or later
564 -
565 -DESCRIPTION="Manage installed versions of sys-devel/binutils"
566 -MAINTAINER="toolchain@g.o"
567 -
568 -### list action
569 -
570 -describe_list() {
571 - echo "List all installed version of binutils"
572 -}
573 -
574 -do_list() {
575 - binutils-config -l
576 -}
577 -
578 -### set action
579 -
580 -describe_set() {
581 - echo "Activate one of the installed binutils"
582 -}
583 -
584 -describe_set_parameters() {
585 - echo "<target>"
586 -}
587 -
588 -describe_set_options() {
589 - echo "target : Target name or number (from 'list' action)"
590 -}
591 -
592 -do_set() {
593 - [[ $# -eq 1 ]] || die -q "Please specify exactly one version to activate!"
594 - binutils-config "$1"
595 -}
596 -
597 -### show action
598 -
599 -describe_show() {
600 - echo "Print the currently active binutils version"
601 -}
602 -
603 -do_show() {
604 - binutils-config -c
605 -}