Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 473728 | Differences between
and this patch

Collapse All | Expand All

(-)glibc/files/eblits/src_install.eblit (-2 / +2 lines)
Lines 10-16 toolchain-glibc_src_install() { Link Here
10
		GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
10
		GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
11
	fi
11
	fi
12
12
13
	local install_root="${D}$(alt_prefix)"
13
	local install_root="${D}${EPREFIX%${TPREFIX}}/$(alt_prefix)"
14
	if want_linuxthreads ; then
14
	if want_linuxthreads ; then
15
		cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
15
		cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
16
		einfo "Installing GLIBC ${ABI} with linuxthreads ..."
16
		einfo "Installing GLIBC ${ABI} with linuxthreads ..."
Lines 190-196 toolchain-glibc_src_install() { Link Here
190
toolchain-glibc_headers_install() {
190
toolchain-glibc_headers_install() {
191
	local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
191
	local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
192
	cd "${GBUILDDIR}"
192
	cd "${GBUILDDIR}"
193
	emake install_root="${D}$(alt_prefix)" install-headers || die
193
	emake install_root="${D}${EPREFIX%${TPREFIX}}/$(alt_prefix)" install-headers || die
194
	if ! version_is_at_least 2.16 ; then
194
	if ! version_is_at_least 2.16 ; then
195
		insinto $(alt_headers)/bits
195
		insinto $(alt_headers)/bits
196
		doins bits/stdio_lim.h || die
196
		doins bits/stdio_lim.h || die
(-)glibc/files/eblits/src_compile.eblit (-9 / +11 lines)
Lines 74-85 glibc_do_configure() { Link Here
74
		--host=${CTARGET_OPT:-${CTARGET}}
74
		--host=${CTARGET_OPT:-${CTARGET}}
75
		$(use_enable profile)
75
		$(use_enable profile)
76
		$(use_with gd)
76
		$(use_with gd)
77
		--with-headers=$(alt_build_headers)
77
		--with-headers="${EPREFIX}$(alt_build_headers)"
78
		--prefix=/usr
78
		--prefix="${TPREFIX}/usr"
79
		--libdir=/usr/$(get_libdir)
79
		--libdir="${TPREFIX}/usr/$(get_libdir)"
80
		--mandir=/usr/share/man
80
		--mandir="${TPREFIX}/usr/share/man"
81
		--infodir=/usr/share/info
81
		--infodir="${TPREFIX}/usr/share/info"
82
		--libexecdir=/usr/$(get_libdir)/misc/glibc
82
		--libexecdir="${TPREFIX}/usr/$(get_libdir)/misc/glibc"
83
		--sysconfdir="${TPREFIX}/etc"
84
		--localstatedir="${TPREFIX}/var"
83
		--with-bugurl=http://bugs.gentoo.org/
85
		--with-bugurl=http://bugs.gentoo.org/
84
		--with-pkgversion="$(glibc_banner)"
86
		--with-pkgversion="$(glibc_banner)"
85
		$(use_multiarch || echo --disable-multi-arch)
87
		$(use_multiarch || echo --disable-multi-arch)
Lines 91-97 glibc_do_configure() { Link Here
91
93
92
	# There is no configure option for this and we need to export it
94
	# There is no configure option for this and we need to export it
93
	# since the glibc build will re-run configure on itself
95
	# since the glibc build will re-run configure on itself
94
	export libc_cv_slibdir=/$(get_libdir)
96
	export libc_cv_slibdir="${TPREFIX}/$(get_libdir)"
95
97
96
	# We take care of patching our binutils to use both hash styles,
98
	# We take care of patching our binutils to use both hash styles,
97
	# and many people like to force gnu hash style only, so disable
99
	# and many people like to force gnu hash style only, so disable
Lines 199-206 toolchain-glibc_headers_compile() { Link Here
199
		--enable-bind-now
201
		--enable-bind-now
200
		--build=${CBUILD_OPT:-${CBUILD}}
202
		--build=${CBUILD_OPT:-${CBUILD}}
201
		--host=${CTARGET_OPT:-${CTARGET}}
203
		--host=${CTARGET_OPT:-${CTARGET}}
202
		--with-headers=$(alt_build_headers)
204
		--with-headers="${EPREFIX}$(alt_build_headers)"
203
		--prefix=/usr
205
		--prefix="${TPREFIX}/usr"
204
		${EXTRA_ECONF}
206
		${EXTRA_ECONF}
205
	)
207
	)
206
208
(-)glibc/files/eblits/common.eblit (-1 / +19 lines)
Lines 2-11 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.29 2012/12/28 19:00:51 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.29 2012/12/28 19:00:51 vapier Exp $
4
4
5
# There are many directory offsets here that can lead to confusion. We summarize the senarios in this table
6
# P:=Prefix X:=Cross-Triplet
7
# example of configure host: --with-headers
8
# example of configure target: --libdir
9
#
10
# variation   phase               PX                      X               P         solution
11
# -----------+-------------------+-----------------------+---------------+---------+----------------------------------------
12
# host        configure           EPREFIX/usr/CTARGET     /usr/CTARGET    EPREFIX   $EPREFIX/$(alt_prefix)
13
# target      configure           NULL                    NULL            EPREFIX   $TPREFIX
14
# -----------+-------------------+-----------------------+---------------+---------+----------------------------------------
15
# host        install_root        D/EPREFIX/usr/CTARGET   D/usr/CTARGET   D         ${D}/${EPREFIX%$TPREFIX}/$(alt_prefix)
16
# -----------+-------------------+-----------------------+---------------+---------+----------------------------------------
17
# host        ebuild helper ED/   /usr/CTARGET            /usr/CTARGET    NULL      $(alt_prefix)
18
#
19
# alt_prefix and TPREFIX in the table are defined as followed
20
5
alt_prefix() {
21
alt_prefix() {
6
	is_crosscompile && echo /usr/${CTARGET}
22
	is_crosscompile && echo /usr/${CTARGET}
7
}
23
}
8
24
25
TPREFIX=$(is_crosscompile || echo "${EPREFIX}")
26
9
: ${ED:=${D}}
27
: ${ED:=${D}}
10
: ${EROOT:=${ROOT}}
28
: ${EROOT:=${ROOT}}
11
29
Lines 22-28 alt_build_headers() { Link Here
22
		ALT_BUILD_HEADERS=$(alt_headers)
40
		ALT_BUILD_HEADERS=$(alt_headers)
23
		if tc-is-cross-compiler ; then
41
		if tc-is-cross-compiler ; then
24
			ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
42
			ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
25
			if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
43
			if [[ ! -e ${EPREFIX}/${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
26
				local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
44
				local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
27
				ALT_BUILD_HEADERS=${header_path%/linux/version.h}
45
				ALT_BUILD_HEADERS=${header_path%/linux/version.h}
28
			fi
46
			fi

Return to bug 473728