Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 355744 Details for
Bug 474358
sys-devel/gcc: update to EAPI 4 (mostly toolchain.eclass)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
prefix.patch
toolchain.patch (text/plain), 19.52 KB, created by
Benda Xu
on 2013-08-12 08:26:50 UTC
(
hide
)
Description:
prefix.patch
Filename:
MIME Type:
Creator:
Benda Xu
Created:
2013-08-12 08:26:50 UTC
Size:
19.52 KB
patch
obsolete
>Index: tauon/toolchain.eclass >=================================================================== >--- tauon.orig/toolchain.eclass 2013-08-12 17:20:12.000000000 +0900 >+++ tauon/toolchain.eclass 2013-08-12 17:22:29.000000000 +0900 >@@ -10,7 +10,7 @@ > LICENSE="GPL-2 LGPL-2.1" > RESTRICT="strip" # cross-compilers need controlled stripping > >-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails pax-utils >+inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails pax-utils prefix > > if [[ ${PV} == *_pre9999* ]] ; then > EGIT_REPO_URI="git://gcc.gnu.org/git/gcc.git" >@@ -472,7 +472,7 @@ > local gcc_envd_base="/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}" > > local gcc_specs_file >- local gcc_envd_file="${D}${gcc_envd_base}" >+ local gcc_envd_file="${ED}${gcc_envd_base}" > if [[ -z $1 ]] ; then > # I'm leaving the following commented out to remind me that it > # was an insanely -bad- idea. Stuff broke. GCC_SPECS isnt unset >@@ -481,7 +481,7 @@ > gcc_specs_file="" > else > gcc_envd_file+="-$1" >- gcc_specs_file="${LIBPATH}/$1.specs" >+ gcc_specs_file="${EPREFIX}${LIBPATH}/$1.specs" > fi > > # We want to list the default ABI's LIBPATH first so libtool >@@ -493,7 +493,7 @@ > local mdir mosdir abi ldpath > for abi in $(get_all_abis TARGET) ; do > mdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory) >- ldpath=${LIBPATH} >+ ldpath=${EPREFIX}${LIBPATH} > [[ ${mdir} != "." ]] && ldpath+="/${mdir}" > ldpaths="${ldpath}${ldpaths:+:${ldpaths}}" > >@@ -502,16 +502,16 @@ > done > else > # Older gcc's didn't do multilib, so logic is simple. >- ldpaths=${LIBPATH} >+ ldpaths=${EPREFIX}${LIBPATH} > fi > > cat <<-EOF > ${gcc_envd_file} >- PATH="${BINPATH}" >- ROOTPATH="${BINPATH}" >- GCC_PATH="${BINPATH}" >+ PATH="${EPREFIX}${BINPATH}" >+ ROOTPATH="${EPREFIX}${BINPATH}" >+ GCC_PATH="${EPREFIX}${BINPATH}" > LDPATH="${ldpaths}" >- MANPATH="${DATAPATH}/man" >- INFOPATH="${DATAPATH}/info" >+ MANPATH="${EPREFIX}${DATAPATH}/man" >+ INFOPATH="${EPREFIX}${DATAPATH}/info" > STDCXX_INCDIR="${STDCXX_INCDIR##*/}" > CTARGET="${CTARGET}" > GCC_SPECS="${gcc_specs_file}" >@@ -568,6 +568,14 @@ > "in your make.conf if you want to use this version." > fi > >+ local realEPREFIX=$(python -c 'import os; print(os.path.realpath("'"${EPREFIX}"'"))') >+ if [[ -z ${I_KNOW_MY_GCC_WORKS_FINE_WITH_SYMLINKS} && ${EPREFIX} != ${realEPREFIX} ]] ; then >+ ewarn "Your \${EPREFIX} contains one or more symlinks. GCC has a" >+ ewarn "bug which prevents it from working properly when there are" >+ ewarn "symlinks in your \${EPREFIX}." >+ ewarn "See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29831" >+ fi >+ > # we dont want to use the installed compiler's specs to build gcc! > unset GCC_SPECS > >@@ -596,16 +604,16 @@ > echo > > # Clean up old paths >- rm -f "${ROOT}"/*/rcscripts/awk/fixlafiles.awk "${ROOT}"/sbin/fix_libtool_files.sh >- rmdir "${ROOT}"/*/rcscripts{/awk,} 2>/dev/null >+ rm -f "${EROOT}"/*/rcscripts/awk/fixlafiles.awk "${EROOT}"/sbin/fix_libtool_files.sh >+ rmdir "${EROOT}"/*/rcscripts{/awk,} 2>/dev/null > >- mkdir -p "${ROOT}"/usr/{share/gcc-data,sbin,bin} >- cp "${ROOT}/${DATAPATH}"/fixlafiles.awk "${ROOT}"/usr/share/gcc-data/ || die >- cp "${ROOT}/${DATAPATH}"/fix_libtool_files.sh "${ROOT}"/usr/sbin/ || die >+ mkdir -p "${EROOT}"/usr/{share/gcc-data,sbin,bin} >+ cp "${EROOT}/${DATAPATH}"/fixlafiles.awk "${EROOT}"/usr/share/gcc-data/ || die >+ cp "${EROOT}/${DATAPATH}"/fix_libtool_files.sh "${EROOT}"/usr/sbin/ || die > > # Since these aren't critical files and portage sucks with > # handling of binpkgs, don't require these to be found >- cp "${ROOT}/${DATAPATH}"/c{89,99} "${ROOT}"/usr/bin/ 2>/dev/null >+ cp "${EROOT}/${DATAPATH}"/c{89,99} "${EROOT}"/usr/bin/ 2>/dev/null > fi > > if use regression-test ; then >@@ -622,10 +630,10 @@ > > # clean up the cruft left behind by cross-compilers > if is_crosscompile ; then >- if [[ -z $(ls "${ROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then >- rm -f "${ROOT}"/etc/env.d/gcc/config-${CTARGET} >- rm -f "${ROOT}"/etc/env.d/??gcc-${CTARGET} >- rm -f "${ROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64} >+ if [[ -z $(ls "${EROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then >+ rm -f "${EROOT}"/etc/env.d/gcc/config-${CTARGET} >+ rm -f "${EROOT}"/etc/env.d/??gcc-${CTARGET} >+ rm -f "${EROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64} > fi > return 0 > fi >@@ -633,15 +641,15 @@ > # ROOT isnt handled by the script > [[ ${ROOT} != "/" ]] && return 0 > >- if [[ ! -e ${LIBPATH}/libstdc++.so ]] ; then >+ if [[ ! -e ${EPREFIX}${LIBPATH}/libstdc++.so ]] ; then > # make sure the profile is sane during same-slot upgrade #289403 > do_gcc_config > > einfo "Running 'fix_libtool_files.sh ${GCC_RELEASE_VER}'" >- /usr/sbin/fix_libtool_files.sh ${GCC_RELEASE_VER} >+ "${EPREFIX}"/usr/sbin/fix_libtool_files.sh ${GCC_RELEASE_VER} > if [[ -n ${BRANCH_UPDATE} ]] ; then > einfo "Running 'fix_libtool_files.sh ${GCC_RELEASE_VER}-${BRANCH_UPDATE}'" >- /usr/sbin/fix_libtool_files.sh ${GCC_RELEASE_VER}-${BRANCH_UPDATE} >+ "${EPREFIX}"/usr/sbin/fix_libtool_files.sh ${GCC_RELEASE_VER}-${BRANCH_UPDATE} > fi > fi > >@@ -1050,14 +1058,13 @@ > > gcc_do_configure() { > local confgcc=( >- # Set configuration based on path variables >- --prefix="${PREFIX}" >- --bindir="${BINPATH}" >- --includedir="${INCLUDEPATH}" >- --datadir="${DATAPATH}" >- --mandir="${DATAPATH}/man" >- --infodir="${DATAPATH}/info" >- --with-gxx-include-dir="${STDCXX_INCDIR}" >+ --prefix="${EPREFIX}${PREFIX}" >+ --bindir="${EPREFIX}${BINPATH}" >+ --includedir="${EPREFIX}${INCLUDEPATH}" >+ --datadir="${EPREFIX}${DATAPATH}" >+ --mandir="${EPREFIX}${DATAPATH}/man" >+ --infodir="${EPREFIX}${DATAPATH}/info" >+ --with-gxx-include-dir="${EPREFIX}${STDCXX_INCDIR}" > ) > # On Darwin we need libdir to be set in order to get correct install names > # for things like libobjc-gnu, libgcj and libfortran. If we enable it on >@@ -1095,7 +1102,7 @@ > elif tc_version_is_at_least 4.6 ; then > confgcc+=( $(use_with graphite cloog) ) > confgcc+=( $(use_with graphite ppl) ) >- use graphite && confgcc+=( --with-cloog-include=/usr/include/cloog-ppl ) >+ use graphite && confgcc+=( --with-cloog-include="${EPREFIX}"/usr/include/cloog-ppl ) > use graphite && confgcc+=( --disable-ppl-version-check ) > elif tc_version_is_at_least 4.4 ; then > confgcc+=( --without-cloog ) >@@ -1162,6 +1169,9 @@ > *-w64-mingw*) needed_libc=mingw64-runtime;; > mingw*|*-mingw*) needed_libc=mingw-runtime;; > avr) confgcc+=( --enable-shared --disable-threads );; >+ *-apple-darwin*) confgcc+=( --with-sysroot="${EPREFIX}"${PREFIX}/${CTARGET} );; >+ *-solaris*) confgcc+=( --with-sysroot="${EPREFIX}"${PREFIX}/${CTARGET} );; >+ *-freebsd*) confgcc+=( --with-sysroot="${EPREFIX}"${PREFIX}/${CTARGET} );; > esac > if [[ -n ${needed_libc} ]] ; then > local confgcc_no_libc=( --disable-shared ) >@@ -1175,10 +1185,10 @@ > elif built_with_use --hidden --missing false ${CATEGORY}/${needed_libc} crosscompile_opts_headers-only ; then > confgcc+=( > "${confgcc_no_libc[@]}" >- --with-sysroot=${PREFIX}/${CTARGET} >+ --with-sysroot="${EPREFIX}"${PREFIX}/${CTARGET} > ) > else >- confgcc+=( --with-sysroot=${PREFIX}/${CTARGET} ) >+ confgcc+=( --with-sysroot="${EPREFIX}"${PREFIX}/${CTARGET} ) > fi > fi > >@@ -1195,6 +1205,12 @@ > *) > confgcc+=( --enable-threads=posix ) ;; > esac >+ >+ if use prefix ; then >+ # should be /usr, because it's the path to search includes for, >+ # which is unrelated to TOOLCHAIN_PREFIX, a.k.a. PREFIX >+ confgcc+=( --with-local-prefix="${TPREFIX}"/usr ) >+ fi > fi > # __cxa_atexit is "essential for fully standards-compliant handling of > # destructors", but apparently requires glibc. >@@ -1231,11 +1247,13 @@ > # if the target can do biarch (-m32/-m64), enable it. overhead should > # be small, and should simplify building of 64bit kernels in a 32bit > # userland by not needing sys-devel/kgcc64. #349405 >+ if ! use prefix ; then > case $(tc-arch) in > ppc|ppc64) tc_version_is_at_least 3.4 && confgcc+=( --enable-targets=all ) ;; > sparc) tc_version_is_at_least 4.4 && confgcc+=( --enable-targets=all ) ;; > amd64|x86) tc_version_is_at_least 4.3 && confgcc+=( --enable-targets=all ) ;; > esac >+ fi > > tc_version_is_at_least 4.3 && confgcc+=( > --with-bugurl=http://bugs.gentoo.org/ >@@ -1259,6 +1277,7 @@ > > # Nothing wrong with a good dose of verbosity > echo >+ einfo "EPREFIX: ${EPREFIX}" > einfo "PREFIX: ${PREFIX}" > einfo "BINPATH: ${BINPATH}" > einfo "LIBPATH: ${LIBPATH}" >@@ -1353,10 +1372,13 @@ > > pushd "${WORKDIR}"/build >/dev/null > >+ # we "undef" T because the GCC makefiles use this variable, and if it's set >+ # in the environment (like Portage does) the build fails, bug #286494 > emake \ >+ T= \ > LDFLAGS="${LDFLAGS}" \ > STAGE1_CFLAGS="${STAGE1_CFLAGS}" \ >- LIBPATH="${LIBPATH}" \ >+ LIBPATH="${EPREFIX}${LIBPATH}" \ > BOOT_CFLAGS="${BOOT_CFLAGS}" \ > ${GCC_MAKE_TARGET} \ > || die "emake failed with ${GCC_MAKE_TARGET}" >@@ -1494,7 +1516,7 @@ > touch "${S}"/gcc/c-gperf.h > > # Do not make manpages if we do not have perl ... >- [[ ! -x /usr/bin/perl ]] \ >+ [[ ! -x ${EPREFIX}/usr/bin/perl ]] \ > && find "${WORKDIR}"/build -name '*.[17]' | xargs touch > > einfo "Compiling ${PN} ..." >@@ -1537,9 +1559,9 @@ > S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install || die > > # Punt some tools which are really only useful while building gcc >- find "${D}" -name install-tools -prune -type d -exec rm -rf "{}" \; >+ find "${ED}" -name install-tools -prune -type d -exec rm -rf "{}" \; > # This one comes with binutils >- find "${D}" -name libiberty.a -delete >+ find "${ED}" -name libiberty.a -delete > > # Move the libraries to the proper location > gcc_movelibs >@@ -1548,7 +1570,7 @@ > if ! is_crosscompile ; then > local EXEEXT > eval $(grep ^EXEEXT= "${WORKDIR}"/build/gcc/config.log) >- [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${D}" >+ [[ -r ${ED}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${ED}" > fi > > dodir /etc/env.d/gcc >@@ -1562,7 +1584,7 @@ > gcc_slot_java > > dodir /usr/bin >- cd "${D}"${BINPATH} >+ cd "${ED}"${BINPATH} > # Ugh: we really need to auto-detect this list. > # It's constantly out of date. > for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do >@@ -1588,34 +1610,34 @@ > done > > # Now do the fun stripping stuff >- env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}" >- env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" >+ env RESTRICT="" CHOST=${CHOST} prepstrip "${ED}${BINPATH}" >+ env RESTRICT="" CHOST=${CTARGET} prepstrip "${ED}${LIBPATH}" > # gcc used to install helper binaries in lib/ but then moved to libexec/ >- [[ -d ${D}${PREFIX}/libexec/gcc ]] && \ >- env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}" >+ [[ -d ${ED}${PREFIX}/libexec/gcc ]] && \ >+ env RESTRICT="" CHOST=${CHOST} prepstrip "${ED}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}" > > cd "${S}" > if is_crosscompile; then >- rm -rf "${D}"/usr/share/{man,info} >- rm -rf "${D}"${DATAPATH}/{man,info} >+ rm -rf "${ED}"/usr/share/{man,info} >+ rm -rf "${ED}"${DATAPATH}/{man,info} > else > if tc_version_is_at_least 3.0 ; then > local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man) > if [[ -d ${cxx_mandir} ]] ; then > # clean bogus manpages #113902 > find "${cxx_mandir}" -name '*_build_*' -exec rm {} \; >- cp -r "${cxx_mandir}"/man? "${D}/${DATAPATH}"/man/ >+ cp -r "${cxx_mandir}"/man? "${ED}/${DATAPATH}"/man/ > fi > fi > has noinfo ${FEATURES} \ >- && rm -r "${D}/${DATAPATH}"/info \ >+ && rm -r "${ED}/${DATAPATH}"/info \ > || prepinfo "${DATAPATH}" > has noman ${FEATURES} \ >- && rm -r "${D}/${DATAPATH}"/man \ >+ && rm -r "${ED}/${DATAPATH}"/man \ > || prepman "${DATAPATH}" > fi > # prune empty dirs left behind >- find "${D}" -depth -type d -delete 2>/dev/null >+ find "${ED}" -depth -type d -delete 2>/dev/null > > # install testsuite results > if use regression-test; then >@@ -1628,26 +1650,34 @@ > # Rather install the script, else portage with changing $FILESDIR > # between binary and source package borks things .... > if ! is_crosscompile ; then >+ cp "${GCC_FILESDIR}"/fix_libtool_files.sh "${T}" >+ cp "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la "${T}" >+ cp "${GCC_FILESDIR}"/awk/fixlafiles.awk "${T}" >+ eprefixify \ >+ "${T}"/fix_libtool_files.sh \ >+ "${T}"/fixlafiles.awk-no_gcc_la \ >+ "${T}"/fixlafiles.awk >+ > insinto "${DATAPATH}" > if tc_version_is_at_least 4.0 ; then >- newins "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la fixlafiles.awk || die >- find "${D}/${LIBPATH}" -name libstdc++.la -type f -exec rm "{}" \; >+ newins "${T}"/fixlafiles.awk-no_gcc_la fixlafiles.awk || die >+ find "${ED}/${LIBPATH}" -name libstdc++.la -type f -exec rm "{}" \; > else >- doins "${GCC_FILESDIR}"/awk/fixlafiles.awk || die >+ doins "${T}"/fixlafiles.awk || die > fi > exeinto "${DATAPATH}" >- doexe "${GCC_FILESDIR}"/fix_libtool_files.sh || die >+ doexe "${T}"/fix_libtool_files.sh || die > doexe "${GCC_FILESDIR}"/c{89,99} || die > fi > > # Use gid of 0 because some stupid ports don't have > # the group 'root' set to gid 0. Send to /dev/null > # for people who are testing as non-root. >- chown -R root:0 "${D}"${LIBPATH} 2>/dev/null >+ chown -R ${PORTAGE_INST_UID:-0}:${PORTAGE_INST_GID:-0} "${ED}"${LIBPATH} 2>/dev/null > > # Move pretty-printers to gdb datadir to shut ldconfig up > local py gdbdir=/usr/share/gdb/auto-load${LIBPATH/\/lib\//\/$(get_libdir)\/} >- pushd "${D}"${LIBPATH} >/dev/null >+ pushd "${ED}"${LIBPATH} >/dev/null > for py in $(find . -name '*-gdb.py') ; do > local multidir=${py%/*} > insinto "${gdbdir}/${multidir}" >@@ -1663,8 +1693,8 @@ > > # Disable RANDMMAP so PCH works. #301299 > if tc_version_is_at_least 4.3 ; then >- pax-mark -r "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1" >- pax-mark -r "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus" >+ pax-mark -r "${ED}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1" >+ pax-mark -r "${ED}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus" > fi > } > >@@ -1672,32 +1702,32 @@ > local x > > # Move Java headers to compiler-specific dir >- for x in "${D}"${PREFIX}/include/gc*.h "${D}"${PREFIX}/include/j*.h ; do >- [[ -f ${x} ]] && mv -f "${x}" "${D}"${LIBPATH}/include/ >+ for x in "${ED}"${PREFIX}/include/gc*.h "${ED}"${PREFIX}/include/j*.h ; do >+ [[ -f ${x} ]] && mv -f "${x}" "${ED}"${LIBPATH}/include/ > done > for x in gcj gnu java javax org ; do >- if [[ -d ${D}${PREFIX}/include/${x} ]] ; then >+ if [[ -d ${ED}${PREFIX}/include/${x} ]] ; then > dodir /${LIBPATH}/include/${x} >- mv -f "${D}"${PREFIX}/include/${x}/* "${D}"${LIBPATH}/include/${x}/ >- rm -rf "${D}"${PREFIX}/include/${x} >+ mv -f "${ED}"${PREFIX}/include/${x}/* "${ED}"${LIBPATH}/include/${x}/ >+ rm -rf "${ED}"${PREFIX}/include/${x} > fi > done > >- if [[ -d ${D}${PREFIX}/lib/security ]] || [[ -d ${D}${PREFIX}/$(get_libdir)/security ]] ; then >+ if [[ -d ${ED}${PREFIX}/lib/security ]] || [[ -d ${ED}${PREFIX}/$(get_libdir)/security ]] ; then > dodir /${LIBPATH}/security >- mv -f "${D}"${PREFIX}/lib*/security/* "${D}"${LIBPATH}/security >- rm -rf "${D}"${PREFIX}/lib*/security >+ mv -f "${ED}"${PREFIX}/lib*/security/* "${ED}"${LIBPATH}/security >+ rm -rf "${ED}"${PREFIX}/lib*/security > fi > > # Move random gcj files to compiler-specific directories > for x in libgcj.spec logging.properties ; do >- x="${D}${PREFIX}/lib/${x}" >- [[ -f ${x} ]] && mv -f "${x}" "${D}"${LIBPATH}/ >+ x="${ED}${PREFIX}/lib/${x}" >+ [[ -f ${x} ]] && mv -f "${x}" "${ED}"${LIBPATH}/ > done > > # Rename jar because it could clash with Kaffe's jar if this gcc is > # primary compiler (aka don't have the -<version> extension) >- cd "${D}"${BINPATH} >+ cd "${ED}"${BINPATH} > [[ -f jar ]] && mv -f jar gcj-jar > } > >@@ -1715,7 +1745,7 @@ > > local OS_MULTIDIR=$($(XGCC) ${multiarg} --print-multi-os-directory) > local MULTIDIR=$($(XGCC) ${multiarg} --print-multi-directory) >- local TODIR=${D}${LIBPATH}/${MULTIDIR} >+ local TODIR=${ED}${LIBPATH}/${MULTIDIR} > local FROMDIR= > > [[ -d ${TODIR} ]] || mkdir -p ${TODIR} >@@ -1727,7 +1757,7 @@ > ${PREFIX}/${CTARGET}/lib/${OS_MULTIDIR} > do > removedirs="${removedirs} ${FROMDIR}" >- FROMDIR=${D}${FROMDIR} >+ FROMDIR=${ED}${FROMDIR} > if [[ ${FROMDIR} != "${TODIR}" && -d ${FROMDIR} ]] ; then > local files=$(find "${FROMDIR}" -maxdepth 1 ! -type d 2>/dev/null) > if [[ -n ${files} ]] ; then >@@ -1739,10 +1769,10 @@ > > # SLOT up libgcj.pc if it's available (and let gcc-config worry about links) > FROMDIR="${PREFIX}/lib/${OS_MULTIDIR}" >- for x in "${D}${FROMDIR}"/pkgconfig/libgcj*.pc ; do >+ for x in "${ED}${FROMDIR}"/pkgconfig/libgcj*.pc ; do > [[ -f ${x} ]] || continue > sed -i "/^libdir=/s:=.*:=${LIBPATH}/${MULTIDIR}:" "${x}" >- mv "${x}" "${D}${FROMDIR}"/pkgconfig/libgcj-${GCC_PV}.pc || die >+ mv "${x}" "${ED}${FROMDIR}"/pkgconfig/libgcj-${GCC_PV}.pc || die > done > done > >@@ -1751,9 +1781,9 @@ > # rmdir SRC/lib/../lib/ > # mv SRC/lib/../lib32/*.o DEST # Bork > for FROMDIR in ${removedirs} ; do >- rmdir "${D}"${FROMDIR} >& /dev/null >+ rmdir "${ED}"${FROMDIR} >& /dev/null > done >- find "${D}" -type d | xargs rmdir >& /dev/null >+ find "${ED}" -type d | xargs rmdir >& /dev/null > } > #----<< src_* >>---- > >@@ -1876,12 +1906,12 @@ > # if the current config is invalid, we definitely want a new one > # Note: due to bash quirkiness, the following must not be 1 line > local curr_config >- curr_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0 >+ curr_config=$(env -i ROOT="${ROOT}" "${EPREFIX}"/usr/bin/gcc-config -c ${CTARGET} 2>&1) || return 0 > > # if the previously selected config has the same major.minor (branch) as > # the version we are installing, then it will probably be uninstalled > # for being in the same SLOT, make sure we run gcc-config. >- local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}') >+ local curr_config_ver=$(env -i ROOT="${ROOT}" "${EPREFIX}"/usr/bin/gcc-config -S ${curr_config} | awk '{print $2}') > > local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) > >@@ -1916,20 +1946,20 @@ > > do_gcc_config() { > if ! should_we_gcc_config ; then >- env -i ROOT="${ROOT}" gcc-config --use-old --force >+ env -i ROOT="${ROOT}" "${EPREFIX}"/usr/bin/gcc-config --use-old --force > return 0 > fi > > local current_gcc_config="" current_specs="" use_specs="" > >- current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>/dev/null) >+ current_gcc_config=$(env -i ROOT="${ROOT}" "${EPREFIX}"/usr/bin/gcc-config -c ${CTARGET} 2>/dev/null) > if [[ -n ${current_gcc_config} ]] ; then > # figure out which specs-specific config is active > current_specs=$(gcc-config -S ${current_gcc_config} | awk '{print $3}') > [[ -n ${current_specs} ]] && use_specs=-${current_specs} > fi > if [[ -n ${use_specs} ]] && \ >- [[ ! -e ${ROOT}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]] >+ [[ ! -e ${EROOT}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]] > then > ewarn "The currently selected specs-specific gcc config," > ewarn "${current_specs}, doesn't exist anymore. This is usually" >@@ -2015,7 +2045,7 @@ > # -are-, and not where they -used- to be. also, any dependencies we have > # on our own .la files need to be updated. > fix_libtool_libdir_paths() { >- pushd "${D}" >/dev/null >+ pushd "${ED}" >/dev/null > > pushd "./${1}" >/dev/null > local dir="${PWD#${D%/}}" >@@ -2024,10 +2054,10 @@ > popd >/dev/null > > sed -i \ >- -e "/^libdir=/s:=.*:='${dir}':" \ >+ -e "/^libdir=/s:=.*:='${EPREFIX}/${dir##/}':" \ > ./${dir}/*.la > sed -i \ >- -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${LIBPATH}/\1:g" \ >+ -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${EPREFIX}/${LIBPATH##/}/\1:g" \ > $(find ./${PREFIX}/lib* -maxdepth 3 -name '*.la') \ > ./${dir}/*.la >
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 474358
:
351678
|
351680
|
354370
|
354372
|
354374
|
354376
| 355744