From patchwork Tue Sep 4 21:27:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 966091 X-Patchwork-Delegate: koen.vandeputte@ncentric.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GIezUqBS"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="UQ9p9dJH"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 424g1T0Ch9z9sBy for ; Wed, 5 Sep 2018 07:28:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7tRw7BMNT4AYgHeC9Fb3fpdyjdgmjDs55xWsHGEaoFQ=; b=GIezUqBSDLktaQ draqNrX81kNdIN0UqSin3Mucimm300PUfkkii6WBlEMGzD5/VoTGyoWZG2MreFfSFhEzSpvPEmBNM uSSJ6YfGDK4NJW+MSaRcfgjbW/bbpr+xDdeDe2lfKVcwE1MprMpIfe8h04365QoRMvXRikhCjR1vW /4Ugcvlic6Kw1QsNxeGTWiHJvcwM9gzWJpJFS1NAgeHrKzpYJp2Mz9+QJ8z0UiIErpizIqf2GVVDS ga/bKQY37HplKQqpdSG7kybOhWHDJRFL2MQGx8MTu4YkcdiOSqzwHZmMPEnbCSn0Kc665A53SX/e6 daH18FkGBn+ynkAL4eFQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxIs3-00075g-Cm; Tue, 04 Sep 2018 21:28:23 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxIr0-0006Zm-BM for openwrt-devel@lists.openwrt.org; Tue, 04 Sep 2018 21:27:23 +0000 Received: by mail-wr1-x442.google.com with SMTP id n2-v6so5432864wrw.7 for ; Tue, 04 Sep 2018 14:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=BbbPXCXBNLTjh00eDu9AFxhnWv90iRshfrdDRD2+uqQ=; b=UQ9p9dJHgAHeDSd8ScQLHqsLCVYnvLj6zGl2t8WsTQlHI4P66ULd/34PCIq9rVCTT9 Tn8WRhVUxsuSIQZCfaFPA50TPvIJIR6T9RyXmOXaYyM3Y3NFCmu81SBjayWNyTYbyBOA 3Glk2sE2DVHhS0F38WlXcOuczpU/dvHjh58lo/PCr8gCJd1hjgGthBUM09l0uUUdYIUX BAhDV8aeY5OuvbWRa/Wx9Gf2i0xSPnB94s9FOmvd+oeILEr4TkbBEsiz76nWR+NEaAmz KAvT0YpOhi54AlgRNcoAoCI7JJh9AWu+mq0M+o2T5+UeXF3g5Xl/xq8/dIH44JsGWxJm wbnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=BbbPXCXBNLTjh00eDu9AFxhnWv90iRshfrdDRD2+uqQ=; b=cz3m1QbVoxrjnx/npn/f62Hy0ccMkkPKf15pWj+QqQnSTyKCY9THRD3Y2jP+AsJdz7 xAdJO+TlFeD15ZXGdMHiJSqn2qoV+KD8tqdrgUDV5ztDBf8wT8SQ0nH1uoMAfDKZr4Y3 D/1b5SbUKpGGGMEMVWJjCBdf3dFdzdiqUZF60+5vrOQHbpOhd6ukmaxXr7ppE324MyZM j0aNAK2xucj4D5+Ld4CH+fPlpSd2othJHqC0Bp0nWGNuizSY4dXVJaCy6oCKVVXJWqNX UUktIDMkc1GurMaLlPZ9QzpWoTiZ1PNt8LQCuBq0/zdbhM+b1gjH+ZTVNcO3LQrylh6K ggQw== X-Gm-Message-State: APzg51A2aopmK+8TxhKTJU1DkpWoWcDOJZMBYQgifE8xoJwQkp+k+QTP uymNAJJqGkOG3fuV0ewiqomcZKjW X-Google-Smtp-Source: ANB0Vdao6eTCb8i+xearxpwqL/zU3tVK1sJIXs2BjPnRvTnE09zqt60l16aFHWm/Fq1qbhb0y123Ng== X-Received: by 2002:adf:bc44:: with SMTP id a4-v6mr25124247wrh.255.1536096425102; Tue, 04 Sep 2018 14:27:05 -0700 (PDT) Received: from debian64.daheim (p200300D5FBC5BCFCD63D7EFFFEBDE96E.dip0.t-ipconnect.de. [2003:d5:fbc5:bcfc:d63d:7eff:febd:e96e]) by smtp.gmail.com with ESMTPSA id z184-v6sm17651373wmz.0.2018.09.04.14.27.04 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Sep 2018 14:27:04 -0700 (PDT) Received: from chuck by debian64.daheim with local (Exim 4.91) (envelope-from ) id 1fxIqk-0002Bk-Bl for openwrt-devel@lists.openwrt.org; Tue, 04 Sep 2018 23:27:02 +0200 From: Christian Lamparter To: openwrt-devel@lists.openwrt.org Date: Tue, 4 Sep 2018 23:27:00 +0200 Message-Id: X-Mailer: git-send-email 2.19.0.rc1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180904_142718_466959_ED62D0C3 X-CRM114-Status: GOOD ( 14.16 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (chunkeey[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 1/3] toolchain/musl: update to version 1.1.20 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Rich Felker finally tagged musl 1.1.20 release: "This release introduces the ability to replace/interpose the allocator (malloc) subject to certain restrictions, adds an experimental m68k port, and makes notable improvements to stdio (application-provided buffers), getaddrinfo (AI_ADDRCONFIG, support for IPv4-only kernel configurations), the dynamic linker (safety against dlopen of libraries using initial-exec TLS model, reclaiming unused memory on FDPIC archs, better dladdr results), and handling of default thread stack size (pthread_setattr_default_np now works more reliably). Many bugs have been fixed, including potentially dangerous regressions in iconv (only for new conversions to legacy encodings) and visibly incorrect behavior in printf on non-x86 archs (%a format with precision specifier), in getopt_long_only when short options are a prefix for a long option, in complex arc-trig/hyperbolic functions, in strftime and mktime (timezone-specific issues), and numerous less-obvious places. https://www.musl-libc.org/releases/musl-1.1.20.tar.gz https://www.musl-libc.org/releases/musl-1.1.20.tar.gz.asc Special thanks to musl's release sponsors (patreon.com/musl): * The Midipix Project (midipix.org) * Hurricane Labs (hurricanelabs.com) * Neal Gompa * Les Aker * Justin Cormack " Signed-off-by: Christian Lamparter Tested-by: Koen Vandeputte --- Would be nice to hear from testers. --- toolchain/musl/common.mk | 6 +- ...ocket.h-fix-SO_PEERSEC-value-on-MIPS.patch | 59 ------------------- .../patches/200-add_libssp_nonshared.patch | 39 ++++++------ toolchain/musl/patches/300-relative.patch | 2 +- ...ribute-to-some-function-declarations.patch | 8 +-- .../musl/patches/900-iconv_size_hack.patch | 6 +- 6 files changed, 32 insertions(+), 88 deletions(-) delete mode 100644 toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk index 87424646c3..883084b7b1 100644 --- a/toolchain/musl/common.mk +++ b/toolchain/musl/common.mk @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=musl -PKG_VERSION:=1.1.19 +PKG_VERSION:=1.1.20 PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=55df09bfccbfe21fc9dd7d8f94550c0ff25ace04 -PKG_MIRROR_HASH:=eb94e4e7e94221dd8890afd9b29e2562c36cf5585649035349ca1c6c1c354f2b +PKG_SOURCE_VERSION:=0fa1e638e87cf257e9f96b4019b2076afd674a19 +PKG_MIRROR_HASH:=0a49559e845f51aaf006539176a36d6527957affd2838e71fd43275b737e90fe PKG_SOURCE_URL:=git://git.musl-libc.org/musl PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz diff --git a/toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch b/toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch deleted file mode 100644 index 2319d9cb68..0000000000 --- a/toolchain/musl/patches/010-sys-socket.h-fix-SO_PEERSEC-value-on-MIPS.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 4e0877a604bad684be020f68e96a05156131fd44 Mon Sep 17 00:00:00 2001 -From: Matthias Schiffer -Date: Sun, 24 Jun 2018 17:05:31 +0200 -Subject: [PATCH] sys/socket.h: fix SO_PEERSEC value on MIPS - -Differing from all other archs supported by musl, MIPS defines SO_PEERSEC -to 30 instead of 31. - -Reported-by: Andrey Jr. Mlenikov ---- - arch/mips/bits/socket.h | 2 ++ - arch/mips64/bits/socket.h | 2 ++ - arch/mipsn32/bits/socket.h | 2 ++ - include/sys/socket.h | 3 +++ - 4 files changed, 9 insertions(+) - ---- a/arch/mips/bits/socket.h -+++ b/arch/mips/bits/socket.h -@@ -48,5 +48,7 @@ struct cmsghdr { - #define SO_SNDBUFFORCE 31 - #define SO_RCVBUFFORCE 33 - -+#define SO_PEERSEC 30 -+ - #define SOCK_NONBLOCK 0200 - #define SOCK_CLOEXEC 02000000 ---- a/arch/mips64/bits/socket.h -+++ b/arch/mips64/bits/socket.h -@@ -64,5 +64,7 @@ struct cmsghdr { - #define SO_SNDBUFFORCE 31 - #define SO_RCVBUFFORCE 33 - -+#define SO_PEERSEC 30 -+ - #define SOCK_NONBLOCK 0200 - #define SOCK_CLOEXEC 02000000 ---- a/arch/mipsn32/bits/socket.h -+++ b/arch/mipsn32/bits/socket.h -@@ -48,5 +48,7 @@ struct cmsghdr { - #define SO_SNDBUFFORCE 31 - #define SO_RCVBUFFORCE 33 - -+#define SO_PEERSEC 30 -+ - #define SOCK_NONBLOCK 0200 - #define SOCK_CLOEXEC 02000000 ---- a/include/sys/socket.h -+++ b/include/sys/socket.h -@@ -201,7 +201,10 @@ struct linger { - #define SO_TIMESTAMP 29 - #define SCM_TIMESTAMP SO_TIMESTAMP - -+#ifndef SO_PEERSEC - #define SO_PEERSEC 31 -+#endif -+ - #define SO_PASSSEC 34 - #define SO_TIMESTAMPNS 35 - #define SCM_TIMESTAMPNS SO_TIMESTAMPNS diff --git a/toolchain/musl/patches/200-add_libssp_nonshared.patch b/toolchain/musl/patches/200-add_libssp_nonshared.patch index 7a2909461b..b8fa7b4b4f 100644 --- a/toolchain/musl/patches/200-add_libssp_nonshared.patch +++ b/toolchain/musl/patches/200-add_libssp_nonshared.patch @@ -4,11 +4,6 @@ Date: Mon, 22 Jun 2015 11:01:56 +0200 Subject: [PATCH] Add libssp_nonshared.a so GCC's is not needed Signed-off-by: Steven Barth ---- - Makefile | 10 ++++++++-- - libssp_nonshared/__stack_chk_fail_local.c | 2 ++ - 2 files changed, 10 insertions(+), 2 deletions(-) - create mode 100644 libssp_nonshared/__stack_chk_fail_local.c --- a/Makefile +++ b/Makefile @@ -21,21 +16,29 @@ Signed-off-by: Steven Barth ALL_TOOLS = obj/musl-gcc WRAPCC_GCC = gcc -@@ -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 \ -- ldso/dlstart.c ldso/dynlink.c -+ ldso/dlstart.c ldso/dynlink.c \ -+ src/libssp_nonshared/__stack_chk_fail_local.c - $(NOSSP_SRCS:%.c=obj/%.o) $(NOSSP_SRCS:%.c=obj/%.lo): CFLAGS_ALL += $(CFLAGS_NOSSP) - - $(CRT_OBJS): CFLAGS_ALL += -DCRT -@@ -168,6 +169,11 @@ lib/libc.a: $(AOBJS) +@@ -86,7 +86,7 @@ else + + all: $(ALL_LIBS) $(ALL_TOOLS) + +-OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include) ++OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include obj/libssp_nonshared) + + $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) $(GENH_INT): | $(OBJ_DIRS) + +@@ -113,6 +113,8 @@ obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart. + + obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC + ++obj/libssp_nonshared/__stack_chk_fail_local.o: CFLAGS_ALL += $(CFLAGS_NOSSP) ++ + OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%)) + $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3 + +@@ -165,6 +166,11 @@ lib/libc.a: $(AOBJS) $(AR) rc $@ $(AOBJS) $(RANLIB) $@ -+lib/libssp_nonshared.a: obj/src/libssp_nonshared/__stack_chk_fail_local.o ++lib/libssp_nonshared.a: obj/libssp_nonshared/__stack_chk_fail_local.o + rm -f $@ + $(AR) rc $@ $< + $(RANLIB) $@ @@ -44,7 +47,7 @@ Signed-off-by: Steven Barth rm -f $@ $(AR) rc $@ --- /dev/null -+++ b/src/libssp_nonshared/__stack_chk_fail_local.c ++++ b/libssp_nonshared/__stack_chk_fail_local.c @@ -0,0 +1,2 @@ +#include "atomic.h" +void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { a_crash(); } diff --git a/toolchain/musl/patches/300-relative.patch b/toolchain/musl/patches/300-relative.patch index 7e1eb7d6bc..e34e60a09d 100644 --- a/toolchain/musl/patches/300-relative.patch +++ b/toolchain/musl/patches/300-relative.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -217,7 +217,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc +@@ -215,7 +215,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc $(INSTALL) -D -m 644 $< $@ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so diff --git a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch index 915b0b7b47..f7eff9141f 100644 --- a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch +++ b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch @@ -102,7 +102,7 @@ Signed-off-by: Hauke Mehrtens #ifdef __cplusplus #define NULL 0L #else -@@ -102,19 +110,19 @@ int puts(const char *); +@@ -103,19 +111,19 @@ int puts(const char *); int printf(const char *__restrict, ...); int fprintf(FILE *__restrict, const char *__restrict, ...); int sprintf(char *__restrict, const char *__restrict, ...); @@ -127,7 +127,7 @@ Signed-off-by: Hauke Mehrtens void perror(const char *); -@@ -135,8 +143,8 @@ int pclose(FILE *); +@@ -136,8 +144,8 @@ int pclose(FILE *); int fileno(FILE *); int fseeko(FILE *, off_t, int); off_t ftello(FILE *); @@ -138,7 +138,7 @@ Signed-off-by: Hauke Mehrtens void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); -@@ -175,8 +183,8 @@ int fileno_unlocked(FILE *); +@@ -176,8 +184,8 @@ int fileno_unlocked(FILE *); int getw(FILE *); int putw(int, FILE *); char *fgetln(FILE *, size_t *); @@ -149,7 +149,7 @@ Signed-off-by: Hauke Mehrtens #endif #ifdef _GNU_SOURCE -@@ -198,6 +206,9 @@ typedef struct _IO_cookie_io_functions_t +@@ -199,6 +207,9 @@ typedef struct _IO_cookie_io_functions_t FILE *fopencookie(void *, const char *, cookie_io_functions_t); #endif diff --git a/toolchain/musl/patches/900-iconv_size_hack.patch b/toolchain/musl/patches/900-iconv_size_hack.patch index 6200262b1d..461a204a4c 100644 --- a/toolchain/musl/patches/900-iconv_size_hack.patch +++ b/toolchain/musl/patches/900-iconv_size_hack.patch @@ -56,7 +56,7 @@ case SHIFT_JIS: if (c < 128) break; if (c-0xa1 <= 0xdf-0xa1) { -@@ -510,6 +517,7 @@ size_t iconv(iconv_t cd, char **restrict +@@ -518,6 +525,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); -@@ -550,6 +558,7 @@ size_t iconv(iconv_t cd, char **restrict +@@ -559,6 +567,7 @@ size_t iconv(iconv_t cd, char **restrict } } goto subst; @@ -72,7 +72,7 @@ case SHIFT_JIS: if (c < 128) goto revout; if (c == 0xa5) { -@@ -623,6 +632,7 @@ size_t iconv(iconv_t cd, char **restrict +@@ -632,6 +641,7 @@ size_t iconv(iconv_t cd, char **restrict *(*out)++ = 'B'; *outb -= 8; break;