summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2004-02-09 23:41:33 +0000
committerDaniel Black <dragonheart@gentoo.org>2004-02-09 23:41:33 +0000
commit322e889fe52e22e10acac6ef2298a4df87c16652 (patch)
tree805dd42ccd0447edf02f8aeb417a01d3e52629a3 /sys-devel/uclibc-buildroot
parentversion bump (diff)
downloadhistorical-322e889fe52e22e10acac6ef2298a4df87c16652.tar.gz
historical-322e889fe52e22e10acac6ef2298a4df87c16652.tar.bz2
historical-322e889fe52e22e10acac6ef2298a4df87c16652.zip
Removed PROVIDE virtual/glibc - was a bit preemtive. Removed pie.patch and sundry other fixes.
Diffstat (limited to 'sys-devel/uclibc-buildroot')
-rw-r--r--sys-devel/uclibc-buildroot/ChangeLog11
-rw-r--r--sys-devel/uclibc-buildroot/Manifest5
-rw-r--r--sys-devel/uclibc-buildroot/files/0.9.26/uClibc-0.9.26-pie-option.patch18
-rw-r--r--sys-devel/uclibc-buildroot/files/digest-uclibc-buildroot-2004020911
-rw-r--r--sys-devel/uclibc-buildroot/uclibc-buildroot-20040209.ebuild420
5 files changed, 444 insertions, 21 deletions
diff --git a/sys-devel/uclibc-buildroot/ChangeLog b/sys-devel/uclibc-buildroot/ChangeLog
index 293f7140b428..682482294b8b 100644
--- a/sys-devel/uclibc-buildroot/ChangeLog
+++ b/sys-devel/uclibc-buildroot/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-devel/uclibc-buildroot
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/uclibc-buildroot/ChangeLog,v 1.5 2004/02/05 06:14:56 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/uclibc-buildroot/ChangeLog,v 1.6 2004/02/09 23:41:33 dragonheart Exp $
+
+*uclibc-buildroot-20040209 (10 Feb 2004)
+
+ 10 Feb 2004; Daniel Black <dragonheart@gentoo.org>
+ uclibc-buildroot-20040209.ebuild,
+ files/0.9.26/uClibc-0.9.26-pie-option.patch:
+ Removed PROVIDE virtual/glibc - was a bit preemtive.
+ Version bump - now uses busybox-1.00-pre7 instead of the buggy
+ busybox-1.00-pre6. Removed unused files/0.9.26/uClibc-0.9.26-pie-option.patch
05 Feb 2004; Daniel Black <dragonheart@gentoo.org>
uclibc-buildroot-20040131.ebuild:
diff --git a/sys-devel/uclibc-buildroot/Manifest b/sys-devel/uclibc-buildroot/Manifest
index 2b4f0ba0b264..66ada5c23102 100644
--- a/sys-devel/uclibc-buildroot/Manifest
+++ b/sys-devel/uclibc-buildroot/Manifest
@@ -1,9 +1,10 @@
-MD5 4877d9d385304d6f7a62cf22d0e50b1d ChangeLog 1267
+MD5 5cf3e9d46fdf5592afbf25b565f68c57 ChangeLog 1646
MD5 bebf5ce8bd6516ef42239ea5b8de3e0b metadata.xml 262
MD5 e84503816948db7967e31882383f09ae uclibc-buildroot-20040131.ebuild 13080
+MD5 c77451376574cb5c87d600d130c79746 uclibc-buildroot-20040209.ebuild 13079
MD5 b8ec0025f826b1c01cbcb1b1cc018c18 files/digest-uclibc-buildroot-20040131 766
MD5 fed0ccb5a3b2aefd4671c2e470dadeeb files/uClibc-0.9.26-Makefile.patch 1764
MD5 4f9f87ac7690d24d225c32d6804894a8 files/uClibc-0.9.26-pie-option.patch 863
MD5 57ccd7c3d467bafb128bee068a4925de files/Makefile-buildroot-helpers.patch 859
+MD5 23b8cced26f5f07c7912360d5ebcc286 files/digest-uclibc-buildroot-20040209 766
MD5 fed0ccb5a3b2aefd4671c2e470dadeeb files/0.9.26/uClibc-0.9.26-Makefile.patch 1764
-MD5 4f9f87ac7690d24d225c32d6804894a8 files/0.9.26/uClibc-0.9.26-pie-option.patch 863
diff --git a/sys-devel/uclibc-buildroot/files/0.9.26/uClibc-0.9.26-pie-option.patch b/sys-devel/uclibc-buildroot/files/0.9.26/uClibc-0.9.26-pie-option.patch
deleted file mode 100644
index ff539bc0ffb4..000000000000
--- a/sys-devel/uclibc-buildroot/files/0.9.26/uClibc-0.9.26-pie-option.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- extra/Configs/Config.in.orig 2004-01-03 09:04:12.000000000 +0930
-+++ extra/Configs/Config.in 2004-01-16 02:17:58.226162576 +0930
-@@ -180,13 +180,14 @@
- config UCLIBC_PIE_SUPPORT
- bool "Support ET_DYN in shared library loader"
- select FORCE_SHAREABLE_TEXT_SEGMENTS
-+ select UCLIBC_COMPLETELY_PIC
- default n
- help
- If you answer Y here, the uClibc native shared library loader will
- support ET_DYN/PIE executables.
- It requires binutils-2.14.90.0.6 or later and the usage of the
- -pie option.
-- More about ET_DYN/PIE binaries on <http://pageexec.virtualave.net/> .
-+ More about ET_DYN/PIE binaries on <http://pax.grsecurity.net/>.
- WARNING: This option also enables FORCE_SHAREABLE_TEXT_SEGMENTS, so all
- libraries have to be built with -fPIC or -fpic, and all assembler
- functions must be written as position independent code (PIC).
diff --git a/sys-devel/uclibc-buildroot/files/digest-uclibc-buildroot-20040209 b/sys-devel/uclibc-buildroot/files/digest-uclibc-buildroot-20040209
new file mode 100644
index 000000000000..c82c95b1a71d
--- /dev/null
+++ b/sys-devel/uclibc-buildroot/files/digest-uclibc-buildroot-20040209
@@ -0,0 +1,11 @@
+MD5 65999f654102f5438ac8562d13a6eced gcc-3.3.2.tar.bz2 23585904
+MD5 90f5b22237125410d9a6f1ee50c49f5a buildroot-20040209.tar.bz2 445297
+MD5 71b99dba3045a359dc314dbebedcf502 binutils-2.14.90.0.6.tar.bz2 10399066
+MD5 bdb75568d5de42aa634cc853935bbb6d kernel-headers-2.4.21.tar.bz2 3776835
+MD5 7212713c432dd0de6ec2140c2a6212e4 uClibc-0.9.26.tar.bz2 1604543
+MD5 d75b2239b4e27c3c9cbed1c8f6eabba6 uClibc-locale-030818.tgz 236073
+MD5 a18c8048786b88fc042f92823c6a1cd1 elf2flt-20030620.tar.bz2 51298
+MD5 b59435eafef2924502b07bcf2e75613d busybox-1.00-pre7.tar.bz2 1103451
+MD5 44da0ff2b727455669890b24305e351d tinylogin-1.4.tar.bz2 98502
+MD5 3501a47b14e92be3b1de2a90eb5f10cc libfloat_990616.orig.tar.gz 1475698
+MD5 a51efc8a3b3619b0b7ed084efa812474 libfloat_990616-3.diff.gz 2985
diff --git a/sys-devel/uclibc-buildroot/uclibc-buildroot-20040209.ebuild b/sys-devel/uclibc-buildroot/uclibc-buildroot-20040209.ebuild
new file mode 100644
index 000000000000..ec7bed4250cc
--- /dev/null
+++ b/sys-devel/uclibc-buildroot/uclibc-buildroot-20040209.ebuild
@@ -0,0 +1,420 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/uclibc-buildroot/uclibc-buildroot-20040209.ebuild,v 1.1 2004/02/09 23:41:33 dragonheart Exp $
+
+inherit eutils crosscompile
+
+# Derived from gcc-3_3.mk and binutils.mk
+GCCVER=3.3.2
+BINUTILSVER=2.14.90.0.6
+UCLIBCVER=0.9.26
+BUSYBOXVER=1.00-pre7
+TINYLOGINVER=1.4
+
+DESCRIPTION="Embedded root file system"
+HOMEPAGE="http://www.uclibc.org/"
+SRC_URI="mirror://gnu/gcc/gcc-${GCCVER}/gcc-${GCCVER}.tar.bz2
+ http://dev.gentoo.org/~dragonheart/buildroot-${PV}.tar.bz2
+ mirror://kernel/linux/devel/binutils/binutils-${BINUTILSVER}.tar.bz2
+ mirror://kernel/linux/libs/uclibc/toolchain/kernel-headers-2.4.21.tar.bz2
+ mirror://kernel/linux/libs/uclibc/uClibc-${UCLIBCVER}.tar.bz2
+ nls? ( mirror://kernel/linux/libs/uclibc/uClibc-locale-030818.tgz )
+ nommu? ( mirror://kernel/linux/libs/uclibc/toolchain/elf2flt-20030620.tar.bz2 )
+ debug? ( http://www.busybox.net/downloads/busybox-${BUSYBOXVER}.tar.bz2 )
+ debug? ( http://tinylogin.busybox.net/downloads/tinylogin-${TINYLOGINVER}.tar.bz2 )
+ softfloat? ( mirror://debian/pool/main/libf/libfloat/libfloat_990616.orig.tar.gz )
+ softfloat? ( mirror://debian/pool/main/libf/libfloat/libfloat_990616-3.diff.gz )"
+
+# TODO pregen local is only x86
+#nls? ( x86? ( mirror://kernel/linux/libs/uclibc/uClibc-locale-030818.tgz ) )
+#
+# nested SRC_URI are not supported until portage-2.0.50pre19 bug #16159
+
+RESTRICT="nomirror"
+
+LICENSE="LGPL-2"
+
+SLOT="0"
+# ONLY single slot support since only one version of package can exist in db.
+
+
+IUSE="nls ipv6 debug nommu fullrpc pie propolice softfloat savedconfig"
+
+# Local use flags
+# nommu = No memory management unit on target architecture
+# fullrpc = defines xdr functions and some lesser used rpc stuff. Required for NFS
+# pie = enforce no text relocation support in uClibc (x86 only)
+# propolice = Stack-Smashing Protecto
+# softfloat = software floating point calculations
+# savedconfig = compile uclibc/busybox/tinylogin using saved settings.
+
+# There was some comment some that alpha may be broken although I don't know.
+# TODO check these: ~ppc ~mips ~arm ~alpha
+KEYWORDS="~x86"
+
+# TODO maybe a few more...
+DEPEND="dev-lang/perl
+ sys-devel/gcc
+ sys-libs/glibc
+ >=sys-apps/sed-4
+ sys-apps/grep
+ sys-apps/findutils
+ app-arch/tar
+ app-arch/gzip
+ sys-apps/coreutils
+ sys-devel/patch
+ sys-devel/gettext"
+
+# no I haven't checked every virtual/glibc instead of sys-libs/glibc - will check it on itself if
+# time/curiosity permits.
+
+RDEPEND=""
+
+# TODO: Removing for the time being TOO dangerous
+#PROVIDE="virtual/glibc"
+
+S=${WORKDIR}/buildroot
+
+
+# MAKEOPTS="${MAKEOPTS} -j1"
+
+uclibc_var_setup() {
+
+ einfo "You can set the TARGET_ARCH env varible to secify"
+ einfo "the target architecture for the uclibc (cross-)compiler"
+ einfo ""
+ einfo "Examples: i386,arm,mips,mipsel"
+
+ TARGETARCH=${TARGET_ARCH}
+
+ if [ -z "${TARGETARCH}" ]; then
+ # extract out of /etc/embedded/uClibc.conf if exists
+ if [ -f /etc/embedded/uClibc.conf ]; then
+ # TODO replace with sed to elminate quotes
+ local ARCHCOM=$(grep '^TARGET_ARCH=' /etc/embedded/uClibc.conf)
+ TARGETARCH=${ARCHCOM:12}
+ else
+ TARGETARCH=$(extract-arch `/bin/uname -m`)
+ fi
+ else
+ TARGETARCH=$(extract-arch ${TARGETARCH})
+ fi
+
+ # The crosscompile.eclass isn't the definitive
+ # authority on what uclibc can compile to.
+
+ if [ "${TARGETARCH}" != "unknown" ]; then
+ einfo ""
+ einfo "Architecture for ${TARGETARCH}"
+ else
+ ewarn "Bad architecture <${TARGET_ARCH}>??? attempting anyway"
+ # Do anyway??
+ TARGETARCH=${TARGET_ARCH}
+ fi
+ UCLIBCDIR=${S}/build_${TARGETARCH}/uClibc-${UCLIBCVER}
+}
+
+uclibc_config_option() {
+ #[ "$2" = "" ] && return 1
+ #case $1 in
+ # y) /bin/sed -i -e "s:.*$2.*:$2=y:g" .config;;
+ # n) /bin/sed -i -e "s:.*$2.*:$2=n:g" .config;;
+ # *) return 1;;
+ #esac
+ /bin/sed -i -e "s:#.* $2 .*:$2=$1:g" \
+ -e "s:^$2=.*:$2=$1:g" .config
+
+ # TODO line below should be unnecessary
+ #echo $2=$1 >> .config
+
+ conf=`grep -E ^$2= .config`
+ if [ -z "${conf}" ]; then
+ echo $2=$1 >> .config
+ einfo $2=$1
+ else
+ einfo $conf
+ fi
+}
+
+
+src_unpack() {
+ uclibc_var_setup
+ unpack buildroot-${PV}.tar.bz2
+
+ cd ${S}
+
+ sed -i -e "s/^ARCH:=\(.*\)/#ARCH:=\1/g" Makefile
+ sed -i -e "s/^#ARCH:=\(i386\)/ARCH:=${TARGETARCH}\n#ARCH:=\1/1" Makefile
+
+ sed -i \
+ -e "s#^USE_UCLIBC_SNAPSHOT:=.*#USE_UCLIBC_SNAPSHOT:=false#" \
+ -e "s#^USE_BUSYBOX_SNAPSHOT:=.*#USE_BUSYBOX_SNAPSHOT:=false#" \
+ -e "s#^DL_DIR:=.*#DL_DIR:=${DISTDIR}#" \
+ -e "s#^WGET:=.*#WGET:=/bin/true#" \
+ -e 's#tar #tar --no-same-owner #' \
+ -e "s#^STAGING_DIR=.*#STAGING_DIR=${S}/staging_dir#" \
+ -e "s/^#JLEVEL=.*/JLEVEL=${MAKEOPTS}/" \
+ -e 's#^TARGETS+=.*root##' \
+ -e 's#TARGETS+=busybox.*##' \
+ -e 's#INSTALL_LIBSTDCPP:=.*#INSTALL_LIBSTDCPP:=false#' \
+ Makefile
+
+# INSTALL_LIBSTDCPP disabled for testing only
+
+
+ use softfloat && sed -i -e "s/^SOFT_FLOAT:=.*/SOFT_FLOAT:=true/" Makefile \
+ || sed -i -e "s/^SOFT_FLOAT:=.*/SOFT_FLOAT:=false/" Makefile
+
+
+ # Tinylogin fix.
+ sed -i -e "s#^USE_TINYLOGIN_SNAPSHOT=.*#USE_TINYLOGIN_SNAPSHOT=false#" make/tinylogin.mk
+
+# TODO (maybe?) fix HOSTARCH:= in Makefile
+
+ # Helper targets for Makefile
+ cat ${FILESDIR}/Makefile-buildroot-helpers.patch >> Makefile
+
+ # "cp -a" implies --preserve=ownership which is blocked by sandbox
+
+ sed -i -e 's#tar #tar --no-same-owner #' \
+ -e 's#cp -a#cp --preserve=mode -dPR#g' \
+ make/*.mk
+
+ # Stop uclib.mk clobbering our config
+ sed -i -e 's#cp.*config#/bin/true#g' make/uclibc.mk
+
+ emake SED="/bin/sed -i -e" patched || die "failed to patch uclibc buildroot"
+
+ # these hacks affect the search path of the uclibc-toolchain to prevent
+ # leakage of gcclibs into the target
+#-e "/DIR2)\/\.configured/,/DIR2)\/.configured/ s/--\(.*\)=\$(STAGING_DIR)/--\1=\/usr\/${TARGETARCH}-uclibc/g"
+
+ sed -i \
+-e "/DIR2)\/\.installed:/,/\.installed/ s/\$(MAKE)/\$(MAKE) DESTDIR=\$(STAGING_DIR)/" \
+-e 's#\$(STAGING_DIR)/lib/\(libstdc++.*\)# $(GCC_BUILD_DIR2)/$(ARCH)-linux/libstdc++-v3/src/.libs/\1#' \
+ make/gcc-uclibc-3.3.mk
+
+ #emake SED="/bin/sed -i -e" STAGING_DIR=/usr/${TARGETARCH}-uclibc-linux gcchacks
+
+ sed -i -e 's#cp -fa#cp --preserve=mode -dPRf#g' ${UCLIBCDIR}/Makefile
+
+ cd ${UCLIBCDIR}
+ local patches="uClibc-0.9.26-Makefile.patch"
+
+ #[ `use pie` && ${TARGETARCH}=="i386" ] && patches="${patches} uClibc-${PV}-pie-option.patch"
+
+ for patch in ${patches} ; do
+ [ -f ${FILESDIR}/${UCLIBCVER}/${patch} ] && epatch ${FILESDIR}/${UCLIBCVER}/${patch}
+ done
+
+ sed -i -e "s#^LOCALE_DATA_FILENAME:=#LOCALE_DATA_FILENAME:=${DISTDIR}/#" \
+ -e "s#^WGET:=.*#WGET:=/bin/true#" Makefile
+}
+
+src_compile() {
+ uclibc_var_setup
+ export SED="/bin/sed -i -e"
+ emake CROSS= host-sed || die "host-sed make failed"
+
+ use nls && sed -i -e "s/^ENABLE_LOCALE.*/ENABLE_LOCALE:=true/" Makefile \
+ || sed -i -e "s/^ENABLE_LOCALE.*/ENABLE_LOCALE:=false/" Makefile
+
+ local uconfig;
+ use nls && uconfig="sources/uClibc.config-locale" || uconfig="sources/uClibc.config"
+
+ #stripflags -march -mcpu???
+
+ cd ${UCLIBCDIR}
+
+
+ # restore last config
+ if [ -f /etc/embedded/uClibc.config && `use savedconfig` ]; then
+ cp /etc/embedded/uClibc.config ${uconfig}
+ else
+ # or make the default with a few changes
+ emake defconfig || die "Could not make uclibc default config"
+
+ /bin/sed -i -e 's,^.*TARGET_$(UCLIBC_TARGET_ARCH).*,TARGET_$(TARGETARCH)=y,g' \
+ -e "s,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"${WORKDIR}/linux\"," \
+ -e 's,^TARGET_ARCH.*,TARGET_ARCH=\"$(TARGETARCH)\",g' .config
+
+ uclibc_config_option n MALLOC_GLIBC_COMPAT
+ uclibc_config_option y DO_C99_MATH
+ uclibc_config_option y UCLIBC_HAS_RPC
+ uclibc_config_option n UCLIBC_HAS_CTYPE_UNSAFE
+ uclibc_config_option y UCLIBC_HAS_CTYPE_CHECKED
+ uclibc_config_option y UCLIBC_HAS_WCHAR
+ uclibc_config_option y UCLIBC_HAS_HEXADECIMAL_FLOATS
+ uclibc_config_option y UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
+ uclibc_config_option y UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
+ uclibc_config_option y UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
+ uclibc_config_option y UCLIBC_HAS_PRINTF_M_SPEC
+ uclibc_config_option y UCLIBC_HAS_FTW
+ uclibc_config_option y UNIX98PTY_ONLY
+ uclibc_config_option n UCLIBC_HAS_TZ_FILE_READ_MANY
+ uclibc_config_option y UCLIBC_HAS_LFS
+ uclibc_config_option y UCLIBC_COMPLETELY_PIC
+
+
+ if [ `use debug` ]; then
+ uclibc_config_option y DODEBUG
+ uclibc_config_option y PTHREADS_DEBUG_SUPPORT
+ uclibc_config_option y CONFIG_PROFILING
+ # Other possibe options for debug use flag
+ # DOASSERTS
+ # SUPPORT_LD_DEBUG
+ # SUPPORT_LD_DEBUG_EARLY
+ # PTHREADS_DEBUG_SUPPORT
+ else
+ uclibc_config_option n DODEBUG
+ uclibc_config_option n PTHREADS_DEBUG_SUPPORT
+ fi
+
+ use ipv6 && uclibc_config_option y UCLIBC_HAS_IPV6 || \
+ uclibc_config_option n UCLIBC_HAS_IPV6
+
+ use fullrpc && uclibc_config_option y UCLIBC_HAS_FULL_RPC || \
+ uclibc_config_option n UCLIBC_HAS_FULL_RPC
+
+ use nommu && uclibc_config_option n UCLIBC_HAS_MMU || \
+ uclibc_config_option y UCLIBC_HAS_MMU
+
+
+ if [ `use pie` && ${TARGETARCH}=="i386" ]; then
+ uclibc_config_option y UCLIBC_PIE_SUPPORT
+ uclibc_config_option n CONFIG_PROFILING
+ else
+ uclibc_config_option n UCLIBC_PIE_SUPPORT
+ fi
+
+ use propolice && uclibc_config_option y UCLIBC_PROPOLICE || \
+ uclibc_config_option n UCLIBC_PROPOLICE
+
+ if [ `use softfloat` ]; then
+ uclibc_config_option n HAS_FPU
+ uclibc_config_option y UCLIBC_HAS_FLOATS
+ uclibc_config_option y UCLIBC_HAS_SOFT_FLOAT
+ #else
+ #TODO for completeness
+ fi
+
+
+ uclibc_config_option n UCLIBC_PREGENERATED_LOCALE_DATA
+ uclibc_config_option n UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA
+
+ if [ `use nls` ]; then
+ uclibc_config_option y UCLIBC_HAS_LOCALE
+
+ #pregen is for i386 architectures only
+ if [ ${TARGETARCH}=="i386" ]; then
+ uclibc_config_option y UCLIBC_PREGENERATED_LOCALE_DATA
+ cp ${DISTDIR}/uClibc-locale-030818.tgz ${UCLIBCDIR}/extra/locale
+ else
+ uclibc_config_option n UCLIBC_PREGENERATED_LOCALE_DATA
+
+ #TODO - below needs to be done for savedconfig too
+ pushd extra/locale
+ find charmaps -name "*.pairs" > codesets.txt
+ cp LOCALES locales.txt
+ emake clean all || die "Could not generate codepages"
+ popd
+ fi
+ uclibc_config_option y UCLIBC_HAS_XLOCALE
+ uclibc_config_option y UCLIBC_HAS_HEXADECIMAL_FLOATS
+ uclibc_config_option y UCLIBC_HAS_GLIBC_DIGIT_GROUPING
+ uclibc_config_option y UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING
+ uclibc_config_option y UCLIBC_HAS_GETTEXT_AWARENESS
+ # lots of stuff from uclibc.spec - TODO LATER
+ else
+ uclibc_config_option n UCLIBC_HAS_LOCALE
+ fi
+
+
+ fi
+
+
+ /bin/sed -i -e 's,^RUNTIME_PREFIX=.*,RUNTIME_PREFIX=\"/\",g' \
+ -e 's,^DEVEL_PREFIX=.*,DEVEL_PREFIX=\"/usr/\",g' \
+ -e 's,^SHARED_LIB_LOADER_PREFIX=.*,SHARED_LIB_LOADER_PREFIX=\"/lib\",g' \
+ .config
+
+
+
+ cd ${S}
+ emake -j1 || die "Could not make uclibc-buildroot"
+
+ if [ `use debug` ]; then
+ if [ -f /etc/embedded/busybox.config && `use savedconfig` ]; then
+ emake BUSYBOX_CONFIG=/etc/embedded/busybox.config busybox \
+ || "Error making busybox old config"
+ else
+ emake busybox || "Error making busybox default config"
+ fi
+
+ [ -f /etc/embedded/tinylogin.config && `use savedconfig` ] && \
+ cp /etc/embedded/tinylogin.config build_${TARGETARCH}/tinylogin-${TINYLOGINVER}/Config.h
+
+ emake extras-compile
+ fi
+
+}
+
+src_install() {
+ uclibc_var_setup
+ # later once compile/install separation is done
+ #emake all-installed
+
+ use debug && emake extras-installed
+
+ local BINPREFIX=${TARGETARCH}-linux-uclibc
+
+ #rm -rf ${S}staging_dir/usr/include ${S}staging_dir/usr/lib
+ rm -f ${S}/staging_dir/bin/sed
+
+ dodir /usr/${BINPREFIX}
+
+ cd staging_dir
+
+ doinfo info/*
+ doman `find man -type f -name "*.[0-9]"`
+
+ dodir usr/${BINPREFIX}
+
+ cp --preserve=mode -dPRf lib usr/bin/ bin/ ${BINPREFIX}/* ${TARGETARCH}-linux \
+ include/ ${D}/usr/${BINPREFIX}
+
+ cp --preserve=mode -dPRf usr/${BINPREFIX} ${D}
+
+ # gcc-config stuff
+ local gccconfigfile=${D}/etc/env.d/gcc/${BINPREFIX}-${UCLIBCVER}
+
+ dodir /etc/env.d/gcc
+ echo "PATH=\"/usr/${BINPREFIX}/bin\"" > ${gccconfigfile}
+ echo "ROOTPATH=\"/usr/${BINPREFIX}/bin\"" >> ${gccconfigfile}
+ echo "LDPATH=\"/usr/${BINPREFIX}/lib\"" >> ${gccconfigfile}
+ echo "CC=\"${BINPREFIX}-gcc\"" >> ${gccconfigfile}
+ echo "CXX=\"${BINPREFIX}-g++\"" >> ${gccconfigfile}
+
+ dodir /usr/lib/gcc-lib/${BINPREFIX}
+ dosym /usr/${BINPREFIX}/lib /usr/lib/gcc-lib/${BINPREFIX}/${UCLIBCVER}
+
+ # warning- consistancy with Makefile uncertian.
+ use softfloat && TARGETARCH="${TARGETARCH}_nofpu"
+
+ # rootfs (tempory for testing purposes)
+ dodir /var/lib/rootfs_${TARGETARCH}
+
+ cp --preserve=mode -dPRf ${S}/build_${TARGETARCH}/root/* ${D}/var/lib/rootfs_${TARGETARCH}
+
+ # Save uclibc/busybox/tinylogin config
+
+ dodir /etc/embedded
+ cp ${UCLIBCDIR}/.config ${D}/etc/embedded/uClibc.config
+
+ [ -f ${S}/build_${TARGETARCH}/busybox-${BUSYBOXVER}/Config.h ] && \
+ cp ${S}/build_${TARGETARCH}/busybox-${BUSYBOXVER}/Config.h ${D}/etc/embedded/busybox.config
+
+ [ -f ${S}/build_${TARGETARCH}/tinylogin-${TINYLOGINVER}/Config.h ] && \
+ cp ${S}/build_${TARGETARCH}/tinylogin-${TINYLOGINVER}/Config.h ${D}/etc/embedded/tinylogin.config
+
+}