summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-11-18 03:52:09 +0000
committerMike Frysinger <vapier@gentoo.org>2005-11-18 03:52:09 +0000
commita0f01d1ca81ffa30d69fe99e02b848f74dcb5eb3 (patch)
tree0c9ad70fbf3b5f86a27b8908823cd0306b6097cc /sys-libs/glibc
parentonly check nls stuff if ROOT == / (diff)
downloadhistorical-a0f01d1ca81ffa30d69fe99e02b848f74dcb5eb3.tar.gz
historical-a0f01d1ca81ffa30d69fe99e02b848f74dcb5eb3.tar.bz2
historical-a0f01d1ca81ffa30d69fe99e02b848f74dcb5eb3.zip
Add support for just installing glibc headers when doing a cross-compile.
Package-Manager: portage-2.0.53_rc7
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r--sys-libs/glibc/ChangeLog5
-rw-r--r--sys-libs/glibc/Manifest10
-rw-r--r--sys-libs/glibc/glibc-2.3.6-r1.ebuild71
3 files changed, 71 insertions, 15 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog
index 3ed76430e3ae..43b2e479857a 100644
--- a/sys-libs/glibc/ChangeLog
+++ b/sys-libs/glibc/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-libs/glibc
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.410 2005/11/14 22:52:59 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.411 2005/11/18 03:52:09 vapier Exp $
+
+ 18 Nov 2005; Mike Frysinger <vapier@gentoo.org> glibc-2.3.6-r1.ebuild:
+ Add support for just installing glibc headers when doing a cross-compile.
*glibc-2.3.6-r1 (14 Nov 2005)
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 5673389f72b1..40587429ce30 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -1,7 +1,7 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 279506bd49b3de03a0dad874887f031e ChangeLog 86628
+MD5 15452ce5c55ab01fe633b28301eff49a ChangeLog 86778
MD5 941f13d27badc76c1e3704c59acaff26 files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823
MD5 67b125cec4f1f0d26ce4df706451fee6 files/2.3.1/glibc-2.3.1-fpu-cw-mips.patch 433
MD5 1c4e567ed001f9489e11ee06c1ced0b7 files/2.3.1/glibc-2.3.1-libc_wait-compat.patch 1053
@@ -137,13 +137,13 @@ MD5 4536ac9d1f309dc0890741dce8cb012e glibc-2.3.5-r3.ebuild 38908
MD5 1cb57f1757c26c0e0286cb0ef6c36171 glibc-2.3.5.20050421.ebuild 40152
MD5 48b60115273ba9fa755a6ef94fe8c3b6 glibc-2.3.5.20050722.ebuild 39299
MD5 9c15c32a0bbef91769c4fd0c0d7a66c3 glibc-2.3.5.ebuild 40143
-MD5 117f5cb72f6e34b5ad0d8d9310c716b4 glibc-2.3.6-r1.ebuild 40317
+MD5 eb6575db85582f440333c8f79e5a1ca1 glibc-2.3.6-r1.ebuild 42013
MD5 c1860f958f09de634ae4e2e0b0377bd9 glibc-2.3.6.ebuild 40082
MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFDfBXxgIKl8Uu19MoRAqa7AJ9X3odnwW7NiXNpHplIdXAWsG2CSwCfcMuK
-5DoaMh3QOmoerTpeweHvojY=
-=78lc
+iD8DBQFDfVBAgIKl8Uu19MoRAq0QAJ0ceRpawZ4LqUD31dEkOsl+HTwdowCfRy9E
+5iiyfCxt3HJu1sswtcPE7HA=
+=DAX0
-----END PGP SIGNATURE-----
diff --git a/sys-libs/glibc/glibc-2.3.6-r1.ebuild b/sys-libs/glibc/glibc-2.3.6-r1.ebuild
index e9b6caa05f53..b39193dc3f7e 100644
--- a/sys-libs/glibc/glibc-2.3.6-r1.ebuild
+++ b/sys-libs/glibc/glibc-2.3.6-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6-r1.ebuild,v 1.2 2005/11/17 05:31:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6-r1.ebuild,v 1.3 2005/11/18 03:52:09 vapier Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -66,6 +66,10 @@ fi
is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
+just_headers() {
+ [[ -z ${_E_CROSS_HEADERS_ONLY} ]] && return 1
+ is_crosscompile
+}
GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
@@ -248,6 +252,31 @@ toolchain-glibc_src_compile() {
fi
}
+toolchain-glibc_headers_compile() {
+ GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
+ mkdir -p "${GBUILDDIR}"
+ cd "${GBUILDDIR}"
+
+ local myconf="--disable-sanity-checks --enable-hacker-mode"
+ myconf="${myconf}
+ --enable-add-ons=linuxthreads
+ --without-cvs
+ --enable-bind-now
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ --with-headers=${ROOT}$(alt_headers)
+ --prefix=$(alt_prefix)
+ --mandir=$(alt_prefix)/share/man
+ --infodir=$(alt_prefix)/share/info
+ --libexecdir=$(alt_prefix)/lib/misc/glibc
+ ${EXTRA_ECONF}"
+
+ einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
+ CC=gcc \
+ CFLAGS="-O1 -pipe" \
+ ${S}/configure ${myconf} || die "failed to configure glibc"
+}
+
toolchain-glibc_src_test() {
# This is wrong, but glibc's tests fail bad when screwing
# around with sandbox, so lets just punt it
@@ -515,6 +544,23 @@ toolchain-glibc_src_install() {
done
}
+toolchain-glibc_headers_install() {
+ GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
+ cd "${GBUILDDIR}"
+ make install_root="${D}" install-headers || die "install-headers failed"
+ # Copy over headers that are not part of install-headers ... these
+ # are pretty much taken verbatim from crosstool, see it for more details
+ insinto $(alt_headers)/bits
+ doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h || die "doins include gnu"
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym include $(alt_prefix)/sys-include
+ dosym . $(alt_prefix)/usr
+}
+
toolchain-glibc_pkg_postinst() {
# Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
# isn't removed in unmerge which happens sometimes. See bug #87671
@@ -863,12 +909,6 @@ setup_locales() {
glibc_do_configure() {
local myconf
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
# set addons
pushd ${S} > /dev/null
ADDONS=$(echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d')
@@ -994,6 +1034,11 @@ use_multilib() {
# Setup toolchain variables that would be defined in the profiles for these archs.
setup_env() {
+ # These should not be set, else the zoneinfo do not always get installed ...
+ unset LANGUAGE LANG LC_ALL
+ # silly users
+ unset LD_RUN_PATH
+
if is_crosscompile || tc-is-cross-compiler ; then
multilib_env ${CTARGET}
if ! use multilib ; then
@@ -1208,7 +1253,11 @@ src_compile() {
fi
fi
- toolchain-glibc_src_compile
+ if just_headers ; then
+ toolchain-glibc_headers_compile
+ else
+ toolchain-glibc_src_compile
+ fi
}
src_test() {
@@ -1267,7 +1316,11 @@ src_install() {
fi
fi
- toolchain-glibc_src_install
+ if just_headers ; then
+ toolchain-glibc_headers_install
+ else
+ toolchain-glibc_src_install
+ fi
# Handle stupid lib32 BS on amd64 and ppc64
if [[ -n ${OLD_LIBDIR} ]] ; then