mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 06:08:08 +00:00
musl: update to version 1.1.19
This updates musl from a commit between 1.1.18 and 1.1.19 to the final release of the version 1.1.19. This mostly fixes bugs in musl. The size of the uncompressed binary is increased by about 4 KB. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
9306bdf31c
commit
87606e25af
@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
PKG_NAME:=musl
|
||||
PKG_VERSION:=1.1.18
|
||||
PKG_RELEASE=2
|
||||
PKG_VERSION:=1.1.19
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=72656157f54c47277b01ec85a6ba7c4084fea6c8
|
||||
PKG_MIRROR_HASH:=a3d857c23c94aa96a4ad5f442aaf236e5a189a717273c4e4faf425988d98cd32
|
||||
PKG_SOURCE_VERSION:=55df09bfccbfe21fc9dd7d8f94550c0ff25ace04
|
||||
PKG_MIRROR_HASH:=eb94e4e7e94221dd8890afd9b29e2562c36cf5585649035349ca1c6c1c354f2b
|
||||
PKG_SOURCE_URL:=git://git.musl-libc.org/musl
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 8e85d2c268000b51cc690f3a55a820d8f8a6c0bc Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Thu, 22 Jun 2017 22:04:28 +0200
|
||||
Subject: [PATCH] Add additional uapi guards for Linux kernel header files
|
||||
|
||||
With Linux kernel 4.15 it will be possible to guard more parts of the
|
||||
Linux header files from a libc. Make use of this in musl to guard all
|
||||
the structures and other definitions from the Linux header files which
|
||||
are also defined by the header files provided by musl. This will make
|
||||
musl compile with the unmodified Linux kernel user space headers.
|
||||
|
||||
This extends the definitions done in commit 04983f227238 ("make
|
||||
netinet/in.h suppress clashing definitions from kernel headers")
|
||||
|
||||
The needed patches were recently accepted for Linux 4.15:
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c0bace798436bca0fdc221ff61143f1376a9c3de
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6926e041a8920c8ec27e4e155efa760aa01551fd
|
||||
---
|
||||
include/net/if.h | 7 +++++++
|
||||
include/netinet/if_ether.h | 1 +
|
||||
include/sys/xattr.h | 2 ++
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
--- a/include/net/if.h
|
||||
+++ b/include/net/if.h
|
||||
@@ -125,6 +125,13 @@ struct ifconf {
|
||||
#define ifc_req ifc_ifcu.ifcu_req
|
||||
#define _IOT_ifconf _IOT(_IOTS(struct ifconf),1,0,0,0,0)
|
||||
|
||||
+#define __UAPI_DEF_IF_IFCONF 0
|
||||
+#define __UAPI_DEF_IF_IFMAP 0
|
||||
+#define __UAPI_DEF_IF_IFNAMSIZ 0
|
||||
+#define __UAPI_DEF_IF_IFREQ 0
|
||||
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0
|
||||
+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
|
||||
+
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
--- a/include/netinet/if_ether.h
|
||||
+++ b/include/netinet/if_ether.h
|
||||
@@ -133,5 +133,6 @@ do { \
|
||||
(enaddr)[5] = ((uint8_t *)ipaddr)[3]; \
|
||||
} while(0)
|
||||
|
||||
+#define __UAPI_DEF_ETHHDR 0
|
||||
|
||||
#endif
|
||||
--- a/include/sys/xattr.h
|
||||
+++ b/include/sys/xattr.h
|
||||
@@ -24,6 +24,8 @@ int removexattr(const char *, const char
|
||||
int lremovexattr(const char *, const char *);
|
||||
int fremovexattr(int, const char *);
|
||||
|
||||
+#define __UAPI_DEF_XATTR 0
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,5 +24,5 @@
|
||||
+ }
|
||||
+
|
||||
if (!s) s = "/etc/localtime";
|
||||
if (!*s) s = __gmt;
|
||||
if (!*s) s = __utc;
|
||||
|
||||
|
@ -21,7 +21,7 @@ Signed-off-by: Steven Barth <steven@midlink.org>
|
||||
ALL_TOOLS = obj/musl-gcc
|
||||
|
||||
WRAPCC_GCC = gcc
|
||||
@@ -129,7 +129,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \
|
||||
@@ -125,7 +125,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \
|
||||
src/thread/__set_thread_area.c src/thread/$(ARCH)/__set_thread_area.c \
|
||||
src/string/memset.c src/string/$(ARCH)/memset.c \
|
||||
src/string/memcpy.c src/string/$(ARCH)/memcpy.c \
|
||||
@ -31,7 +31,7 @@ Signed-off-by: Steven Barth <steven@midlink.org>
|
||||
$(NOSSP_SRCS:%.c=obj/%.o) $(NOSSP_SRCS:%.c=obj/%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP)
|
||||
|
||||
$(CRT_OBJS): CFLAGS_ALL += -DCRT
|
||||
@@ -172,6 +173,11 @@ lib/libc.a: $(AOBJS)
|
||||
@@ -168,6 +169,11 @@ lib/libc.a: $(AOBJS)
|
||||
$(AR) rc $@ $(AOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -221,7 +221,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc
|
||||
@@ -217,7 +217,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc
|
||||
$(INSTALL) -D -m 644 $< $@
|
||||
|
||||
$(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
|
||||
|
@ -149,8 +149,8 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
#endif
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
@@ -184,6 +192,9 @@ char *fgets_unlocked(char *, int, FILE *
|
||||
int fputs_unlocked(const char *, FILE *);
|
||||
@@ -198,6 +206,9 @@ typedef struct _IO_cookie_io_functions_t
|
||||
FILE *fopencookie(void *, const char *, cookie_io_functions_t);
|
||||
#endif
|
||||
|
||||
+#undef __fp
|
||||
|
@ -1,14 +1,14 @@
|
||||
--- a/src/locale/iconv.c
|
||||
+++ b/src/locale/iconv.c
|
||||
@@ -42,6 +42,7 @@ static const unsigned char charmaps[] =
|
||||
"ucs4\0ucs4be\0utf32\0utf32be\0\0\300"
|
||||
"ucs4le\0utf32le\0\0\303"
|
||||
"ascii\0usascii\0iso646\0iso646us\0\0\307"
|
||||
@@ -48,6 +48,7 @@ static const unsigned char charmaps[] =
|
||||
"utf16\0\0\312"
|
||||
"ucs4\0utf32\0\0\313"
|
||||
"ucs2\0\0\314"
|
||||
+#ifdef FULL_ICONV
|
||||
"eucjp\0\0\320"
|
||||
"shiftjis\0sjis\0\0\321"
|
||||
"iso2022jp\0\0\322"
|
||||
@@ -50,6 +51,7 @@ static const unsigned char charmaps[] =
|
||||
@@ -56,6 +57,7 @@ static const unsigned char charmaps[] =
|
||||
"gb2312\0\0\332"
|
||||
"big5\0bigfive\0cp950\0big5hkscs\0\0\340"
|
||||
"euckr\0ksc5601\0ksx1001\0cp949\0\0\350"
|
||||
@ -16,7 +16,7 @@
|
||||
#include "codepages.h"
|
||||
;
|
||||
|
||||
@@ -60,6 +62,7 @@ static const unsigned short legacy_chars
|
||||
@@ -66,6 +68,7 @@ static const unsigned short legacy_chars
|
||||
#include "legacychars.h"
|
||||
};
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
static const unsigned short jis0208[84][94] = {
|
||||
#include "jis0208.h"
|
||||
};
|
||||
@@ -79,6 +82,7 @@ static const unsigned short hkscs[] = {
|
||||
@@ -85,6 +88,7 @@ static const unsigned short hkscs[] = {
|
||||
static const unsigned short ksc[93][94] = {
|
||||
#include "ksc.h"
|
||||
};
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
static const unsigned short rev_jis[] = {
|
||||
#include "revjis.h"
|
||||
@@ -196,6 +200,7 @@ static unsigned legacy_map(const unsigne
|
||||
@@ -205,6 +209,7 @@ static unsigned legacy_map(const unsigne
|
||||
return x < 256 ? x : legacy_chars[x-256];
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
static unsigned uni_to_jis(unsigned c)
|
||||
{
|
||||
unsigned nel = sizeof rev_jis / sizeof *rev_jis;
|
||||
@@ -214,6 +219,7 @@ static unsigned uni_to_jis(unsigned c)
|
||||
@@ -223,6 +228,7 @@ static unsigned uni_to_jis(unsigned c)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -48,15 +48,15 @@
|
||||
|
||||
size_t iconv(iconv_t cd, char **restrict in, size_t *restrict inb, char **restrict out, size_t *restrict outb)
|
||||
{
|
||||
@@ -285,6 +291,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
c = ((c-0xd7c0)<<10) + (d-0xdc00);
|
||||
@@ -319,6 +325,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
}
|
||||
break;
|
||||
type = scd->state;
|
||||
continue;
|
||||
+#ifdef FULL_ICONV
|
||||
case SHIFT_JIS:
|
||||
if (c < 128) break;
|
||||
if (c-0xa1 <= 0xdf-0xa1) {
|
||||
@@ -476,6 +483,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
@@ -510,6 +517,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
c = ksc[c][d];
|
||||
if (!c) goto ilseq;
|
||||
break;
|
||||
@ -64,7 +64,7 @@
|
||||
default:
|
||||
if (!c) break;
|
||||
c = legacy_map(map, c);
|
||||
@@ -516,6 +524,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
@@ -550,6 +558,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
}
|
||||
}
|
||||
goto subst;
|
||||
@ -72,14 +72,14 @@
|
||||
case SHIFT_JIS:
|
||||
if (c < 128) goto revout;
|
||||
if (c == 0xa5) {
|
||||
@@ -589,6 +598,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
@@ -623,6 +632,7 @@ size_t iconv(iconv_t cd, char **restrict
|
||||
*(*out)++ = 'B';
|
||||
*outb -= 8;
|
||||
break;
|
||||
+#endif
|
||||
case UCS2:
|
||||
totype = UCS2BE;
|
||||
case UCS2BE:
|
||||
case UCS2LE:
|
||||
case UTF_16BE:
|
||||
--- a/src/locale/codepages.h
|
||||
+++ b/src/locale/codepages.h
|
||||
@@ -129,6 +129,7 @@
|
||||
|
Loading…
Reference in New Issue
Block a user