summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-05-29 20:59:16 +0000
committerAnthony G. Basile <blueness@gentoo.org>2015-05-29 20:59:16 +0000
commit3fa1f2998ecac6e5e063b11764a3bdac59b0bcd2 (patch)
treeca2a27d673214cbe241908b3d0f242483091c974 /sys-libs
parentImport from xmw overlay (diff)
downloadhistorical-3fa1f2998ecac6e5e063b11764a3bdac59b0bcd2.tar.gz
historical-3fa1f2998ecac6e5e063b11764a3bdac59b0bcd2.tar.bz2
historical-3fa1f2998ecac6e5e063b11764a3bdac59b0bcd2.zip
Backport fix for pread64()/pwrite64() for amd64 needed for >=sys-fs/e2fsprogs-1.42.12. Bug #548950.
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/uclibc/ChangeLog9
-rw-r--r--sys-libs/uclibc/Manifest30
-rw-r--r--sys-libs/uclibc/uclibc-0.9.33.2-r15.ebuild348
3 files changed, 372 insertions, 15 deletions
diff --git a/sys-libs/uclibc/ChangeLog b/sys-libs/uclibc/ChangeLog
index 2ca779d8741b..82fb43d91449 100644
--- a/sys-libs/uclibc/ChangeLog
+++ b/sys-libs/uclibc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-libs/uclibc
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.98 2015/02/27 08:05:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.99 2015/05/29 20:59:03 blueness Exp $
+
+*uclibc-0.9.33.2-r15 (29 May 2015)
+
+ 29 May 2015; Anthony G. Basile <blueness@gentoo.org>
+ +uclibc-0.9.33.2-r15.ebuild:
+ Backport fix for pread64()/pwrite64() for amd64 needed for >=sys-
+ fs/e2fsprogs-1.42.12. Bug #548950.
27 Feb 2015; Mike Frysinger <vapier@gentoo.org> uclibc-0.9.33.2-r1.ebuild,
uclibc-0.9.33.2-r10.ebuild, uclibc-0.9.33.2-r11.ebuild,
diff --git a/sys-libs/uclibc/Manifest b/sys-libs/uclibc/Manifest
index 895764a83405..d586772a7ed8 100644
--- a/sys-libs/uclibc/Manifest
+++ b/sys-libs/uclibc/Manifest
@@ -9,6 +9,7 @@ DIST uClibc-0.9.33.2-patches-13.tar.bz2 28146 SHA256 80c3e53927bd5c850b2b9ae7ba4
DIST uClibc-0.9.33.2-patches-14.tar.bz2 28773 SHA256 3d2adac6d27db2a6d9c0ed93eb19e97a1a2fa24835a6bfc102767cd6dea3971b SHA512 45fdbceedf0e80bb0adafad37d1d5ca3ff4315def576bb2570bc26abebcdb60125ee01fb69cdfe72353bac4a664e1e9c7af0671b84f48f546ac32dabbea49e3e WHIRLPOOL 899c5f4781eaa5291ff755221a3895dc4c563ac32ea48ab9bad8715373c91a06e23b9512d65fab093ce5d6e658727fcfa613393b40bccc5b1b5a93e1a42b1906
DIST uClibc-0.9.33.2-patches-15.tar.bz2 31298 SHA256 a1f5b1c100bee1218d24fe27aa00ed9996588448b9ccd4df85ad365d1993d8a7 SHA512 79a1982506f198598a955533e6d7c738f87a3fa74225b2b6ab32bd636642e683d024ad0860d28fe2b42fe6b2c982f4172f950caa62f31761a19e4a49116d5d36 WHIRLPOOL 6272ccf3a1340dde0b754fec996ec2063b45250828f2bedb4ea6e59f8a30e009395ff794b99c46b887e9d71c1499fc1543fa60c1cc09b6169efc9e9161bd880c
DIST uClibc-0.9.33.2-patches-16.tar.bz2 31666 SHA256 26b9261edd23879c1fa3ef4b77221fc808c56125de6943a55b125e066d38e960 SHA512 d95ae817dfaa04504635512150df726d3996bfee443d4ce93894f09c81bad0d2a0718fb6f58e52f354796e4a2f0dec1ff9f0adda3ae6453020586c01b612a0dc WHIRLPOOL 96440db3ffca2f2b9b48aeca40563d06f98068ca10e510fdfd596eae6bad493c03f3ad869a4153593e31beb1f746b237cf70d9b9c221ed1e1102e761cf08432a
+DIST uClibc-0.9.33.2-patches-17.tar.bz2 32437 SHA256 4e846e5fa71815e37971d6bfc1ed1381a97189b38575a64ff9396f6a561d48e0 SHA512 6a6ad8aef862f742e60965c447e5abee2349886f01bf5e44111b2a6c21e59e4644195cf36e85b8ce0dabbf7b92dc2c36ae27f0b7a02b0f9f4278e46ec5fb5a76 WHIRLPOOL 02e1c35b57403dcf2beed599c37c8cb52dab36a8e4c87fb8e8cac9cc536640cb0bf47a3df2a939bae6a6d728035362ad0427f830ffd35c9db174a42e342a03d9
DIST uClibc-0.9.33.2-patches-2.tar.bz2 2854 SHA256 a43192a582ad5428daaceec23aaf096ac037a723eb79724aa716f3850674fecd SHA512 f7ef2bc1a2498e2215828c52003a4ddc4ebe79dd43def367398fad7895c5e5ce9ae4ce68e51141193ef7d47d0727ed477c7b00fbb95b47cd6f251aacbd15048c WHIRLPOOL 80bd9de5b4c5eb671a462a094cd016d0931885ca4604a489017cc36ae5d960a5f08cb72185011d796d5bf9c4809ed2331416ca9b0dae00991ac1e998fc31f7c9
DIST uClibc-0.9.33.2-patches-3.tar.bz2 4002 SHA256 2c06d1f80c8b7e5b0ef60571720273e2ccc55551a3dacc9ed5f7c04e9eda7018 SHA512 935dded858fbd4ce7317bdd1c097f26d8752bd241c12c9b1420e621bb80e59d8f74f84a8ae4df86bb07a03b2354e6c8ce4ba980aaa6d9be63c5e518da393db52 WHIRLPOOL d72989fbc7c700191b5703591bff4ff39ba6a3bb9c230cefb11c21cb2cd5f3f25bd52e8f6783bc651bd273d15146246491923bb1c357ce117da496910acefe6e
DIST uClibc-0.9.33.2-patches-5.tar.bz2 10084 SHA256 9c9814360470b1ff3308a85fe8a61ce35eb57c288301b7244450b894f9627a29 SHA512 efd70db740d090d4791e4afc33db2a26df9151ca5be8bcd499ce65d33222af784cb11cbc1f6a4288cab5a4ad1b686488ce836bb62629a9c04f643d40706ac917 WHIRLPOOL b88c36d0eb3f3398a5e96d155cdd8d1b3f6c02ecba4d3f7b167f35c983cf6098e3795839f3f8e0564a91d364c6e2aa0408adcc4647af2143be51a892f2508b27
@@ -23,6 +24,7 @@ EBUILD uclibc-0.9.33.2-r11.ebuild 9100 SHA256 ea01e2475aa182e273f2a1ae89e9d5341e
EBUILD uclibc-0.9.33.2-r12.ebuild 9220 SHA256 f53c8cf2bc0d24dc1aa58ce4bdddc4ac27bf5adec7bcd461de4a1590a0ff3aac SHA512 42720786b73899138fff05739f14967bb2ce10e18d7da1fc3bbf7ad545a2abe0b42d95d4327bb0ee0739a929adc845330c43fc34f0c668b28f689d55b95448e5 WHIRLPOOL 4ac94941349d1465d2ab7ae90efec271cc29c5f64175a34404c4ea04c9afc35a266bc9e50c7aa49a21e5a57318a472558d8212df5623bd8c749a0500181d05e2
EBUILD uclibc-0.9.33.2-r13.ebuild 9215 SHA256 c4bf87a8395ba46ec7dce8f2a70afea87f60f0cad2988bed30ef37772dd7fc5b SHA512 78794913a076792023ded8350c4a02e8e5799c420e459cff928fa2f33cf738e38730795c10549620adf3a9700b21bfdf74d5f650a6d23fab48a1a4a553e776d4 WHIRLPOOL 8b4fe38062646bf38f895d0624b99863d65b0a33feae941e8fdabfb275b2a786553ee0c7b0eff223cecb17a666b44da6ca75b55e1f34ddbffde053dc25215c8f
EBUILD uclibc-0.9.33.2-r14.ebuild 9216 SHA256 c469c011d9fe87236e68c0abcd6fdefee6230623988d04795e3195b7dc089e24 SHA512 12e70a0e8c1340cd259e6b5d4990716c67c10b6247ad3262165e5157a765630c63cf010b3ec9146cd3b8e0847afcf4d05a11cfc0357e8c75499d71b46f445d45 WHIRLPOOL 2c708c5e6404107bec0afbbf59ca7c989b1623de3145ebd1ac07cbc46dc28fa7f16fe28adfb4aa23cdeff3b5434b3287ab9ab32bc269e4c8670319323f5df6ac
+EBUILD uclibc-0.9.33.2-r15.ebuild 9222 SHA256 329959e539e85505f95ea31b2b6e823fd2307d9f4f33359d0e37702ea1288f44 SHA512 006455ce07db8939cd18cab1983f5b95f07c98b74087b3daf8df54fc18a783c9a271c64780b0ebecc75bacb9ffdb04a4e83716ce9c1518f7c803ec88ad9ddb91 WHIRLPOOL 4566df6a01df9e16cdb2156dbf2cbbc89984ecac69ad06cde97223a262aa23aaf1521efcb6d85f6e0b935c5db71617a470a39cd5cf61de8cb68f7ada5a6ec48b
EBUILD uclibc-0.9.33.2-r2.ebuild 10620 SHA256 5be80388729ccb10a8607abb6e1baed4b4fd2482387c0264c93d0fa6f5a6e7bf SHA512 4d64d286dc578984f9a6dc04199c60fefd251347a45b60d1edd8dc26dd6100ca7ca0e23ba3a1167bf6ba5e83f3c13bd1ef45e2855517dbe9f862bd6aeda83271 WHIRLPOOL cb0daf866758f351cb469554f7b3524232a5e1f00d40c85c93b64c943bc4dea3e7343a115ab2db2c09f1deb07bc772e1e6f8a3aa38b734b3bc97012b164a200b
EBUILD uclibc-0.9.33.2-r3.ebuild 10755 SHA256 77fde6f1254898e42f584e1f83468ed0631cd1a48c47f9eaeb36f61bf5d56e61 SHA512 d679233d6560b4f75df6726da2cf7f54302add8b5c1adbf285d08472001c3388084857551b6fe863755cc5a84d64046e87f08ffd648ae2339d747e83c76a847b WHIRLPOOL 54c0444b9012b0b3bacc0b78129b77aefcd217f346fc905d507c442aa60d5bf8317a206359cc447e6a9d2fa6de5116996c1c3936c51ecc281dd39e9803eaac31
EBUILD uclibc-0.9.33.2-r4.ebuild 9098 SHA256 0cee928603eef29dd0bdff08828a2111c30fa702751e1d27abd23260cde5bb99 SHA512 9500ac28f449b1d2cab17c39837b60cbe6c8724aa09f4de25930ab7bc007d58f24f0810b2f272890dc7af9a82de60303045f0895d75f5ada2667f21220b7a39c WHIRLPOOL f73243b4aa6842383faaad1d6e2e789d9bd9aef18ed0f0c899b4c0ee61e0366db3939241f908730f5f69900a3a81cfffb22a460229ae68959d55f965b839ef3e
@@ -34,22 +36,22 @@ EBUILD uclibc-0.9.33.2-r9.ebuild 9106 SHA256 ba5eb437f915ad4d375dc42ad1645aec93a
EBUILD uclibc-0.9.33.2.ebuild 10619 SHA256 03a88e82c07024fb617f7d8ab0d6845d7f89eb5652023f08b2ce7679cca6d247 SHA512 b200a9c5ecd5990d97eb98bcf07471809db308d7f3a5232d82fc97be94bb18296def134156a071b5793d14b63b5e404c7e9f678731008c478e656a9e9b305d0b WHIRLPOOL a0ff9747895a0da632e910558cb0492d47c6050152ab41e43dc749a48a2e1fd73459f829d695fba2dc811302ad88eb4e4e3c2df720edd6aa30e03a3aba1ff52d
EBUILD uclibc-0.9.33.9999.ebuild 9236 SHA256 41c8f7296cea43ac2d5947ca4d88ab0b3acf01dac3501346f152a6f2eef99561 SHA512 ff68dc29988c52dec63853289ea83811cf010f77f237576594bd189849a7db3c481f21adc2bc6898359125fd4a1f3e0b42f1c66e119ddd76d336d107818f5017 WHIRLPOOL 83d6e87e443da1639969c8d48d928b668f83339813454d036e755a22905e88f65215c85fbbd20de73ad6fa5f25f6c0f5b3f97ea936cbd70b267a9d379a1ff47b
EBUILD uclibc-9999.ebuild 9210 SHA256 5fc9ef9a0efa4e8cd394619fa7c3c68c759d70d1651210c0e4772cd5b9c5a74a SHA512 ef111b5fb58864b37957b0112965d56f97557e4141d2b9b9cde59346bd6053126ec5cdfce405ca5f6e74b154c66cfd6bb4aa0f4b62dc56841ee77884df183d66 WHIRLPOOL a8866c794c7bb6980cea9f6d98a21599f45290b69126de5bfe2d2b3f058be0c302363941db035131f0b872823e650d9e30486d0486f94f64bb836353eb155fba
-MISC ChangeLog 25598 SHA256 35fa403f354b859c5f53a97e8420cf457e1ba828aa274f555dc95beb7d497945 SHA512 be6ded87ebc20d0dd044fb10c6cddb36d74e35847e261a69890ae537c506a8bcb4f14b007e393d36363a97f505c236f849656263644f50ee5dffd2e0d5c74c13 WHIRLPOOL d1e1caf3fdb4c2e60d6f1a40809975a9ca44ef76a367fad4fe0ce2b094806c2349634be17922ea1070d7dd9fbab39485e31b760eb806c21844c859babe92792a
+MISC ChangeLog 25829 SHA256 443cb98542004502e80248ed26910f77e93604489d57b66419d0415752c486cc SHA512 d702897e7b19b0efffb78877ac23cc70fbf2059c6ba5b3eec5a2cd5b89530496e44fa78a078e5d4b3c963c966040918640eda020159bb76aaa05b7521e234a3f WHIRLPOOL ec918e4150c6564fedb515cc7eb7cf191300df9eaa456e313573d47290913ed5e92864877169eb8f4dbc50d7004258ae733659a4016b9acb854b24aa7ace0cf9
MISC metadata.xml 1292 SHA256 b4bdcfd7ab17ae024dcd8c22acab27dd02fbb6232fad9f9f2e266bed316b726e SHA512 c6f18ed33a662a22c8ea24342ab604cbf63009360f6f7ca25560f64876fa5fc81b21f6791fb0f3b7e9205171577334b00e8d81d05953dfd3b02e7304f504424e WHIRLPOOL 29c8024561257c0f36af0a107d891358039ae4631f3218527b30b490abe8cb409e91112945c4ff371cecbf43978b0946d64d873a5a914d025093b4e407ac5687
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iQIcBAEBCAAGBQJU8CVoAAoJEPGu1DbS6WIA0W4P/1z+tlBp4hGHPPnfrKdMP8P6
-ux1Z0yDMn1+3Jtdhuf/RKFnyyayChtQOn11kBTtAUJcK6bnFwt1sfSnkIsI7usoy
-4Z7fWVMATLdhzbZGZy2QJP/KkpnDm5T5ULyC5L+YVpX7Zuu9vNpJSgXrexsdGhMy
-0lF9R5IbrrqfV4GVyWusAmMpfWlsionedItCe0DS61pKuceIWTE+xZUFZZX5r1Nz
-Mt7flo7UBpR1myRSgvXY82NjfAvPwFqbRiZErnLw917BM5V1uMr3c3REABDF6fT4
-WVOC4bl2TLRgcRncMWPCXQOJcLaKPRqUG6Jyxdm23Vjw/jQWaM2kaDDe2M9VNrfV
-jB/M1bJ83R8vaTfDaWF258b57y8dvFMkI1MxNwTwx1zRUn3DmqQUxV1KrpPbs7rt
-65AVTO/NPZ4l7OOlIUCDhMlTbHPHb6OLthaMDONEOr0Oz8MDSD4THfS6/6/4SADg
-R9Nq1sxAVE1Mof3d7HKL8H0boMWmOhJ/3CMYZ2CoQ6nqT/D352wZHUK9VSLlpncM
-WLD5gymVmTMHmHcHlGAFjOAbwbH1C8jQrdSxegUznK4HPqDr2I1hT8wFwHTnf2eE
-8UHtCUNaj/RTJ7W5x9nK/3zAnWHoZQATER1oE/79lkmfBXTbpjS7vMKTST4h1hRw
-K0KXqW6hOK/l/Cf/Hhkj
-=YOjU
+iQIcBAEBCAAGBQJVaNNcAAoJEJOE+m71LUu63YgP/08VLNGvdUXTcDMTr5L6c1/4
+Vzrl7eeGffHNhtoU6DrJpKWfQt4KbIcs5poAfjPaTWGPoKWb3Pzuatxw60dKnjiQ
+dqgXuXzhNNPmVWi1xs+mzFUrBWHVenWD5W5F3M87G24p7dbM66i1Z5qLtLAPrkaL
+NOEkQL8hATQbEny1U3NYBUexioNDJTU2pNUyPKJT5GfVwRBvDmdDni2IqpmTEmhE
+abKF6mkAtRZM9OupsFTLbQ5uDIUy8YxjVxfB0vyQ5gYe2QMS4wX8vzKm3x2nfurf
+7SDiqQVixpDaJlV+MLjRVDaUuCO94VuvpPUN5wzKazS0dTPUH8ZvwTn3xjoEgb/K
+tfGYwQ8FaJf+GFC5CYDQu3mOYnPBOAUPAc2MJsqHVLJo1/iITtSo96SJXV8qWqqj
+saRhdSTlfmZeB+9D54/UJhcto0UlSoEaV0KF9PaoCubKqesJbGF7LRgev+l3Lu7c
+JXtQt19E6668TJyty0H72fdyVSqCDCQmN2KCJ/j1JxGKNM0Wb32jawKv7B70gAo7
+avpaQezrXKWapL5BVg4ISCFp9bQv9CY06h8BMVDi2IwIYjsGTlq8onl/iCyMYQ2/
+RniTJYlzmB2DkT3OUuq67YZuDjBiC/9d6nmbEhnvMCN3bBpl3HP4A6clxWEFP9vZ
+5nQwE/zwwS5SgHBGU+/5
+=qLYW
-----END PGP SIGNATURE-----
diff --git a/sys-libs/uclibc/uclibc-0.9.33.2-r15.ebuild b/sys-libs/uclibc/uclibc-0.9.33.2-r15.ebuild
new file mode 100644
index 000000000000..190fafffe7ea
--- /dev/null
+++ b/sys-libs/uclibc/uclibc-0.9.33.2-r15.ebuild
@@ -0,0 +1,348 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r15.ebuild,v 1.1 2015/05/29 20:59:03 blueness Exp $
+
+inherit eutils flag-o-matic multilib toolchain-funcs savedconfig
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://git.busybox.net/uClibc"
+ inherit git-2
+fi
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+MY_P=uClibc-${PV}
+DESCRIPTION="C library for developing embedded Linux systems"
+HOMEPAGE="http://www.uclibc.org/"
+if [[ ${PV} != "9999" ]] ; then
+ PATCH_VER="17"
+ SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
+ ${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}"
+ KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86"
+fi
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only"
+RESTRICT="strip"
+
+S=${WORKDIR}/${MY_P}
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+alt_build_kprefix() {
+ if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then
+ echo /usr/include
+ else
+ echo /usr/${CTARGET}/usr/include
+ fi
+}
+
+just_headers() {
+ use crosscompile_opts_headers-only && is_crosscompile
+}
+
+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() {
+ if [ ${CTARGET} = ${CHOST} ] ; then
+ case ${CHOST} in
+ *-uclinux*|*-uclibc*) ;;
+ *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;;
+ esac
+ fi
+}
+
+check_cpu_opts() {
+ case ${CTARGET} in
+ # Need to handle $ABI here w/mips.
+ mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
+ sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
+ i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
+ # XXX: Should figure out how to handle sparc.
+ esac
+
+ if use nptl ; then
+ case ${CTARGET} in
+ i386*)
+ die "Your target has no support for NPTL"
+ ;;
+ esac
+ fi
+}
+
+kconfig_q_opt() {
+ local flag=$1; shift
+ case ${flag} in
+ y|n) ;;
+ *) flag=$(usex ${flag} y n) ;;
+ esac
+
+ local var="defs_${flag}"
+ eval "${var}+=( $* )"
+}
+
+get_opt() {
+ (
+ unset ${1}
+ . ${2:-"${S}"/.config}
+ echo ${!1}
+ )
+}
+
+src_oldconfig() {
+ yes "" 2>/dev/null | emake -s oldconfig >/dev/null
+}
+src_config() {
+ restore_config .config
+ if [ -f .config ]; then
+ src_oldconfig
+ return 0
+ else
+ ewarn "Could not locate user configfile, so we will save a default one"
+ fi
+
+ emake ARCH=${target} defconfig >/dev/null || die
+
+ local defs_{y,n} defs
+
+ defs=(
+ DO{DEBUG_PT,ASSERTS}
+ SUPPORT_LD_DEBUG_EARLY
+ UCLIBC_HAS_PROFILING
+ )
+ kconfig_q_opt n "${defs[@]}"
+ kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG
+
+ sed -i -e '/ARCH_.*_ENDIAN/d' .config
+ kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN"
+
+ if [[ ${CTARGET} == arm* ]] ; then
+ kconfig_q_opt n CONFIG_ARM_OABI
+ kconfig_q_opt y CONFIG_ARM_EABI
+ fi
+
+ defs=(
+ MALLOC_GLIBC_COMPAT
+ DO_C99_MATH
+ UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC}
+ UCLIBC_HAS_FENV
+ UCLIBC_HAS_{N,}FTW
+ UCLIBC_HAS_GNU_GLOB
+ UCLIBC_HAS_LIBUTIL
+ UCLIBC_HAS_PROGRAM_INVOCATION_NAME
+ UCLIBC_HAS_RESOLVER_SUPPORT
+ UCLIBC_HAS_TZ_FILE_READ_MANY
+ UCLIBC_HAS_UTMPX
+ UCLIBC_SUPPORT_AI_ADDRCONFIG
+ UCLIBC_SUSV3_LEGACY
+ UCLIBC_SUSV3_LEGACY_MACROS
+ UCLIBC_SUSV4_LEGACY
+ UCLIBC_USE_NETLINK
+ PTHREADS_DEBUG_SUPPORT
+ )
+ kconfig_q_opt y "${defs[@]}"
+ kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE
+ kconfig_q_opt n UCLIBC_HAS_LOCALE
+ kconfig_q_opt n HAS_NO_THREADS
+ kconfig_q_opt ipv6 UCLIBC_HAS_IPV6
+ kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE
+ kconfig_q_opt !nptl LINUXTHREADS_OLD
+ kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC
+ kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP
+ kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT
+
+ # we need to do it independently of hardened to get ssp.c built into libc
+ kconfig_q_opt y UCLIBC_HAS_SSP
+ kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT
+ kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM
+ kconfig_q_opt n PROPOLICE_BLOCK_ABRT
+ kconfig_q_opt y PROPOLICE_BLOCK_SEGV
+
+ # 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
+ kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK
+ else
+ kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK
+ fi
+ kconfig_q_opt y UCLIBC_BUILD_RELRO
+ kconfig_q_opt hardened UCLIBC_BUILD_PIE
+ kconfig_q_opt hardened UCLIBC_BUILD_NOW
+ kconfig_q_opt !ssp SSP_QUICK_CANARY
+ kconfig_q_opt ssp UCLIBC_BUILD_SSP
+
+ local def
+ for def in 1 2 ; do
+ # Run twice as some config opts depend on others being enabled first.
+ for def in ${defs_y[@]} ; do
+ sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config
+ done
+ for def in ${defs_n[@]} ; do
+ sed -i -e "s:${def}=y:# ${def} is not set:g" .config
+ done
+ src_oldconfig
+ done
+
+ einfo "Enabled options:"
+ for def in ${defs_y[@]} ; do
+ einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}")
+ done
+ einfo "Disabled options:"
+ for def in ${defs_n[@]} ; do
+ einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}")
+ done
+
+ # setup build and run paths
+ sed -i \
+ -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \
+ -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
+
+ src_oldconfig
+}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ unpack ${A}
+ fi
+ cd "${S}"
+ if [[ -n ${PATCH_VER} ]] ; then
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch
+ fi
+
+ epatch_user
+
+ 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
+
+ ########## CPU SELECTION ##########
+
+ local target=$(tc-arch) config_target
+ case ${target} in
+ amd64) target="x86_64";;
+ arm) target="arm"; config_target="GENERIC_ARM";;
+ avr) target="avr32";;
+ mips) target="mips"; config_target="MIPS_ISA_1";;
+ ppc) target="powerpc";;
+ sh) target="sh"; config_target="SH4";;
+ x86) target="i386"; config_target="486";;
+ esac
+ if [[ -n ${config_target} ]] ; then
+ sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
+ extra/Configs/Config.${target} || die
+ fi
+ sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
+
+ src_config
+
+ if use iconv ; then
+ # Run after make clean, otherwise files removed
+ find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt
+ if [[ ! -f /etc/locale.gen ]] ; then
+ # See ./extra/locale/LOCALES for examples
+ die "Please create an appropriate /etc/locale.gen for locale support"
+ fi
+ echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt
+ cat /etc/locale.gen >> ./extra/locale/locales.txt
+ fi
+}
+
+src_compile() {
+ emake headers || die
+ just_headers && return 0
+
+ emake || die
+ if is_crosscompile ; then
+ emake -C utils hostutils || die
+ else
+ emake utils || die
+ fi
+}
+
+src_test() {
+ is_crosscompile && return 0
+
+ # assert test fails on pax/grsec enabled kernels - normal
+ # vfork test fails in sandbox (both glibc/uclibc)
+ emake UCLIBC_ONLY=1 check || die
+}
+
+src_install() {
+ local sysroot=${D}
+ is_crosscompile && sysroot+="/usr/${CTARGET}"
+
+ local target="install"
+ just_headers && target="install_headers"
+ emake DESTDIR="${sysroot}" ${target} || die
+
+ 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 is_crosscompile ; then
+ dosym usr/include /usr/${CTARGET}/sys-include
+ if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then
+ newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
+ newbin utils/ldd.host ${CTARGET}-ldd || die
+ fi
+ return 0
+ fi
+
+ emake DESTDIR="${D}" install_utils || die
+ dobin extra/scripts/getent
+ dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
+}
+
+pkg_postinst() {
+ is_crosscompile && return 0
+
+ if [ ! -e "${ROOT}"/etc/TZ ] ; then
+ ewarn "Please remember to set your timezone in /etc/TZ"
+ mkdir -p "${ROOT}"/etc
+ echo "UTC" > "${ROOT}"/etc/TZ
+ fi
+ [ "${ROOT}" != "/" ] && return 0
+ # update cache before reloading init
+ ldconfig
+ # reload init ...
+ /sbin/telinit U 2>/dev/null
+}