Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 391794 Details for
Bug 531616
sys-devel/binutils-config: Prefix support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for binutils-config-4
binutils-config-4.patch (text/plain), 6.53 KB, created by
Ruud Koolen (RETIRED)
on 2014-12-15 23:33:32 UTC
(
hide
)
Description:
Patch for binutils-config-4
Filename:
MIME Type:
Creator:
Ruud Koolen (RETIRED)
Created:
2014-12-15 23:33:32 UTC
Size:
6.53 KB
patch
obsolete
>--- a/binutils-config-4 >+++ b/binutils-config-4 >@@ -7,17 +7,23 @@ > # config-TARGET: CURRENT=version for TARGET > # TARGET-VER: has a TARGET and VER variable > >+: ${EPREFIX:="@GENTOO_PORTAGE_EPREFIX@"} >+[[ ${EPREFIX} = */ ]] && EPREFIX="${EPREFIX%/}" >+[[ -n ${EPREFIX} && ${EPREFIX} != /* ]] && EPREFIX="${PWD%/}/${EPREFIX}" >+ > : ${ROOT:=/} > [[ ${ROOT} != */ ]] && ROOT="${ROOT}/" > [[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}" > >-cd / >+EROOT="${ROOT%/}${EPREFIX}/" >+ >+cd "${EPREFIX}/" > > trap ":" INT QUIT TSTP > > argv0=${0##*/} >-source /etc/init.d/functions.sh || { >- echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2 >+source "@GENTOO_PORTAGE_EPREFIX@"/etc/init.d/functions.sh || { >+ echo "${argv0}: Could not source @GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh!" 1>&2 > exit 1 > } > esyslog() { :; } >@@ -96,14 +102,14 @@ setup_env() { > # Newer paths: /usr/${HOST}/${TARGET}/... > # Older paths: /usr/${TARGET}/... > # >- if [[ -d ${ROOT}/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then >- BINPATH=/usr/${HOST}/${TARGET}/binutils-bin/${VER} >- BINPATH_LINKS=/usr/libexec/gcc/${TARGET} >+ if [[ -d ${ROOT}${EPREFIX}/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then >+ BINPATH="${EPREFIX}"/usr/${HOST}/${TARGET}/binutils-bin/${VER} >+ BINPATH_LINKS="${EPREFIX}"/usr/libexec/gcc/${TARGET} > fi > fi > if [[ -z ${BINPATH} ]] ; then >- BINPATH=/usr/${TARGET}/binutils-bin/${VER} >- BINPATH_LINKS=/usr/${TARGET}/bin >+ BINPATH="${EPREFIX}"/usr/${TARGET}/binutils-bin/${VER} >+ BINPATH_LINKS="${EPREFIX}"/usr/${TARGET}/bin > fi > } > >@@ -113,24 +119,24 @@ switch_profile() { > setup_env || return 1 > > cd "${ROOT}/${BINPATH}" || exit 1 >- mkdir -p "${ROOT}/${BINPATH_LINKS}" "${ROOT}/usr/bin" >+ mkdir -p "${ROOT}/${BINPATH_LINKS}" "${EROOT}/usr/bin" > for x in * ; do > atomic_ln "${BINPATH}/${x}" "${ROOT}/${BINPATH_LINKS}" "${x}" >- atomic_ln "${BINPATH_LINKS}/${x}" "${ROOT}/usr/bin" "${TARGET}-${x}" >+ atomic_ln "${BINPATH_LINKS}/${x}" "${EROOT}/usr/bin" "${TARGET}-${x}" > if [[ ${TARGET} == ${HOST} ]] ; then >- atomic_ln "${TARGET}-${x}" "${ROOT}/usr/bin" "${x}" >+ atomic_ln "${TARGET}-${x}" "${EROOT}/usr/bin" "${x}" > fi > done > > # > # Generate library / ldscripts symlinks > # >- : ${LIBPATH:=/usr/lib/binutils/${TARGET}/${VER}} >+ : ${LIBPATH:=${EPREFIX}/usr/lib/binutils/${TARGET}/${VER}} > cd "${ROOT}/${LIBPATH}" || exit 1 > if [[ ${TARGET} == ${HOST} ]] ; then >- dstlib=${ROOT}/usr/${HOST}/lib >+ dstlib=${EROOT}/usr/${HOST}/lib > else >- dstlib=${ROOT}/usr/${HOST}/${TARGET}/lib >+ dstlib=${EROOT}/usr/${HOST}/${TARGET}/lib > fi > # When upgrading, we need to clean up ldscripts and libs > mkdir -p "${dstlib}" >@@ -148,16 +154,16 @@ switch_profile() { > if [[ -d ${ROOT}/${INCPATH} ]] ; then > cd "${ROOT}/${INCPATH}" || exit 1 > if [[ ${HOST} == ${TARGET} ]] ; then >- mkdir -p "${ROOT}/usr/include" >+ mkdir -p "${EROOT}/usr/include" > for x in * ; do >- atomic_ln "${INCPATH}/${x}" "${ROOT}/usr/include" "${x}" >+ atomic_ln "${INCPATH}/${x}" "${EROOT}/usr/include" "${x}" > done > else > # Clean out old path -- cannot use '-exec {} +' syntax here >- find . -type f -exec rm -f "${ROOT}/usr/${TARGET}/usr/include/{}" \; >- rmdir "${ROOT}/usr/${TARGET}/usr/include" >& /dev/null >- rmdir "${ROOT}/usr/${TARGET}/usr" >& /dev/null >- rmdir "${ROOT}/usr/${TARGET}" >& /dev/null >+ find . -type f -exec rm -f "${EROOT}/usr/${TARGET}/usr/include/{}" \; >+ rmdir "${EROOT}/usr/${TARGET}/usr/include" >& /dev/null >+ rmdir "${EROOT}/usr/${TARGET}/usr" >& /dev/null >+ rmdir "${EROOT}/usr/${TARGET}" >& /dev/null > fi > fi > >@@ -165,20 +171,20 @@ switch_profile() { > # Make sure proper paths get updated > # > if [[ ${TARGET} == ${HOST} ]] ; then >- DATAPATH=/usr/share/binutils-data/${TARGET}/${VER} >- local e="${ROOT}"/etc/env.d/05binutils >+ DATAPATH="${EPREFIX}"/usr/share/binutils-data/${TARGET}/${VER} >+ local e="${EROOT}"/etc/env.d/05binutils > local ee="${e}.tmp" > rm -f "${ee}" > [[ -d ${DATAPATH}/man ]] && echo "MANPATH=${DATAPATH}/man" >> "${ee}" > [[ -d ${DATAPATH}/info ]] && echo "INFOPATH=${DATAPATH}/info" >> "${ee}" > # hmm, `ld` has this in SEARCH_DIR(), but ld.so does not ... >- if [[ -d ${ROOT}/etc/ld.so.conf.d ]] ; then >- local l="${ROOT}"/etc/ld.so.conf.d/05binutils.conf >+ if [[ -d ${EROOT}/etc/ld.so.conf.d ]] ; then >+ local l="${EROOT}"/etc/ld.so.conf.d/05binutils.conf > local ll="${l}.tmp" >- echo "/usr/${TARGET}/lib" > "${ll}" >+ echo "${EPREFIX}/usr/${TARGET}/lib" > "${ll}" > mv_if_diff "${ll}" "${l}" > else >- echo "LDPATH=/usr/${TARGET}/lib" >> "${ee}" >+ echo "LDPATH=${EPREFIX}/usr/${TARGET}/lib" >> "${ee}" > fi > mv_if_diff "${ee}" "${e}" > fi >@@ -198,7 +204,7 @@ switch_profile() { > echo > ewarn "Please remember to run:" > echo >- ewarn " # . /etc/profile" >+ ewarn " # . ${EPREFIX}/etc/profile" > echo > fi > >@@ -223,7 +229,7 @@ uninstall_target() { > die "no profiles exist for '${TARGET}'" > fi > >- rm -f "${ENV_D}"/config-${TARGET} "${ROOT}"/etc/ld.so.conf.d/05binutils.conf >+ rm -f "${ENV_D}"/config-${TARGET} "${EROOT}"/etc/ld.so.conf.d/05binutils.conf > > local x > for x in \ >@@ -232,28 +238,28 @@ uninstall_target() { > nm objcopy objdump ranlib readelf size strings strip > do > x=( >- "${ROOT}"/usr/bin/${TARGET}-${x} >- "${ROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x} >- "${ROOT}"/usr/libexec/gcc/${TARGET}/${x} >+ "${EROOT}"/usr/bin/${TARGET}-${x} >+ "${EROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x} >+ "${EROOT}"/usr/libexec/gcc/${TARGET}/${x} > ) > rm -f "${x[@]}" > done > for x in ansidecl.h bfd.h bfdlink.h dis-asm.h symcat.h ; do >- rm -f "${ROOT}"/usr/{${HOST}/,}${TARGET}/{usr/,}include/${x} >+ rm -f "${EROOT}"/usr/{${HOST}/,}${TARGET}/{usr/,}include/${x} > done > for x in bfd iberty opcodes ; do >- rm -f "${ROOT}"/usr/${HOST}/${TARGET}/lib/lib${x}{{-*,}.so,.a,.la} >+ rm -f "${EROOT}"/usr/${HOST}/${TARGET}/lib/lib${x}{{-*,}.so,.a,.la} > done > # Delete broken symlinks >- local destdir="${ROOT}/usr/${HOST}/${TARGET}" >+ local destdir="${EROOT}/usr/${HOST}/${TARGET}" > rm -f "${destdir}"/lib/ldscripts > find -L "${destdir}"/lib -type l -exec rm {} + > rmdir \ > "${destdir}"/{bin,include,lib,usr} \ > "${destdir}" \ >- "${ROOT}"/var/db/pkg/cross-${TARGET} \ >- "${ROOT}"/usr/{${HOST}/,}${TARGET}/bin \ >- "${ROOT}"/usr/libexec/gcc/${TARGET} \ >+ "${EROOT}"/var/db/pkg/cross-${TARGET} \ >+ "${EROOT}"/usr/{${HOST}/,}${TARGET}/bin \ >+ "${EROOT}"/usr/libexec/gcc/${TARGET} \ > 2>/dev/null > > rm -f "${ENV_D}"/${TARGET}-* >@@ -352,7 +358,7 @@ set_HOST() { > : ${HOST:=${CHOST:-$(portageq envvar CHOST)}} > } > >-ENV_D="${ROOT}etc/env.d/binutils" >+ENV_D="${EROOT}etc/env.d/binutils" > > DEBUG="no" > NEED_ACTION="yes"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 531616
:
390898
|
391794
|
434942