diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-12-22 01:09:58 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-12-22 01:09:58 +0000 |
commit | 47e9dd816a426d5a08b470ac6388d051c19bd365 (patch) | |
tree | da5bc17027829f55e25031ac6e9e4bd889e4199f /sys-libs | |
parent | version bump (diff) | |
download | gentoo-2-47e9dd816a426d5a08b470ac6388d051c19bd365.tar.gz gentoo-2-47e9dd816a426d5a08b470ac6388d051c19bd365.tar.bz2 gentoo-2-47e9dd816a426d5a08b470ac6388d051c19bd365.zip |
Pull out the cross-compiler prefix handling into alt_prefix to simplify places that need to mess with paths under it.
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/glibc/files/eblits/common.eblit | 21 | ||||
-rw-r--r-- | sys-libs/glibc/files/eblits/src_install.eblit | 22 |
3 files changed, 23 insertions, 27 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index 19faae33919d..43caa0d0e886 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/glibc # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.808 2011/12/14 16:42:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.809 2011/12/22 01:09:58 vapier Exp $ + + 22 Dec 2011; Mike Frysinger <vapier@gentoo.org> files/eblits/common.eblit, + files/eblits/src_install.eblit: + Pull out the cross-compiler prefix handling into alt_prefix to simplify + places that need to mess with paths under it. 14 Dec 2011; Mike Frysinger <vapier@gentoo.org> files/eblits/pkg_setup.eblit: Also filter out glibc binaries when looking for __guard #394453#5 by Michael diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit index 47ea221cca44..4650d73b7880 100644 --- a/sys-libs/glibc/files/eblits/common.eblit +++ b/sys-libs/glibc/files/eblits/common.eblit @@ -1,6 +1,10 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.24 2011/11/17 21:22:53 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.25 2011/12/22 01:09:58 vapier Exp $ + +alt_prefix() { + is_crosscompile && echo /usr/${CTARGET} +} # We need to be able to set alternative headers for # compiling for non-native platform @@ -8,14 +12,7 @@ # the whole system. # note: intentionally undocumented. alt_headers() { - if [[ -z ${ALT_HEADERS} ]] ; then - if is_crosscompile ; then - ALT_HEADERS="/usr/${CTARGET}/usr/include" - else - ALT_HEADERS="/usr/include" - fi - fi - echo "${ALT_HEADERS}" + echo ${ALT_HEADERS:=$(alt_prefix)/usr/include} } alt_build_headers() { if [[ -z ${ALT_BUILD_HEADERS} ]] ; then @@ -32,11 +29,7 @@ alt_build_headers() { } alt_usrlibdir() { - if is_crosscompile ; then - echo /usr/${CTARGET}/usr/$(get_libdir) - else - echo /usr/$(get_libdir) - fi + echo $(alt_prefix)/usr/$(get_libdir) } setup_target_flags() { diff --git a/sys-libs/glibc/files/eblits/src_install.eblit b/sys-libs/glibc/files/eblits/src_install.eblit index 264dd1a0584d..8e757e6d8879 100644 --- a/sys-libs/glibc/files/eblits/src_install.eblit +++ b/sys-libs/glibc/files/eblits/src_install.eblit @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.19 2011/12/12 17:33:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.20 2011/12/22 01:09:58 vapier Exp $ toolchain-glibc_src_install() { local GBUILDDIR @@ -10,8 +10,7 @@ toolchain-glibc_src_install() { GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl fi - local install_root=${D} - is_crosscompile && install_root="${install_root}/usr/${CTARGET}" + local install_root="${D}$(alt_prefix)" if want_linuxthreads ; then cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads einfo "Installing GLIBC ${ABI} with linuxthreads ..." @@ -72,16 +71,15 @@ toolchain-glibc_src_install() { # Make sure the non-native interp can be found on multilib systems if [[ ${SYMLINK_LIB} == "yes" ]] && has_multilib_profile ; then + local abi32 ldso case $(tc-arch) in - amd64) - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib - dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2 - ;; - ppc64) - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib - dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1 - ;; + amd64) abi32="x86" ldso="ld-linux.so.2" ;; + ppc64) abi32="ppc" ldso="ld.so.1" ;; esac + if [[ -n ${ldso} ]] ; then + [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + dosym ../$(get_abi_LIBDIR ${abi32})/${ldso} $(alt_prefix)/lib/${ldso} + fi fi ################################################################# @@ -99,7 +97,7 @@ toolchain-glibc_src_install() { cd "${D}"$(alt_usrlibdir)/.. [[ -e lib ]] || mkdir lib - dosym usr/include /usr/${CTARGET}/sys-include + dosym usr/include $(alt_prefix)/sys-include return 0 fi |