summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/musl/0001-fix-Makefile-so-make-install-works-before-include-bi.patch53
-rw-r--r--main/musl/0002-add-stubs-for-additional-legacy-ether.h-functions.patch58
-rw-r--r--main/musl/0003-add-legacy-scsi-scsi_ioctl.h-header.patch30
-rw-r--r--main/musl/0004-add-legacy-sys-ttydefaults.h-header.patch58
-rw-r--r--main/musl/0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch31
-rw-r--r--main/musl/0006-fix-off-by-one-array-bound-in-strsignal.patch25
-rw-r--r--main/musl/0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch81
-rw-r--r--main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch66
-rw-r--r--main/musl/0009-add-PIE-support-for-ARM.patch49
-rw-r--r--main/musl/0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch50
-rw-r--r--main/musl/APKBUILD56
11 files changed, 9 insertions, 548 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
deleted file mode 100644
index c34d8c31d..000000000
--- a/main/musl/0001-fix-Makefile-so-make-install-works-before-include-bi.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 997d58d8052fb9f8374afd2fb456785f53217f50 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Mon, 1 Jul 2013 13:43:43 -0400
-Subject: [PATCH 01/10] 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
deleted file mode 100644
index 42a78e15c..000000000
--- a/main/musl/0002-add-stubs-for-additional-legacy-ether.h-functions.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 6e31b284fe98686f8a763de775a087da3be05024 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Mon, 1 Jul 2013 13:50:02 -0400
-Subject: [PATCH 02/10] 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/0003-add-legacy-scsi-scsi_ioctl.h-header.patch b/main/musl/0003-add-legacy-scsi-scsi_ioctl.h-header.patch
deleted file mode 100644
index 0904f610c..000000000
--- a/main/musl/0003-add-legacy-scsi-scsi_ioctl.h-header.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5ece469f37e5cdddb86871b56f4f74674690fbe4 Mon Sep 17 00:00:00 2001
-From: rofl0r <retnyg@gmx.net>
-Date: Wed, 3 Jul 2013 17:52:44 +0200
-Subject: [PATCH 03/10] add legacy scsi/scsi_ioctl.h header
-
----
- include/scsi/scsi_ioctl.h | 11 +++++++++++
- 1 file changed, 11 insertions(+)
- create mode 100644 include/scsi/scsi_ioctl.h
-
-diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h
-new file mode 100644
-index 0000000..22df7fe
---- /dev/null
-+++ b/include/scsi/scsi_ioctl.h
-@@ -0,0 +1,11 @@
-+#ifndef _SCSI_IOCTL_H
-+#define _SCSI_IOCTL_H
-+#define SCSI_IOCTL_SEND_COMMAND 1
-+#define SCSI_IOCTL_TEST_UNIT_READY 2
-+#define SCSI_IOCTL_BENCHMARK_COMMAND 3
-+#define SCSI_IOCTL_SYNC 4
-+#define SCSI_IOCTL_START_UNIT 5
-+#define SCSI_IOCTL_STOP_UNIT 6
-+#define SCSI_IOCTL_DOORLOCK 0x5380
-+#define SCSI_IOCTL_DOORUNLOCK 0x5381
-+#endif
---
-1.8.3.2
-
diff --git a/main/musl/0004-add-legacy-sys-ttydefaults.h-header.patch b/main/musl/0004-add-legacy-sys-ttydefaults.h-header.patch
deleted file mode 100644
index e05106d72..000000000
--- a/main/musl/0004-add-legacy-sys-ttydefaults.h-header.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 129a34db6328cb13fec4d5f2d2703cb7922e8634 Mon Sep 17 00:00:00 2001
-From: rofl0r <retnyg@gmx.net>
-Date: Wed, 3 Jul 2013 17:55:37 +0200
-Subject: [PATCH 04/10] add legacy sys/ttydefaults.h header
-
----
- include/sys/ttydefaults.h | 39 +++++++++++++++++++++++++++++++++++++++
- 1 file changed, 39 insertions(+)
- create mode 100644 include/sys/ttydefaults.h
-
-diff --git a/include/sys/ttydefaults.h b/include/sys/ttydefaults.h
-new file mode 100644
-index 0000000..d251b71
---- /dev/null
-+++ b/include/sys/ttydefaults.h
-@@ -0,0 +1,39 @@
-+#ifndef _SYS_TTYDEFAULTS_H
-+#define _SYS_TTYDEFAULTS_H
-+
-+#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
-+#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
-+#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
-+#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
-+#define TTYDEF_SPEED (B9600)
-+#define CTRL(x) (x&037)
-+#define CEOF CTRL('d')
-+
-+#ifdef _POSIX_VDISABLE
-+#define CEOL _POSIX_VDISABLE
-+#define CSTATUS _POSIX_VDISABLE
-+#else
-+#define CEOL '\0'
-+#define CSTATUS '\0'
-+#endif
-+
-+#define CERASE 0177
-+#define CINTR CTRL('c')
-+#define CKILL CTRL('u')
-+#define CMIN 1
-+#define CQUIT 034
-+#define CSUSP CTRL('z')
-+#define CTIME 0
-+#define CDSUSP CTRL('y')
-+#define CSTART CTRL('q')
-+#define CSTOP CTRL('s')
-+#define CLNEXT CTRL('v')
-+#define CDISCARD CTRL('o')
-+#define CWERASE CTRL('w')
-+#define CREPRINT CTRL('r')
-+#define CEOT CEOF
-+#define CBRK CEOL
-+#define CRPRNT CREPRINT
-+#define CFLUSH CDISCARD
-+
-+#endif
---
-1.8.3.2
-
diff --git a/main/musl/0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch b/main/musl/0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch
deleted file mode 100644
index caf5ea390..000000000
--- a/main/musl/0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9b9dc74b67b9ecd30db9f3266a5ce309b0ffbfef Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Sat, 6 Jul 2013 01:12:28 -0400
-Subject: [PATCH 05/10] add NFDBITS in sys/select.h with appropriate feature
- tests
-
-the main use for this macro seems to be knowing the correct allocation
-granularity for dynamic-sized fd_set objects. such usage is
-non-conforming and results in undefined behavior, but it is widespread
-in applications.
----
- include/sys/select.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/include/sys/select.h b/include/sys/select.h
-index c5a2877..e25257d 100644
---- a/include/sys/select.h
-+++ b/include/sys/select.h
-@@ -32,6 +32,9 @@ typedef struct
- int select (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, struct timeval *__restrict);
- int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, const struct timespec *__restrict, const sigset_t *__restrict);
-
-+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-+#define NFDBITS (8*(int)sizeof(long))
-+#endif
-
- #ifdef __cplusplus
- }
---
-1.8.3.2
-
diff --git a/main/musl/0006-fix-off-by-one-array-bound-in-strsignal.patch b/main/musl/0006-fix-off-by-one-array-bound-in-strsignal.patch
deleted file mode 100644
index e5acb992d..000000000
--- a/main/musl/0006-fix-off-by-one-array-bound-in-strsignal.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 9134a8ca79fa9c79eada278b10f4d6b1eaf271d3 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Tue, 9 Jul 2013 02:11:52 -0400
-Subject: [PATCH 06/10] fix off-by-one array bound in strsignal
-
----
- src/string/strsignal.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/string/strsignal.c b/src/string/strsignal.c
-index 3b0ae6d..d70982a 100644
---- a/src/string/strsignal.c
-+++ b/src/string/strsignal.c
-@@ -48,7 +48,7 @@ static const char map[] = {
- [SIGSYS] = 31
- };
-
--#define sigmap(x) ((unsigned)(x) > sizeof map ? 0 : map[(unsigned)(x)])
-+#define sigmap(x) ((unsigned)(x) >= sizeof map ? 0 : map[(unsigned)(x)])
-
- #endif
-
---
-1.8.3.2
-
diff --git a/main/musl/0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch b/main/musl/0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch
deleted file mode 100644
index 39049963c..000000000
--- a/main/musl/0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 0ccea50c697512b4bcbe76780260dfba09450327 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 10 Jul 2013 14:38:20 -0400
-Subject: [PATCH 07/10] fix invalid library phdr pointers passed to callback
- from dl_iterate_phdr
-
-map_library was saving pointers to an automatic-storage buffer rather
-than pointers into the mapping. this should be a fairly simple fix,
-but the patch here is slightly complicated by two issues:
-
-1. supporting gratuitously obfuscated ELF files where the program
-headers are not right at the beginning of the file.
-
-2. cleaning up the map_library function so that data isn't clobbered
-by the time we need it.
----
- src/ldso/dynlink.c | 25 ++++++++++++++++---------
- 1 file changed, 16 insertions(+), 9 deletions(-)
-
-diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
-index 7031d03..ff5b738 100644
---- a/src/ldso/dynlink.c
-+++ b/src/ldso/dynlink.c
-@@ -309,7 +309,7 @@ static void *map_library(int fd, struct dso *dso)
- size_t this_min, this_max;
- off_t off_start;
- Ehdr *eh;
-- Phdr *ph;
-+ Phdr *ph, *ph0;
- unsigned prot;
- unsigned char *map, *base;
- size_t dyn;
-@@ -324,11 +324,10 @@ static void *map_library(int fd, struct dso *dso)
- if (eh->e_phoff + phsize > l) {
- l = pread(fd, buf+1, phsize, eh->e_phoff);
- if (l != phsize) return 0;
-- eh->e_phoff = sizeof *eh;
-+ ph = ph0 = (void *)(buf + 1);
-+ } else {
-+ ph = ph0 = (void *)((char *)buf + eh->e_phoff);
- }
-- ph = (void *)((char *)buf + eh->e_phoff);
-- dso->phdr = ph;
-- dso->phnum = eh->e_phnum;
- for (i=eh->e_phnum; i; i--, ph=(void *)((char *)ph+eh->e_phentsize)) {
- if (ph->p_type == PT_DYNAMIC)
- dyn = ph->p_vaddr;
-@@ -363,9 +362,18 @@ static void *map_library(int fd, struct dso *dso)
- map = mmap((void *)addr_min, map_len, prot, MAP_PRIVATE, fd, off_start);
- if (map==MAP_FAILED) return 0;
- base = map - addr_min;
-- ph = (void *)((char *)buf + eh->e_phoff);
-- for (i=eh->e_phnum; i; i--, ph=(void *)((char *)ph+eh->e_phentsize)) {
-+ dso->phdr = 0;
-+ dso->phnum = 0;
-+ for (ph=ph0, i=eh->e_phnum; i; i--, ph=(void *)((char *)ph+eh->e_phentsize)) {
- if (ph->p_type != PT_LOAD) continue;
-+ /* Check if the programs headers are in this load segment, and
-+ * if so, record the address for use by dl_iterate_phdr. */
-+ if (!dso->phdr && eh->e_phoff >= ph->p_offset
-+ && eh->e_phoff+phsize <= ph->p_offset+ph->p_filesz) {
-+ dso->phdr = (void *)(base + ph->p_vaddr
-+ + (eh->e_phoff-ph->p_offset));
-+ dso->phnum = eh->e_phnum;
-+ }
- /* Reuse the existing mapping for the lowest-address LOAD */
- if ((ph->p_vaddr & -PAGE_SIZE) == addr_min) continue;
- this_min = ph->p_vaddr & -PAGE_SIZE;
-@@ -390,8 +398,7 @@ static void *map_library(int fd, struct dso *dso)
- goto error;
- break;
- }
-- if (!runtime) reclaim_gaps(base, (void *)((char *)buf + eh->e_phoff),
-- eh->e_phentsize, eh->e_phnum);
-+ if (!runtime) reclaim_gaps(base, ph0, eh->e_phentsize, eh->e_phnum);
- dso->map = map;
- dso->map_len = map_len;
- dso->base = base;
---
-1.8.3.2
-
diff --git a/main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch b/main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch
deleted file mode 100644
index 85557f2f6..000000000
--- a/main/musl/0008-add-some-ARM-EABI-specific-exception-handling-infras.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From f39afb9ffb34b747bfc1ec9d77b239c0c32a754d Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 10 Jul 2013 16:11:01 -0400
-Subject: [PATCH 08/10] add some ARM EABI-specific exception handling
- infrastructure
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-patch by Timo Teräs
----
- arch/arm/src/find_exidx.c | 42 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 42 insertions(+)
- create mode 100644 arch/arm/src/find_exidx.c
-
-diff --git a/arch/arm/src/find_exidx.c b/arch/arm/src/find_exidx.c
-new file mode 100644
-index 0000000..77c4472
---- /dev/null
-+++ b/arch/arm/src/find_exidx.c
-@@ -0,0 +1,42 @@
-+#define _GNU_SOURCE
-+#include <link.h>
-+#include <stdint.h>
-+
-+struct find_exidx_data {
-+ uintptr_t pc, exidx_start;
-+ int exidx_len;
-+};
-+
-+static int find_exidx(struct dl_phdr_info *info, size_t size, void *ptr)
-+{
-+ struct find_exidx_data *data = ptr;
-+ const ElfW(Phdr) *phdr = info->dlpi_phdr;
-+ uintptr_t addr, exidx_start = 0;
-+ int i, match = 0, exidx_len = 0;
-+
-+ for (i = info->dlpi_phnum; i > 0; i--, phdr++) {
-+ addr = info->dlpi_addr + phdr->p_vaddr;
-+ switch (phdr->p_type) {
-+ case PT_LOAD:
-+ match |= data->pc >= addr && data->pc < addr + phdr->p_memsz;
-+ break;
-+ case PT_ARM_EXIDX:
-+ exidx_start = addr;
-+ exidx_len = phdr->p_memsz;
-+ break;
-+ }
-+ }
-+ data->exidx_start = exidx_start;
-+ data->exidx_len = exidx_len;
-+ return match;
-+}
-+
-+uintptr_t __gnu_Unwind_Find_exidx(uintptr_t pc, int *pcount)
-+{
-+ struct find_exidx_data data;
-+ data.pc = pc;
-+ if (dl_iterate_phdr(find_exidx, &data) <= 0)
-+ return 0;
-+ *pcount = data.exidx_len / 8;
-+ return data.exidx_start;
-+}
---
-1.8.3.2
-
diff --git a/main/musl/0009-add-PIE-support-for-ARM.patch b/main/musl/0009-add-PIE-support-for-ARM.patch
deleted file mode 100644
index 17035464e..000000000
--- a/main/musl/0009-add-PIE-support-for-ARM.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 84934ac8bcebb41ffca1703d97512682069c68ec Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 10 Jul 2013 16:58:27 -0400
-Subject: [PATCH 09/10] add PIE support for ARM
-
----
- crt/arm/Scrt1.s | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
- create mode 100644 crt/arm/Scrt1.s
-
-diff --git a/crt/arm/Scrt1.s b/crt/arm/Scrt1.s
-new file mode 100644
-index 0000000..a54859a
---- /dev/null
-+++ b/crt/arm/Scrt1.s
-@@ -0,0 +1,30 @@
-+.weak _init
-+.weak _fini
-+.global _start
-+_start:
-+ mov fp,#0
-+ mov lr,#0
-+
-+ ldr a2,[sp],#4
-+ mov a3,sp
-+ str fp,[sp,#-4]!
-+ str a1,[sp,#-4]!
-+
-+ adr ip,2f
-+ ldr a4,2f+4
-+ add a4,a4,ip
-+ str a4,[sp,#-4]!
-+ ldr a4,2f+8
-+ add a4,a4,ip
-+
-+ ldr a1,2f
-+ add ip,ip,a1
-+ ldr a1,2f+12
-+ ldr a1,[ip,a1]
-+
-+ bl __libc_start_main(PLT)
-+1: b 1b
-+2: .word _GLOBAL_OFFSET_TABLE_-2b
-+ .word _fini-2b
-+ .word _init-2b
-+ .word main(GOT)
---
-1.8.3.2
-
diff --git a/main/musl/0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch b/main/musl/0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch
deleted file mode 100644
index d6260a5f9..000000000
--- a/main/musl/0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 53761b469221fbe062629c50249e3d534573eda9 Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Wed, 17 Jul 2013 13:54:41 -0400
-Subject: [PATCH 10/10] make posix_spawn (and functions that use it) use
- CLONE_VFORK flag
-
-this is both a minor scheduling optimization and a workaround for a
-difficult-to-fix bug in qemu app-level emulation.
-
-from the scheduling standpoint, it makes no sense to schedule the
-parent thread again until the child has exec'd or exited, since the
-parent will immediately block again waiting for it.
-
-on the qemu side, as regular application code running on an underlying
-libc, qemu cannot make arbitrary clone syscalls itself without
-confusing the underlying implementation. instead, it breaks them down
-into either fork-like or pthread_create-like cases. it was treating
-the code in posix_spawn as pthread_create-like, due to CLONE_VM, which
-caused horribly wrong behavior: CLONE_FILES broke the synchronization
-mechanism, CLONE_SIGHAND broke the parent's signals, and CLONE_THREAD
-caused the child's exec to end the parent -- if it hadn't already
-crashed. however, qemu special-cases CLONE_VFORK and emulates that
-with fork, even when CLONE_VM is also specified. this also gives
-incorrect semantics for code that really needs the memory sharing, but
-posix_spawn does not make use of the vm sharing except to avoid
-momentary double commit charge.
-
-programs using posix_spawn (including via popen) should now work
-correctly under qemu app-level emulation.
----
- src/process/posix_spawn.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c
-index e6a031c..68cf795 100644
---- a/src/process/posix_spawn.c
-+++ b/src/process/posix_spawn.c
-@@ -138,7 +138,8 @@ int __posix_spawnx(pid_t *restrict res, const char *restrict path,
- args.envp = envp;
- pthread_sigmask(SIG_BLOCK, SIGALL_SET, &args.oldmask);
-
-- pid = __clone(child, stack+sizeof stack, CLONE_VM|SIGCHLD, &args);
-+ pid = __clone(child, stack+sizeof stack,
-+ CLONE_VM|CLONE_VFORK|SIGCHLD, &args);
- close(args.p[1]);
-
- if (pid > 0) {
---
-1.8.3.2
-
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index 539ea8744..947801d08 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=musl
-pkgver=0.9.11
-pkgrel=4
+pkgver=0.9.12
+pkgrel=0
pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/"
arch="x86 x86_64 arm armel"
@@ -14,17 +14,6 @@ install=""
subpackages="$pkgname-dev $pkgname-utils"
[ "${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
- 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
- 0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch
-
getopt_long.c
getent
"
@@ -47,8 +36,11 @@ prepare() {
build() {
local _ldflags
cd "$_builddir"
+ # note: not autotools
LDFLAGS="$LDFLAGS -Wl,-soname,libc.musl-${CARCH}.so.1" \
- ./configure --prefix=/usr \
+ ./configure \
+ --host=$CHOST \
+ --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
@@ -85,42 +77,12 @@ crosstool() {
find "$pkgdir" -type d -delete 2>/dev/null
}
-md5sums="70b17ca5c847e74e1c77fe8284bb1fa4 musl-0.9.11.tar.gz
-cce3406fc07756f25181b71152e55865 0001-fix-Makefile-so-make-install-works-before-include-bi.patch
-5ce3afcc1cfc332bebe53355fdd00d3c 0002-add-stubs-for-additional-legacy-ether.h-functions.patch
-f0254759e89b0b000f33c8116eb1aac0 0003-add-legacy-scsi-scsi_ioctl.h-header.patch
-7c01567c09bcf3f0d530a1e5fc57b932 0004-add-legacy-sys-ttydefaults.h-header.patch
-3e5dd5906b99a7c79cd7eea0277b4310 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch
-45f147f5e49692320aec8b13b3ac66a6 0006-fix-off-by-one-array-bound-in-strsignal.patch
-902ed8d04e08b912a0ab1166756c3455 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch
-1763905f21ab6b94dfb2d6611c47a84d 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch
-980ad576c337b0bd75da128816a2e0a5 0009-add-PIE-support-for-ARM.patch
-627a5b94e86e5d0ef4ed575d5e8da229 0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch
+md5sums="100c8e932d0785c35b92539f025aa76f musl-0.9.12.tar.gz
61c6c1e84ed1df82abbe6d75e90cf21c getopt_long.c
ef81489a6258501cf45db58dfc6d5211 getent"
-sha256sums="8b81fd9b71becb7b674ea93fd65d82a039fab79ab738957a5e9ee47ba08a13fd musl-0.9.11.tar.gz
-61ed4546341484f682d70f57a9d3549d9c646f33c779adb171e31e13b7b62070 0001-fix-Makefile-so-make-install-works-before-include-bi.patch
-a49a959e48225e5aa51576ac36c8e07eb064aeb00203d5c47cb201aee1238f40 0002-add-stubs-for-additional-legacy-ether.h-functions.patch
-e74a7569444467ca705241e36f68b389826e6159fbd492c2fef843bb8128babf 0003-add-legacy-scsi-scsi_ioctl.h-header.patch
-ce53c311a2bbaedce42e5f5749f9ea63f801bf5fa65bb4d406202d9e75f4c3c0 0004-add-legacy-sys-ttydefaults.h-header.patch
-1ed281c07ac15f505d017e2034208b4b626af6604f24e53667c25690865fcd54 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch
-354d24787a00b1cd216c0505076cbbd612ed3f36804c596d969f0d628b425b9b 0006-fix-off-by-one-array-bound-in-strsignal.patch
-2d640dbedb1674cf378b4caf53e32c1fb7b8b8bc302037f7328b87049479d763 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch
-42cf78d84f6f03bfb5431a38f38b08ad752d466a63ec4197907d3ff2b6849ca7 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch
-d0c70b9806329d384752bf4d344176e5dea8a3facb0cfba9d5284d6281f52378 0009-add-PIE-support-for-ARM.patch
-7efc54e1943db188bee5398e0d709778fca6578d44a73f215cd96f18a29a6d7b 0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch
+sha256sums="72353f9e1f2fdaf5e88223dcd1cfa5555f5a364eb5e4a9967de1fd44cc4c6d3e musl-0.9.12.tar.gz
d9b644ec20bc33e81a7c52b9fcf7973d835923a69faf50f03db45534b811bd96 getopt_long.c
d6996273f5aaaed429058257e4646b243d9e3a4d8609522f802762453f5be4cb getent"
-sha512sums="7ca852eda3be7b34bfdaf1eb9e7d435987d5177f865737b211e62f4037825cc322436e1ff49c3f875b3a20679f6f21ba5ffff271d03d3d03c7a97854f4f51832 musl-0.9.11.tar.gz
-69d387f9617757cc0ac66f5c9716c8167408bb848b39011e716a388b451bf3d85fd7ea810970d2deaf42e9b77844f15decb358a78cc6ec6b403fdf0a31a4ca29 0001-fix-Makefile-so-make-install-works-before-include-bi.patch
-00a457844f49c43276efecf27f47d3e028cde7648d347b80c63c9f0ebe21baabe875ae6741490885f0d95b37103b31df59f23863d3cc0219c289db05e0ccdcb2 0002-add-stubs-for-additional-legacy-ether.h-functions.patch
-eeb67bec8c2f3c1ef83c8bd8f72825745515db1f86d3ccedd74fee2515b003bc34262504a0564f56014fdf9dff7b7b863d6fecd589e7df46f213c37ad24e7709 0003-add-legacy-scsi-scsi_ioctl.h-header.patch
-9644c0b932efbdf66b44df6565e1d3594ddcbbff77bd29459d7ee19d55e0857bcd8f3e51fc8be3d20190e22476ad2e09f53e9298466d3853d12b7297f4065463 0004-add-legacy-sys-ttydefaults.h-header.patch
-f2b148e91f7df417c4577d00760ae511200a0402075613941cbbfae778c21578f0a887fa20899334a7c69e5c6c3a54d8410af25c81275e7d42879c2cfd7c30c5 0005-add-NFDBITS-in-sys-select.h-with-appropriate-feature.patch
-e61e3483ac905b528afd421d1970e2e2f53f32cfadd4d6af6a6b00e73d861880c749234b8d1624e6048c59eb4f568ea47965bb3fb6f161ca55ab2d819403b9d6 0006-fix-off-by-one-array-bound-in-strsignal.patch
-3198cd0b8ca0e587f108f7250f45f2f10d0b6202cc7fc4b58cf89e3780a38bfe856b6be312957e27de81b02adf7a20dcf7baa36c2f5f831729f88875224ccc7c 0007-fix-invalid-library-phdr-pointers-passed-to-callback.patch
-915d0e7cdd56f369759ea314e54c29d57c012df1ff0d9459f1b0ac941320e5bf5de3e7215224075aead4b6d3a60b7e0dba7f28de75a6c477ae6bf6caf1b65d28 0008-add-some-ARM-EABI-specific-exception-handling-infras.patch
-8eb9a822a6529e5dabafc17b6013fdbb7e3b744574df230e3565637c354fe06eeb3a4576f56ef2e2d798aeaac6d2a0968823351f0ee76e6f06114f740f5ae432 0009-add-PIE-support-for-ARM.patch
-6897ed7bf575d085fda0c1270090bb44d26712c4f513ed98b4c988a3f31fc808e7fe4b760a46c329b5b3b20a20049410c0c3f0f51d780568427b3f1fc4b7df5b 0010-make-posix_spawn-and-functions-that-use-it-use-CLONE.patch
+sha512sums="6f27b523a241e3a066c5b5f7309226fa97ce32354c149a189f299b3593ead3e7552c03520478f16dcbb27a52c5fe3320a7e5672b88612d7e4594b0514399eb71 musl-0.9.12.tar.gz
140f3f20d30bd95ebce8c41b8cc7f616c6cbedf4ea06c729c21014e74f6043796825cc40ebc5180620ea38173afdba23f09ebf6d8b11fa05440b14d23764fca9 getopt_long.c
4d92f934d760cf5157d80f19fd766be6b673c65317229b32ac824d9d192f6abcc414e2382b2416dfd5c2f757b46ced98c18e4762bf91f5a48647e0ee61813b06 getent"