diff options
author | Ned Ludd <solar@gentoo.org> | 2009-03-12 18:50:12 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2009-03-12 18:50:12 +0000 |
commit | 10ec7d929bc8e2be47504a96cc38d213f0efbc98 (patch) | |
tree | d533ab4abf71d23d30ec3e4559b8df2db2d4b76a /sys-libs/uclibc | |
parent | Version bump (diff) | |
download | historical-10ec7d929bc8e2be47504a96cc38d213f0efbc98.tar.gz historical-10ec7d929bc8e2be47504a96cc38d213f0efbc98.tar.bz2 historical-10ec7d929bc8e2be47504a96cc38d213f0efbc98.zip |
- import a few svn patches from upstream. fixes bug 262181
Package-Manager: portage-2.1.6.7/cvs/Linux x86_64
Diffstat (limited to 'sys-libs/uclibc')
-rw-r--r-- | sys-libs/uclibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/uclibc/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/uclibc/uclibc-0.9.30.1-r1.ebuild | 373 |
3 files changed, 382 insertions, 2 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog index 215109f33d88..c904857ed06d 100644 --- a/sys-libs/uclibc/ChangeLog +++ b/sys-libs/uclibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/uclibc # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.44 2009/03/03 21:28:05 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.45 2009/03/12 18:50:12 solar Exp $ + +*uclibc-0.9.30.1-r1 (12 Mar 2009) + + 12 Mar 2009; <solar@gentoo.org> +uclibc-0.9.30.1-r1.ebuild: + - import a few svn patches from upstream. fixes bug 262181 *uclibc-0.9.30.1 (03 Mar 2009) diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest index 9c33cbddfbbe..2d65c84cc0ab 100644 --- a/sys-libs/uclibc/Manifest +++ b/sys-libs/uclibc/Manifest @@ -6,6 +6,7 @@ DIST uClibc-0.9.28.3-patches-1.3.tar.bz2 21241 RMD160 c78dda0bdbc751721559d91bdd DIST uClibc-0.9.28.3-patches-1.8.tar.bz2 27909 RMD160 7c936749075162939c76489aa5a88278f235b48f SHA1 5bb582cb8f95407bd9fa938a9dd09027dcf0db0b SHA256 9496394de9de241551497c496b7fb8ece32b23536485bd81bd20128c2e104790 DIST uClibc-0.9.28.3.tar.bz2 1795383 RMD160 61591281f4193d4dcd0fa3252fb3286028d4cb63 SHA1 77c5220697a1772d0d9da4bda0d866e4f4b68540 SHA256 1d86d5dad6060e7057cfe023ffc7b7661bdc7fe95112b37447851c0a75b547a1 DIST uClibc-0.9.30-patches-1.0.tar.bz2 7017 RMD160 548b43fc8f3d3637eccef5c5df13b84380ec8631 SHA1 bfb64d3bdc0d067e78b050fe899021849a47f091 SHA256 e8f36766c8b6cb37bab69af09e7ff2c5108719c74b83fc145893198b87f8e73e +DIST uClibc-0.9.30.1-patches-1.0.tar.bz2 5501 RMD160 d2c48023fb25af45512c65ce3c5e936b5b24efe1 SHA1 bd34516c1bc71c45c5f1d078b91f323469760228 SHA256 022637d107fedd52bdd8187566e6e6378813a19f4ef8bf723a713e8d9cd8cd05 DIST uClibc-0.9.30.1.tar.bz2 2285137 RMD160 bff9a232b1f1c73efd71247e7b91aa31d41af0ee SHA1 4b36fec9a0dacbd6fe0fd2cdb7836aaf8b7f4992 SHA256 2d9769a02c46cff73f56a076268192da1ce91c913e2e4e31c120be098f704c8c DIST uClibc-0.9.30.tar.bz2 2291882 RMD160 08270ef742a2167ae660c5440bc5f78775a10ab0 SHA1 e96665237968fb2e4aa027bde9d56c4fe599eb1b SHA256 67e7e6b983cd2caa163f177d5196282434ae1e18b7270495cd6c65f5c1549555 DIST uClibc-locale-030818.tgz 236073 RMD160 8e3f4b20b94e07e535cbbbe81287186014c5f151 SHA1 78f901e6ed228ed84106bd034c1b97eee1eecb50 SHA256 c4362be318a38f18d98dccf462d22d95bab92f05548bb93f65298fe9afaebd57 @@ -13,7 +14,8 @@ EBUILD uclibc-0.9.27-r1.ebuild 12348 RMD160 794e5b53f970e7e283cfe97d3077063fe992 EBUILD uclibc-0.9.28.3-r3.ebuild 14518 RMD160 f321b71832206149df14818eb09811ec25856c77 SHA1 e19c8024fb57df2789bbebf31cb006d75492b4a2 SHA256 c849a7c1f522b8573534f51083c0e6520a28c6b409c8edec85b498ae4579b6e9 EBUILD uclibc-0.9.28.3-r7.ebuild 14521 RMD160 581c72c2ac1c2527a26540178e7c40d468966a7c SHA1 7d9c7c8cd57afc39bcf17d5c6abe8a31157ff0de SHA256 e747dba48a1b9708c3c6ea0b933b78929a5d3e819d660dd75374ce4ad58de62b EBUILD uclibc-0.9.28.3.ebuild 14513 RMD160 bca7feae315df5b02c83800a1fa4db69c73d2d0c SHA1 c6e4cd20006305d85a0b204974d51b32730beb45 SHA256 05331a85ed5c828c85c05424fbc20693d81375eec3c11713d6f9e35fdc3598e1 +EBUILD uclibc-0.9.30.1-r1.ebuild 11425 RMD160 968b636e83baf30465707ecefdc7bf73205b9dda SHA1 787c314d9005e2e2136ca8ae7ac52c0364977fd9 SHA256 e3ab8427cfbfbd0356465998b3599825b0dc0c9a0206b015684e2807c7952b56 EBUILD uclibc-0.9.30.1.ebuild 11423 RMD160 e59cbea4910a0268c1df150dc17901d96204d534 SHA1 53bf840a59b39ffc10541335a92a771169e77265 SHA256 c2ecc546b098756f506d5f7596fb0af4b17227d7335f9fcaac2d0f1eb88d61ff EBUILD uclibc-0.9.30.ebuild 13897 RMD160 7da8ee94dd96a05c9c2147025d2e68b51457afca SHA1 a9463ac7fe35d5c342595601bdc2424c93b5e8c0 SHA256 8b21456bd1e18f37559ed8cd9bb30c3e268581dfea30700fb25f58bd9b050d77 -MISC ChangeLog 15521 RMD160 6af44ee96af5be90a657a98ae0c0423c50cd924d SHA1 a407b3b809e550c67447548f171bcf55abcad065 SHA256 ee015b0f3194fd3b7685c150bc0a2169b4914dd9047753c490422479a0d73190 +MISC ChangeLog 15680 RMD160 96b879da8da17599dd82ce6d25e79472ea1cc1bf SHA1 66dd601283e28855a1de0fba6604c4e8bde05a49 SHA256 a99a330df0556ac22f0f50cd218347ceb8329a61a99961172c4ec1dec3a1bed3 MISC metadata.xml 1469 RMD160 0c3640cb24a93c003e59cd0f9fd99587881ac63e SHA1 6be5e573878f88438a0121ff49841d52f07dedcd SHA256 e2f9e4727e826e87f735157c170a4e1f5f3ff572a2a2875f6a8889dfa5c648a3 diff --git a/sys-libs/uclibc/uclibc-0.9.30.1-r1.ebuild b/sys-libs/uclibc/uclibc-0.9.30.1-r1.ebuild new file mode 100644 index 000000000000..6dad829aa93e --- /dev/null +++ b/sys-libs/uclibc/uclibc-0.9.30.1-r1.ebuild @@ -0,0 +1,373 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30.1-r1.ebuild,v 1.1 2009/03/12 18:50:12 solar Exp $ + +#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" +#inherit subversion +inherit eutils flag-o-matic toolchain-funcs savedconfig + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then + export CTARGET=${CATEGORY/cross-} + fi +fi +# Handle the case where we want uclibc on glibc ... +if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc* ]] ; then + export UCLIBC_AND_GLIBC="sitting in a tree" + export CTARGET=${CHOST%%-*}-pc-linux-uclibc +fi + +MY_P=uClibc-0.9.30.1 +SVN_VER="" +PATCH_VER="1.0" +DESCRIPTION="C library for developing embedded Linux systems" +HOMEPAGE="http://www.uclibc.org/" +SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2" + +[[ -z ${SVN_VER} ]] || \ + SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" +[[ -z ${PATCH_VER} ]] || \ + SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86" +IUSE="build uclibc-compat debug hardened ssp ipv6 minimal wordexp crosscompile_opts_headers-only" +RESTRICT="strip" + +RDEPEND="" +if [[ -n $CTARGET && ${CTARGET} != ${CHOST} ]]; then + DEPEND="" + PROVIDE="" + SLOT="${CTARGET}" +else + DEPEND="virtual/os-headers app-misc/pax-utils" + PROVIDE="virtual/libc" + SLOT="0" +fi + +S=${WORKDIR}/${MY_P} + +alt_build_kprefix() { + if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ + || [[ -n ${UCLIBC_AND_GLIBC} ]] + then + echo /usr/include + else + echo /usr/${CTARGET}/usr/include + fi +} + +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} + +uclibc_endian() { + # XXX: this wont work for a toolchain which is bi-endian, but we + # dont have any such thing at the moment, so not a big deal + touch "${T}"/endian.s + $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o + case $(file "${T}"/endian.o) in + *" MSB "*) echo "big";; + *" LSB "*) echo "little";; + *) echo "NFC";; + esac + rm -f "${T}"/endian.{s,o} +} + +pkg_setup() { + just_headers && return 0 + has_version ${CATEGORY}/uclibc || return 0 + [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 + [[ ${ROOT} != "/" ]] && return 0 + [[ ${CATEGORY} == cross-* ]] && return 0 + +} + +PIE_STABLE="arm mips ppc x86" + +CPU_ALPHA="" +CPU_AMD64="" +CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT}}" +CPU_IA64="" +CPU_M68K="" +CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}} MIPS_{N64,O32,N32}_ABI" +CPU_PPC="" +CPU_SH="SH{2,3,4,5}" +CPU_SPARC="SPARC_V{7,8,9,9B}" +CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH" +IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}" + +check_cpu_opts() { + local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" + [[ -z ${!cpu_var} ]] && return 0 + + if [[ -z ${UCLIBC_CPU} ]] ; then + ewarn "You really should consider setting UCLIBC_CPU" + ewarn "Otherwise, the build will be generic (read: slow)." + ewarn "Available CPU options:" + UCLIBC_CPU=$(eval echo ${!cpu_var}) + echo ${UCLIBC_CPU} + case ${CTARGET} in + mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; + sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; + i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; + *) export UCLIBC_CPU=${UCLIBC_CPU%% *};; + esac + else + local cpu found=0 + for cpu in $(eval echo ${!cpu_var}) ; do + [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break + done + if [[ ${found} -eq 0 ]] ; then + ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported" + ewarn "Valid choices:" + eval echo ${!cpu_var} + die "pick a supported cpu type" + fi + fi +} + +set_opt() { + sed -i -e "/^\# $1 is not set/d" -e "/^$1=.*/d" .config + echo "$1=$2" >> .config +} + +src_unpack() { + [[ -n ${ESVN_REPO_URI} ]] \ + && subversion_src_unpack \ + || unpack ${A} + cd "${S}" + + check_cpu_opts + + echo + einfo "Runtime Prefix: /" + einfo "Devel Prefix: /usr" + einfo "Kernel Prefix: $(alt_build_kprefix)" + einfo "CBUILD: ${CBUILD}" + einfo "CHOST: ${CHOST}" + einfo "CTARGET: ${CTARGET}" + einfo "CPU: ${UCLIBC_CPU:-default}" + einfo "ENDIAN: $(uclibc_endian)" + echo + + ########## PATCHES ########## + + [[ -n ${SVN_VER} ]] && \ + epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch + + if [[ -n ${PATCH_VER} ]] ; then + unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 + EPATCH_SUFFIX="patch" + epatch "${WORKDIR}"/patch + fi + + ########## CPU SELECTION ########## + + local target config_target + case $(tc-arch) in + alpha) target="alpha"; config_target="no cpu-specific options";; + amd64) target="x86_64"; config_target="no cpu-specific options";; + arm) target="arm"; config_target="GENERIC_ARM";; + ia64) target="ia64"; config_target="no cpu-specific options";; + m68k) target="m68k"; config_target="no cpu-specific options";; + mips) target="mips"; config_target="MIPS_ISA_1";; + ppc) target="powerpc"; config_target="no cpu-specific options";; + sh) target="sh"; config_target="SH4";; + sparc) target="sparc"; config_target="no cpu-specific options";; + x86) target="i386"; config_target="GENERIC_386";; + *) die "$(tc-arch) lists no defaults :/";; + esac + sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ + extra/Configs/Config.${target} + sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak + + ########## CONFIG SETUP ########## + + make ARCH=${target} defconfig >/dev/null || die "could not config" + + for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} UCLIBC_HAS_PROFILING; do + sed -i -e "s:${def}=y:# ${def} is not set:" .config + done + if use debug ; then + set_opt SUPPORT_LD_DEBUG y + set_opt DODEBUG y + fi + + sed -i -e '/ARCH_.*_ENDIAN/d' .config + set_opt "ARCH_WANTS_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN" y + + if [[ $(tc-is-softfloat) != "no" ]] ; then + set_opt UCLIBC_HAS_FPU n + fi + + if [[ ${CTARGET/eabi} != ${CTARGET} ]] ; then + set_opt CONFIG_ARM_OABI n + set_opt CONFIG_ARM_EABI y + fi + + local moredefs="COMPAT_ATEXIT" + local compat_sym=atexit + + # We need todo this for a few months. .30 is a major upgrade. + # Don't do it from cross-compiling case though + if ! use uclibc-compat ; then + if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ + ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then + local fnames="" + einfo "Doing a scanelf in paths for bins containing the ${compat_sym} symbol" + fnames=$(scanelf -pyqs${compat_sym} -F%F#s) + if [[ -z ${fnames} ]] ; then + einfo "This system is clean." + einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" + moredefs="" + else + ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." + ewarn "qfile -Cq $(echo ${fnames}) | sort | uniq" + echo + ewarn "Leaving on ${moredefs}" + fi + else + moredefs="" + fi + fi + for def in ${moredefs} MALLOC_GLIBC_COMPAT DO_C99_MATH UCLIBC_HAS_{RPC,FULL_RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} UCLIBC_HAS_REENTRANT_RPC UCLIBC_HAS_GNU_GLOB PTHREADS_DEBUG_SUPPORT UCLIBC_HAS_TZ_FILE_READ_MANY UCLIBC_HAS_FENV UCLIBC_SUSV3_LEGACY UCLIBC_SUSV3_LEGACY_MACROS UCLIBC_HAS_PROGRAM_INVOCATION_NAME ; do + set_opt "${def}" y + done + set_opt UCLIBC_HAS_CTYPE_UNSAFE n + set_opt UCLIBC_HAS_LOCALE n + + use ipv6 && set_opt UCLIBC_HAS_IPV6 y + + use wordexp && set_opt UCLIBC_HAS_WORDEXP y + + # we need to do it independently of hardened to get ssp.c built into libc + set_opt UCLIBC_HAS_SSP y + set_opt UCLIBC_HAS_SSP_COMPAT y + set_opt UCLIBC_HAS_ARC4RANDOM y + set_opt PROPOLICE_BLOCK_ABRT n + set_opt PROPOLICE_BLOCK_SEGV y + + # arm/mips do not emit PT_GNU_STACK, but if we enable this here + # it will be emitted as RWE, ppc has to be checked, x86 needs it + # this option should be used independently of hardened + if has $(tc-arch) x86 || has $(tc-arch) ppc; then + set_opt UCLIBC_BUILD_NOEXECSTACK y + else + set_opt UCLIBC_BUILD_NOEXECSTACK n + fi + set_opt UCLIBC_BUILD_RELRO y + if use hardened ; then + if has $(tc-arch) ${PIE_STABLE} ; then + set_opt UCLIBC_BUILD_PIE y + else + set_opt UCLIBC_BUILD_PIE n + fi + set_opt UCLIBC_BUILD_NOW y + use ssp && { + set_opt SSP_QUICK_CANARY n + set_opt UCLIBC_BUILD_SSP y + } + else + set_opt UCLIBC_BUILD_PIE n + set_opt SSP_QUICK_CANARY y + set_opt UCLIBC_BUILD_SSP n + set_opt UCLIBC_BUILD_NOW n + fi + + restore_config .config + + # setup build and run paths + local cross=${CTARGET}- + type -p ${cross}ar > /dev/null || cross="" + sed -i \ + -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ + -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \ + -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ + -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ + -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ + -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \ + .config || die + + yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" + + cp .config myconfig + + emake -s clean > /dev/null || die "could not clean" +} + +src_compile() { + cp myconfig .config + + emake headers || die "make headers failed" + just_headers && return 0 + + emake || die "make failed" + if [[ ${CTARGET} != ${CHOST} ]] ; then + emake -C utils hostutils || die "make hostutils failed" + elif [[ ${CHOST} == *-uclibc* ]] ; then + emake utils || die "make utils failed" + fi +} + +src_test() { + [[ ${CHOST} != ${CTARGET} ]] && return 0 + [[ ${CBUILD} != ${CHOST} ]] && return 0 + + # assert test fails on pax/grsec enabled kernels - normal + # vfork test fails in sandbox (both glibc/uclibc) + make UCLIBC_ONLY=1 check || die "test failed" +} + +src_install() { + local sysroot=${D} + [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" + + local target="install" + just_headers && target="install_headers" + emake DESTDIR="${sysroot}" ${target} || die "install failed" + + save_config .config + + # remove files coming from kernel-headers + rm -rf "${sysroot}"/usr/include/{linux,asm*} + + # 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 + if [[ ${CTARGET} != ${CHOST} ]] ; then + dosym usr/include /usr/${CTARGET}/sys-include + if ! just_headers ; then + newbin utils/ldconfig.host ${CTARGET}-ldconfig || die + newbin utils/ldd.host ${CTARGET}-ldd || die + fi + return 0 + fi + + if [[ ${CHOST} == *-uclibc* ]] ; then + emake DESTDIR="${D}" install_utils || die "install-utils failed" + dobin extra/scripts/getent + fi + + dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 + doman docs/man/*.[1-9] +} + +pkg_postinst() { + [[ ${CTARGET} != ${CHOST} ]] && return 0 + [[ ${CHOST} != *-uclibc* ]] && return 0 + + if [[ ! -e ${ROOT}/etc/TZ ]] ; then + ewarn "Please remember to set your timezone in /etc/TZ" + [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc + echo "UTC" > "${ROOT}"/etc/TZ + fi + [[ ${ROOT} != "/" ]] && return 0 + # update cache before reloading init + /sbin/ldconfig + # reload init ... + [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null +} |