diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-07-03 12:53:14 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-07-03 12:58:19 +0000 |
commit | 16e360f2a1eaf320e1fc9fc73eb17b8e8649c4e5 (patch) | |
tree | 9a6215814e95678fe21ea5410f2ca9141777b9f5 /main/musl | |
parent | a1d5f4aa3b84978b253574c982564d1310f20be0 (diff) | |
download | aports-16e360f2a1eaf320e1fc9fc73eb17b8e8649c4e5.tar.bz2 aports-16e360f2a1eaf320e1fc9fc73eb17b8e8649c4e5.tar.xz |
main/musl: upgrade 0.9.11
Also don't build crosstool for native musl builds.
Diffstat (limited to 'main/musl')
-rw-r--r-- | main/musl/0001-fix-Makefile-so-make-install-works-before-include-bi.patch | 53 | ||||
-rw-r--r-- | main/musl/0002-add-stubs-for-additional-legacy-ether.h-functions.patch | 58 | ||||
-rw-r--r-- | main/musl/APKBUILD | 33 | ||||
-rw-r--r-- | main/musl/crt-arm-Scrt1.s | 34 |
4 files changed, 170 insertions, 8 deletions
diff --git a/main/musl/0001-fix-Makefile-so-make-install-works-before-include-bi.patch b/main/musl/0001-fix-Makefile-so-make-install-works-before-include-bi.patch new file mode 100644 index 0000000000..5b080bd2f5 --- /dev/null +++ b/main/musl/0001-fix-Makefile-so-make-install-works-before-include-bi.patch @@ -0,0 +1,53 @@ +From d66ab4f1409ad1a2093239ef48b7bca596acdf52 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Mon, 1 Jul 2013 13:43:43 -0400 +Subject: [PATCH 1/2] fix Makefile so "make install" works before include/bits + symlink exists + +previously, determination of the list of header files for installation +depended on the include/bits symlink (to the arch-specific files) +already having been created. in other words, running "make install" +immediately after configure without first running "make" caused the +bits headers not to be installed. + +the solution I have applied is to pull the list of headers directly +from arch/$(ARCH)/bits rather than include/bits, and likewise to +install directly from arch/$(ARCH)/bits rather than via the symlink. + +at this point, the only purpose served by keeping the symlink around +is that it enables use of the in-tree headers and libs directly via -I +and -L, which can be useful when testing against a new version of the +library before installing it. on the other hand, removing the bits +symlink would be beneficial if we ever want to support building +multiple archs in the same source tree. +--- + Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 997c5bb..6a86211 100644 +--- a/Makefile ++++ b/Makefile +@@ -37,7 +37,8 @@ CFLAGS_ALL_SHARED = $(CFLAGS_ALL) -fPIC -DSHARED + AR = $(CROSS_COMPILE)ar + RANLIB = $(CROSS_COMPILE)ranlib + +-ALL_INCLUDES = $(sort $(wildcard include/*.h include/*/*.h) $(GENH)) ++ARCH_INCLUDES = $(wildcard arch/$(ARCH)/bits/*.h) ++ALL_INCLUDES = $(sort $(wildcard include/*.h include/*/*.h) $(GENH) $(ARCH_INCLUDES:arch/$(ARCH)/%=include/%)) + + EMPTY_LIB_NAMES = m rt pthread crypt util xnet resolv dl + EMPTY_LIBS = $(EMPTY_LIB_NAMES:%=lib/lib%.a) +@@ -124,6 +125,9 @@ $(DESTDIR)$(libdir)/%.so: lib/%.so + $(DESTDIR)$(libdir)/%: lib/% + install -D -m 644 $< $@ + ++$(DESTDIR)$(includedir)/bits/%: arch/$(ARCH)/bits/% ++ install -D -m 644 $< $@ ++ + $(DESTDIR)$(includedir)/%: include/% + install -D -m 644 $< $@ + +-- +1.8.3.2 + diff --git a/main/musl/0002-add-stubs-for-additional-legacy-ether.h-functions.patch b/main/musl/0002-add-stubs-for-additional-legacy-ether.h-functions.patch new file mode 100644 index 0000000000..4d23b32f96 --- /dev/null +++ b/main/musl/0002-add-stubs-for-additional-legacy-ether.h-functions.patch @@ -0,0 +1,58 @@ +From fbcd82040cb67ee14886c6ac4c200cde3662f986 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Mon, 1 Jul 2013 13:50:02 -0400 +Subject: [PATCH 2/2] add stubs for additional legacy ether.h functions + +these would not be expensive to actually implement, but reading +/etc/ethers does not sound like a particularly useful feature, so for +now I'm leaving them as stubs. +--- + include/netinet/ether.h | 6 +++--- + src/network/ether.c | 15 +++++++++++++++ + 2 files changed, 18 insertions(+), 3 deletions(-) + +diff --git a/include/netinet/ether.h b/include/netinet/ether.h +index c5179d5..d64c9ef 100644 +--- a/include/netinet/ether.h ++++ b/include/netinet/ether.h +@@ -4,11 +4,11 @@ + #include <netinet/if_ether.h> + + char *ether_ntoa (const struct ether_addr *); +- + struct ether_addr *ether_aton (const char *); +- + char *ether_ntoa_r (const struct ether_addr *, char *); +- + struct ether_addr *ether_aton_r (const char *, struct ether_addr *); ++int ether_line(const char *, struct ether_addr *, char *); ++int ether_ntohost(char *, const struct ether_addr *); ++int ether_hostton(const char *, struct ether_addr *); + + #endif +diff --git a/src/network/ether.c b/src/network/ether.c +index ac55411..4304a97 100644 +--- a/src/network/ether.c ++++ b/src/network/ether.c +@@ -41,3 +41,18 @@ char *ether_ntoa (const struct ether_addr *p_a) { + static char x[18]; + return ether_ntoa_r (p_a, x); + } ++ ++int ether_line(const char *l, struct ether_addr *e, char *hostname) ++{ ++ return -1; ++} ++ ++int ether_ntohost(char *hostname, const struct ether_addr *e) ++{ ++ return -1; ++} ++ ++int ether_hostton(const char *hostname, struct ether_addr *e) ++{ ++ return -1; ++} +-- +1.8.3.2 + diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD index ab1a0b2ee4..927c117ebd 100644 --- a/main/musl/APKBUILD +++ b/main/musl/APKBUILD @@ -1,18 +1,23 @@ # Contributor: William Pitcock <nenolod@dereferenced.org> # Maintainer: William Pitcock <nenolod@dereferenced.org> pkgname=musl -pkgver=0.9.10 +pkgver=0.9.11 pkgrel=0 pkgdesc="the musl c library (libc) implementation" url="http://www.musl-libc.org/" -arch="x86 x86_64 arm" +arch="x86 x86_64 arm armel" license="MIT" depends="" depends_dev="" makedepends="$depends_dev" install="" -subpackages="$pkgname-dev musl-gcc:crosstool" -source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz" +subpackages="$pkgname-dev" +[ "${CTARGET#*musl}" = "$CTARGET" ] && subpackages="$subpackages musl-gcc:crosstool" +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 + crt-arm-Scrt1.s + " _builddir="$srcdir"/musl-$pkgver prepare() { @@ -23,11 +28,14 @@ prepare() { *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done + cp "$srcdir"/crt-arm-Scrt1.s crt/arm/Scrt1.s } build() { + local _ldflags cd "$_builddir" - LDFLAGS="-Wl,-soname,libc-musl-${CARCH}.so" \ + [ "${CTARGET#*musl}" = "$CTARGET" ] && _ldflags="-Wl,-soname,libc-musl-${CARCH}.so" + LDFLAGS="$LDFLAGS $_ldflags" \ ./configure --prefix=/usr \ --libdir=/lib \ --sysconfdir=/etc \ @@ -49,6 +57,15 @@ crosstool() { mv "$pkgdir"/usr/bin/musl-gcc "$subpkgdir"/usr/bin } -md5sums="8998be253b6f0880a1ce00d85dbae9c5 musl-0.9.10.tar.gz" -sha256sums="71fc00733a3ee45fab342870ccd84d33d079e64f2d6fdcfb8b463a769c3ff391 musl-0.9.10.tar.gz" -sha512sums="a31b4dc367672dd3056476b4e7a5c7affd81d33ead2427e043b94da8251167d93178af5ef43ad962354d18eb260435bb3968a3a8f2f684c89d0bc74a32304936 musl-0.9.10.tar.gz" +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 +74917fb9427ccfa696d5c4969b0148bd crt-arm-Scrt1.s" +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 +f622e052c674592487b711e87c5d1fb861a5240454cccdf9f6060247bbbb0255 crt-arm-Scrt1.s" +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 +2c1214ebd5b053242e613e193758d22a324ab66ac773974c851603469b8c392d22e38a1a81a5fa10dfe2ba1cd2f1fb34d0b543ddae9bdbe17e7796334b809ce0 crt-arm-Scrt1.s" diff --git a/main/musl/crt-arm-Scrt1.s b/main/musl/crt-arm-Scrt1.s new file mode 100644 index 0000000000..b8fdfda995 --- /dev/null +++ b/main/musl/crt-arm-Scrt1.s @@ -0,0 +1,34 @@ +.weak _init +.weak _fini +.text +.global _start +_start: + mov fp,#0 + mov lr,#0 + + pop { a2 } + mov a3, sp + push { a3 } + push { a1 } + + ldr sl, .L_GOT + adr a4, .L_GOT + add sl, sl, a4 + ldr ip, .L_GOT+4 + ldr ip, [sl, ip] + push { ip } + ldr a4, .L_GOT+8 + ldr a4, [sl, a4] + ldr a1, .L_GOT+12 + ldr a1, [sl, a1] + + bl __libc_start_main(PLT) +1: b 1b + + .align 2 +.L_GOT: + .word _GLOBAL_OFFSET_TABLE_ - .L_GOT + .word _fini(GOT) + .word _init(GOT) + .word main(GOT) + |