Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 351336 Details for
Bug 473728
sys-libs/glibc Prefix support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
glibc.patch
glibc.patch (text/plain), 12.88 KB, created by
Benda Xu
on 2013-06-18 18:12:48 UTC
(
hide
)
Description:
glibc.patch
Filename:
MIME Type:
Creator:
Benda Xu
Created:
2013-06-18 18:12:48 UTC
Size:
12.88 KB
patch
obsolete
>Index: glibc/files/eblits/common.eblit >=================================================================== >--- glibc.orig/files/eblits/common.eblit >+++ glibc/files/eblits/common.eblit >@@ -2,24 +2,32 @@ > # 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.29 2012/12/28 19:00:51 vapier Exp $ > >-alt_prefix() { >+alt_arch_prefix() { > is_crosscompile && echo /usr/${CTARGET} > } > >+alt_prefix() { >+ is_crosscompile && echo "${EPREFIX}/usr/${CTARGET}" >+} >+ >+alt_eprefix() { >+ is_crosscompile || echo "${EPREFIX}" >+} >+ > # We need to be able to set alternative headers for > # compiling for non-native platform > # Will also become useful for testing kernel-headers without screwing up > # the whole system. > # note: intentionally undocumented. > alt_headers() { >- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include} >+ echo ${ALT_HEADERS:=$(alt_arch_prefix)/usr/include} > } > alt_build_headers() { > if [[ -z ${ALT_BUILD_HEADERS} ]] ; then > ALT_BUILD_HEADERS=$(alt_headers) > if tc-is-cross-compiler ; then > ALT_BUILD_HEADERS=${ROOT}$(alt_headers) >- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then >+ if [[ ! -e ${EPREFIX}/${ALT_BUILD_HEADERS}/linux/version.h ]] ; then > local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') > ALT_BUILD_HEADERS=${header_path%/linux/version.h} > fi >@@ -29,10 +37,10 @@ alt_build_headers() { > } > > alt_libdir() { >- echo $(alt_prefix)/$(get_libdir) >+ echo $(alt_arch_prefix)/$(get_libdir) > } > alt_usrlibdir() { >- echo $(alt_prefix)/usr/$(get_libdir) >+ echo $(alt_arch_prefix)/usr/$(get_libdir) > } > > setup_target_flags() { >@@ -259,8 +267,9 @@ setup_env() { > # silly users > unset LD_RUN_PATH > >- multilib_env ${CTARGET_OPT:-${CTARGET}} > if is_crosscompile || tc-is-cross-compiler ; then >+ multilib_env ${CTARGET_OPT:-${CTARGET}} >+ > if ! use multilib ; then > MULTILIB_ABIS=${DEFAULT_ABI} > else >Index: glibc/files/eblits/pkg_preinst.eblit >=================================================================== >--- glibc.orig/files/eblits/pkg_preinst.eblit >+++ glibc/files/eblits/pkg_preinst.eblit >@@ -15,7 +15,7 @@ glibc_sanity_check() { > # lead to unsafe code execution if the generated prefix is > # within a world-writable directory. > # (e.g. /var/tmp/portage:${HOSTNAME}) >- pushd "${D}"/$(get_libdir) >/dev/null >+ pushd "${ED}"/$(get_libdir) >/dev/null > > local x striptest > for x in date env ls true uname ; do >@@ -35,17 +35,17 @@ eblit-glibc-pkg_preinst() { > just_headers && return > > # prepare /etc/ld.so.conf.d/ for files >- mkdir -p "${ROOT}"/etc/ld.so.conf.d >+ mkdir -p "${EROOT}"/etc/ld.so.conf.d > > # Default /etc/hosts.conf:multi to on for systems with small dbs. >- if [[ $(wc -l < "${ROOT}"/etc/hosts) -lt 1000 ]] ; then >- sed -i '/^multi off/s:off:on:' "${D}"/etc/host.conf >+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then >+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf > elog "Defaulting /etc/host.conf:multi to on" > fi > > [[ ${ROOT} != "/" ]] && return 0 > [[ -d ${D}/$(get_libdir) ]] || return 0 >- glibc_sanity_check >+ use prefix || glibc_sanity_check > > # Make sure devpts is mounted correctly for use w/out setuid pt_chown. > if in_iuse suid && ! use suid ; then >Index: glibc/files/eblits/pkg_setup.eblit >=================================================================== >--- glibc.orig/files/eblits/pkg_setup.eblit >+++ glibc/files/eblits/pkg_setup.eblit >@@ -98,18 +98,18 @@ eblit-glibc-pkg_setup() { > > # Make sure host system is up to date #394453 > if has_version '<sys-libs/glibc-2.13' && \ >- [[ -n $(scanelf -qys__guard -F'#s%F' "${ROOT}"/lib*/l*-*.so) ]] >+ [[ -n $(scanelf -qys__guard -F'#s%F' "${EROOT}"/lib*/l*-*.so) ]] > then > ebegin "Scanning system for __guard to see if you need to rebuild first ..." > local files=$( > scanelf -qys__guard -F'#s%F' \ >- "${ROOT}"/*bin/ \ >- "${ROOT}"/lib* \ >- "${ROOT}"/usr/*bin/ \ >- "${ROOT}"/usr/lib* | \ >+ "${EROOT}"/*bin/ \ >+ "${EROOT}"/lib* \ >+ "${EROOT}"/usr/*bin/ \ >+ "${EROOT}"/usr/lib* | \ > egrep -v \ >- -e "^${ROOT}/lib.*/(libc|ld)-2.*.so$" \ >- -e "^${ROOT}/sbin/(ldconfig|sln)$" >+ -e "^${EROOT}/lib.*/(libc|ld)-2.*.so$" \ >+ -e "^${EROOT}/sbin/(ldconfig|sln)$" > ) > [[ -z ${files} ]] > if ! eend $? ; then >Index: glibc/files/eblits/src_compile.eblit >=================================================================== >--- glibc.orig/files/eblits/src_compile.eblit >+++ glibc/files/eblits/src_compile.eblit >@@ -74,12 +74,14 @@ glibc_do_configure() { > --host=${CTARGET_OPT:-${CTARGET}} > $(use_enable profile) > $(use_with gd) >- --with-headers=$(alt_build_headers) >- --prefix=/usr >- --libdir=/usr/$(get_libdir) >- --mandir=/usr/share/man >- --infodir=/usr/share/info >- --libexecdir=/usr/$(get_libdir)/misc/glibc >+ --with-headers="$(alt_eprefix)"$(alt_build_headers) >+ --prefix="$(alt_eprefix)"/usr >+ --libdir="$(alt_eprefix)"/usr/$(get_libdir) >+ --mandir="$(alt_eprefix)"/usr/share/man >+ --infodir="$(alt_eprefix)"/usr/share/info >+ --libexecdir="$(alt_eprefix)"/usr/$(get_libdir)/misc/glibc >+ --sysconfdir="$(alt_eprefix)"/etc >+ --localstatedir="$(alt_eprefix)"/var > --with-bugurl=http://bugs.gentoo.org/ > --with-pkgversion="$(glibc_banner)" > $(use_multiarch || echo --disable-multi-arch) >@@ -91,7 +93,7 @@ glibc_do_configure() { > > # There is no configure option for this and we need to export it > # since the glibc build will re-run configure on itself >- export libc_cv_slibdir=/$(get_libdir) >+ export libc_cv_slibdir="$(alt_eprefix)"/$(get_libdir) > > # We take care of patching our binutils to use both hash styles, > # and many people like to force gnu hash style only, so disable >@@ -199,8 +201,8 @@ toolchain-glibc_headers_compile() { > --enable-bind-now > --build=${CBUILD_OPT:-${CBUILD}} > --host=${CTARGET_OPT:-${CTARGET}} >- --with-headers=$(alt_build_headers) >- --prefix=/usr >+ --with-headers=$(alt_eprefix)$(alt_build_headers) >+ --prefix="$(alt_eprefix)"/usr > ${EXTRA_ECONF} > ) > >Index: glibc/files/eblits/src_install.eblit >=================================================================== >--- glibc.orig/files/eblits/src_install.eblit >+++ glibc/files/eblits/src_install.eblit >@@ -34,37 +34,37 @@ toolchain-glibc_src_install() { > else > src_lib=$(eval echo */${l}) > fi >- cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" >+ cp -a ${src_lib} "${ED}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" > fperms a+rx $(alt_libdir)/tls/${l} > dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) > > # then grab the linker script or the symlink ... >- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then >+ if [[ -L ${ED}$(alt_usrlibdir)/${l} ]] ; then > dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} > else > sed \ > -e "s:/${l}:/tls/${l}:g" \ > -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ >- "${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l} >+ "${ED}"$(alt_usrlibdir)/${l} > "${ED}"$(alt_usrlibdir)/nptl/${l} > fi > > # then grab the static lib ... > src_lib=${src_lib/%.so/.a} > [[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} >- cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" >+ cp -a ${src_lib} "${ED}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" > src_lib=${src_lib/%.a/_nonshared.a} > if [[ -e ${src_lib} ]] ; then >- cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" >+ cp -a ${src_lib} "${ED}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" > fi > done > > # use the nptl linker instead of the linuxthreads one as the linuxthreads > # one may lack TLS support and that can be really bad for business >- cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" >+ cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" > fi > > # We'll take care of the cache ourselves >- rm -f "${D}"/etc/ld.so.cache >+ rm -f "${ED}"/etc/ld.so.cache > > # Everything past this point just needs to be done once ... > is_final_abi || return 0 >@@ -92,8 +92,8 @@ toolchain-glibc_src_install() { > sparc32 /lib/ld-linux.so.2 > sparc64 /lib64/ld-linux.so.2 > ) >- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${D}/$(alt_prefix)/lib ]] ; then >- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib >+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${D}$(alt_eprefix)/$(alt_prefix)/lib ]] ; then >+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_arch_prefix)/lib > fi > for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do > ldso_abi=${ldso_abi_list[i]} >@@ -122,12 +122,12 @@ toolchain-glibc_src_install() { > # gcc likes to use relative paths to get to its multilibs like > # /usr/lib/../lib64/. So while we don't install any files into > # /usr/lib/, we do need it to exist. >- cd "${D}"$(alt_libdir)/.. >+ cd "${ED}"$(alt_libdir)/.. > [[ -e lib ]] || mkdir lib >- cd "${D}"$(alt_usrlibdir)/.. >+ cd "${ED}"$(alt_usrlibdir)/.. > [[ -e lib ]] || mkdir lib > >- dosym usr/include $(alt_prefix)/sys-include >+ dosym usr/include $(alt_arch_prefix)/sys-include > return 0 > fi > >@@ -137,7 +137,7 @@ toolchain-glibc_src_install() { > -e "/^#/d" \ > -e "/SUPPORTED-LOCALES=/d" \ > -e "s: \\\\::g" -e "s:/: :g" \ >- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \ >+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ > || die "generating /usr/share/i18n/SUPPORTED failed" > cd "${WORKDIR}"/extra/locale > dosbin locale-gen || die >@@ -150,7 +150,7 @@ toolchain-glibc_src_install() { > local a > keepdir /usr/$(get_libdir)/locale > for a in $(get_install_abis) ; do >- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then >+ if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then > dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale > fi > done >@@ -166,13 +166,13 @@ toolchain-glibc_src_install() { > doinitd "${WORKDIR}"/extra/etc/nscd || die > > local nscd_args=( >- -e "s:@PIDFILE@:$(strings "${D}"/usr/sbin/nscd | grep nscd.pid):" >+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" > ) > version_is_at_least 2.16 || nscd_args+=( -e 's: --foreground : :' ) >- sed -i "${nscd_args[@]}" "${D}"/etc/init.d/nscd >+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd > else > # Do this since extra/etc/*.conf above might have nscd.conf. >- rm -f "${D}"/etc/nscd.conf >+ rm -f "${ED}"/etc/nscd.conf > fi > > echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc >@@ -184,7 +184,7 @@ toolchain-glibc_src_install() { > > # Prevent overwriting of the /etc/localtime symlink. We'll handle the > # creation of the "factory" symlink in pkg_postinst(). >- rm -f "${D}"/etc/localtime >+ rm -f "${ED}"/etc/localtime > } > > toolchain-glibc_headers_install() { >@@ -216,7 +216,7 @@ src_strip() { > # if user has stripping enabled and does not have split debug turned on, > # then leave the debugging sections in libpthread. > if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then >- ${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so >+ ${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"/*/libpthread-*.so > fi > } > >Index: glibc/files/eblits/src_unpack.eblit >=================================================================== >--- glibc.orig/files/eblits/src_unpack.eblit >+++ glibc/files/eblits/src_unpack.eblit >@@ -17,7 +17,7 @@ eend_KV() { > > get_kheader_version() { > printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \ >- $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \ >+ $(tc-getCPP ${CTARGET}) -I "${EPREFIX}/$(alt_build_headers)" | \ > tail -n 1 > } > >@@ -110,6 +110,9 @@ toolchain-glibc_src_unpack() { > done > fi > >+ epatch "${FILESDIR}"/2.17/locale-gen_prefix.patch >+ eprefixify "${WORKDIR}"/extra/locale/locale-gen >+ > # XXX: We should do the branchupdate, before extracting the manpages and > # infopages else it does not help much (mtimes change if there is a change > # to them with branchupdate) >Index: glibc/glibc-2.17.ebuild >=================================================================== >--- glibc.orig/glibc-2.17.ebuild >+++ glibc/glibc-2.17.ebuild >@@ -1,14 +1,15 @@ > # Copyright 1999-2013 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.17.ebuild,v 1.13 2013/04/28 04:00:36 vapier Exp $ >+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.17.ebuild,v 1.9 2013/03/28 05:03:58 vapier Exp $ > > inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib unpacker multiprocessing >+inherit prefix > > DESCRIPTION="GNU libc6 (also called glibc2) C library" > HOMEPAGE="http://www.gnu.org/software/libc/libc.html" > > LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" >-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" >+KEYWORDS="~alpha ~amd64 ~arm -hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" > RESTRICT="strip" # strip ourself #46186 > EMULTILIB_PKG="true" >
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 473728
:
351336
|
351386
|
351388
|
351402
|
351436
|
352204
|
390684
|
435510
|
435512
|
436150