diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-07-11 05:38:46 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-07-11 05:44:44 +0000 |
commit | f00ea22784d28a92b14dd5b570eda217c7d9a462 (patch) | |
tree | c1b263dea6b951efe35c46424083a41b4e9420cc /main/musl/APKBUILD | |
parent | dc3ff4b277d5a9ae36771ac635f8d43eb0cbfb59 (diff) |
main/musl: various fixes from git master, and packaging fixes
- use upstream commits for all arm pie/unwind fixes
- replace getopt with BSD licensed GNU compatible getopt
- set proper SONAME for the libc generated for packaging purposes
- rename libc.so to be ld-musl-$ARCH.so.1 and point the SONAME
and ldd links to it. this allows libc.so to go to -dev package
as it will be used for compiling only.
- move specs file to musl-crosstool subpackage
Diffstat (limited to 'main/musl/APKBUILD')
-rw-r--r-- | main/musl/APKBUILD | 79 |
1 files changed, 58 insertions, 21 deletions
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index f693d63f4b1..1a68391b102 100644 --- a/main/musl/APKBUILD +++ b/main/musl/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: William Pitcock <nenolod@dereferenced.org> pkgname=musl pkgver=0.9.11 -pkgrel=1 +pkgrel=2 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" arch="x86 x86_64 arm armel" @@ -16,8 +16,15 @@ subpackages="$pkgname-dev $pkgname-utils" source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz 0001-fix-Makefile-so-make-install-works-before-include-bi.patch 0002-add-stubs-for-additional-legacy-ether.h-functions.patch - 0003-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch - crt-arm-Scrt1.s + 0003-add-legacy-scsi-scsi_ioctl.h-header.patch + 0004-add-legacy-sys-ttydefaults.h-header.patch + 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch + 0006-fix-off-by-one-array-bound-in-strsignal.patch + 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch + 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch + 0009-add-PIE-support-for-ARM.patch + + getopt_long.c getent " @@ -30,16 +37,17 @@ prepare() { *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done - cp "$srcdir"/crt-arm-Scrt1.s crt/arm/Scrt1.s + + # use GNU compatible getopt() from BSD + rm -f src/misc/getopt*.c + cp "$srcdir"/getopt_long.c src/misc/ } build() { local _ldflags cd "$_builddir" - [ "${CTARGET#*musl}" = "$CTARGET" ] && _ldflags="-Wl,-soname,libc-musl-${CARCH}.so" - LDFLAGS="$LDFLAGS $_ldflags" \ + LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \ ./configure --prefix=/usr \ - --libdir=/lib \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ @@ -52,34 +60,63 @@ package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/*.la + + # make LDSO the be the real file, and libc the symlink (will be upstream change) + local LDSO=$(make -f Makefile --eval "$(echo -e 'print-ldso:\n\t@echo $$(basename $(LDSO_PATHNAME))')" print-ldso) + mv -f "$pkgdir"/usr/lib/libc.so "$pkgdir"/lib/"$LDSO" || return 1 + ln -sf "$LDSO" "$pkgdir"/lib/libc.musl-${CARCH}.so.1 || return 1 + ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/lib/libc.so || return 1 + mkdir -p "$pkgdir"/usr/bin + ln -sf ../../lib/"$LDSO" "$pkgdir"/usr/bin/ldd || return 1 } utils() { mkdir -p "$subpkgdir"/usr/bin - ln -s /lib/libc.so "$subpkgdir"/usr/bin/ldd + mv "$pkgdir"/usr/bin/ldd "$subpkgdir"/usr/bin + find "$pkgdir" -type d -delete 2>/dev/null install -D "$srcdir"/getent "$subpkgdir"/usr/bin/getent } crosstool() { - mkdir -p "$subpkgdir"/usr/bin + mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib mv "$pkgdir"/usr/bin/musl-gcc "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/lib/musl-gcc.specs "$subpkgdir"/usr/lib + find "$pkgdir" -type d -delete 2>/dev/null } md5sums="70b17ca5c847e74e1c77fe8284bb1fa4 musl-0.9.11.tar.gz -1565f77513aa6779057ff184a2f91073 0001-fix-Makefile-so-make-install-works-before-include-bi.patch -76e0b13d63a6665b3f9ea3d3b00fecdb 0002-add-stubs-for-additional-legacy-ether.h-functions.patch -726f0c448aaf042157c83513c1b2faf0 0003-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch -da55f98744cdcdaf59efac116403c790 crt-arm-Scrt1.s +aad8311afd9731c4fc0b233b2f8fbea6 0001-fix-Makefile-so-make-install-works-before-include-bi.patch +784768d2852b9e92331b0e4a113885f0 0002-add-stubs-for-additional-legacy-ether.h-functions.patch +68972594ee10388b927c4dab8752ff40 0003-add-legacy-scsi-scsi_ioctl.h-header.patch +be8d8679592120ac58d8e8cd65955858 0004-add-legacy-sys-ttydefaults.h-header.patch +7e34c5d8e8b2561a5c208f45914f5098 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch +dc3391e1c71f054457a94e96b5c439da 0006-fix-off-by-one-array-bound-in-strsignal.patch +2a34be5410b4b6f849ac65886fe512c0 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch +254ac95d521dd908739f2d9e361b9129 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch +1eb1f8e1574a70bc39cc66aad536236b 0009-add-PIE-support-for-ARM.patch +acbb8a052228d9d5b89bc2ed55616fe3 getopt_long.c ef81489a6258501cf45db58dfc6d5211 getent" sha256sums="8b81fd9b71becb7b674ea93fd65d82a039fab79ab738957a5e9ee47ba08a13fd musl-0.9.11.tar.gz -60e38a633d35eb44c7b12b3a2b0ea570c9462af7f966a9fcea4382fe6e6e6c6f 0001-fix-Makefile-so-make-install-works-before-include-bi.patch -6c916f34bb2dc89fc3de6786d9b7e2d2b829d9020e97097e46b97071be09405a 0002-add-stubs-for-additional-legacy-ether.h-functions.patch -577307cae7d00ab2f5a9e2530f462b417bf7112f739a0a0cd3327d7f793edb65 0003-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch -636788dda68b3aed647b3a30b06401823c90c2cf8ce085b270ce27c77e8919f3 crt-arm-Scrt1.s +55e07c49e420af16ee2783613b43cb2673b9f4006ede03d202faf53bd103a1c1 0001-fix-Makefile-so-make-install-works-before-include-bi.patch +76b9e2f477ac9c536293f0b7e48d87fdc267e87bda8990c406af8e5314bdc93b 0002-add-stubs-for-additional-legacy-ether.h-functions.patch +f0c51e603f9b45fbcf0a2a372a9867cda5d6a561367b6320dc9f221ac1d9f5d0 0003-add-legacy-scsi-scsi_ioctl.h-header.patch +ac580e372f3f35ecbf56ad4a2a245a2f6717be2ddf545169d89b2c7a8c471996 0004-add-legacy-sys-ttydefaults.h-header.patch +ebbb392854f4ff0bcf5687611c9d0793ebbcbd65824de1a8b861c6f35eeaa1ed 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch +05b367fa68f444ab4722bddde88f01973fb850f696320a2a115626a5bff094d3 0006-fix-off-by-one-array-bound-in-strsignal.patch +a3de225c2b0e325333ecdfdf015ece988e8f0533f3056cfcd0b855680d7c2264 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch +d5af7765f2ec1f92f42d6d9d94fd1a1fefa876760141a4701a57db1d5d71e21a 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch +25034a597d18f04fc371c97bc7ab014ff3ec2d185cfb3abc7d3bbcbc63fde3fc 0009-add-PIE-support-for-ARM.patch +5427781da6c5877c017eeccba58c70bce3451536355ac949699ed807137a476a getopt_long.c d6996273f5aaaed429058257e4646b243d9e3a4d8609522f802762453f5be4cb getent" sha512sums="7ca852eda3be7b34bfdaf1eb9e7d435987d5177f865737b211e62f4037825cc322436e1ff49c3f875b3a20679f6f21ba5ffff271d03d3d03c7a97854f4f51832 musl-0.9.11.tar.gz -80d9e3594c4f7471ea404216b40a44831bfa930f81792e566e83d7e1a158ee5d5f75129b67536c969f10fbe96aa549326ba461229fb0a08e0a3fd1bc569f95fc 0001-fix-Makefile-so-make-install-works-before-include-bi.patch -24415afa48c9e918c4c7a0c1e5a38bd150d03e92cde6bf709460c713de49a61128ea93103af601a54a6cf164bcedd304aa34933e97053e1b4ab41584ce44f768 0002-add-stubs-for-additional-legacy-ether.h-functions.patch -3e2164caf37f973e470832198dc8a4cdafe599cdd787c5e6e46a6a55367eb1db4032f56fb1165ddf1232df1468f276488c2d8269f530d93f249d659b62b76e8e 0003-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch -2bcc69f766e0d841938b7d357b54878597fed97a6b6401b666aa07834ca3c773b9d262103ab0b129e18df00f38e51244c9966e1c138b06cbbf181e32be3ae078 crt-arm-Scrt1.s +02eee7261d28d2cac59910839dfc7b9389bec8bee3f68dc21a0b1d4fd112ffddaae8aadf4392528773dc0c5a48715cdc525a2ba3a51ac5f34fb49e9ceb49e644 0001-fix-Makefile-so-make-install-works-before-include-bi.patch +4b71a25a539ee35a0183503ba28583a38fb96dffa38de63ff8ba0e62893f84e1832e22aca506e1d79e41e2b37c712acf38f479c6b46d5e3237c8158db2352b36 0002-add-stubs-for-additional-legacy-ether.h-functions.patch +b4b3724b754ad3cf56ffbfe9bdd4cafbebb14e1d16a094793a0bf2e219f29e0a7547e123664bd1d7ffa3149f4a52be387e391b5903f967a2f57fbb3161b4fdaf 0003-add-legacy-scsi-scsi_ioctl.h-header.patch +cab60cb2baf86128fd5d45d83ae0315afefce9e1d91b7c5fa3fffc02b1483f753eedae01f226fe339d693de44236292e7b79e3abcc25e823f955aab83889c629 0004-add-legacy-sys-ttydefaults.h-header.patch +e9cd8c3994a22f48288279b2678e24415ab29a8f462df087de63b7415581059d6bd412d17b7d7008cd97ac09276f514fc4bd6cd4e39ee2fd4d7c8591e8478f4c 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch +20e91a56000ac53bf5d5db8e1f731a2f80824ee6e4a057d64e193601f3d45b1e3dbd836de82cf4c8d855eedb88e9a61f48c30b2b772840bdbd5c004c71cb0deb 0006-fix-off-by-one-array-bound-in-strsignal.patch +a70092efce1fbd02fd8c82bef5bb4c51c98f8023a5fdd7ec3c64519ceb98b72745b375d002c85c29d1adef09ac06bc433505f358e8c3516828291b3f8503626d 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch +20dd237aa8e9eda29fac0b443abe3ebb45692221425c31f4453d2f9a5394687d5befac00a755bf098b0ac3707ee8c5a52ebf78cc11c5d719f567afb626ddc2dd 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch +b739639e90c8d6c985732dee44e2eadf12195876e60f64437a147fbbd5c758d84fb5078ef0c48ccb560d2c8f0b849e3e4670a2f1cd7f15c075b7b8a95563e2c8 0009-add-PIE-support-for-ARM.patch +e5e945f26daae5498e2a2e463d4bb3724294bc5dd4bf9a93a0f18e333f277e18e5977e144642bf45185d25ffa167316fe9914c9885d491a0034b2f4cccb0d07f getopt_long.c 4d92f934d760cf5157d80f19fd766be6b673c65317229b32ac824d9d192f6abcc414e2382b2416dfd5c2f757b46ced98c18e4762bf91f5a48647e0ee61813b06 getent" |