[LEDE-DEV] [RFT] musl: 1.1.20 prelease testing in OpenWrt

Christian Lamparter chunkeey at gmail.com
Wed Apr 25 08:45:21 PDT 2018


Rich Felker requested field testing of what will become musl 1.1.20:
<http://www.openwall.com/lists/musl/2018/04/18/3>

"The biggest areas that need testing are:

- stdio locking after commits c21f750727515602a9e84f2a190ee8a0a2aeb2a1
  and c1014a812c90bab3c9c989863e4ebb129e987de6.

- reclaim_gaps since commit ce7ae11acfd9db8eb92cc6823c132e1825918d92.
  this could be tested by abusing __malloc_donate as if it were a
  public api.

- malloc interposition -- seeing if replacement allocators actually
  work. (not so important since it wouldn't be a regression if it's
  broken, but would be nice to know it works before announcing)"

200-add_libssp_nonshared.patch was removed since Rich reworked
the logic in c7bb9c41d2e62b7ad1c7858d4d0f2873642e634b
"adjust makefile target-specific CFLAGS rules to be more robust & complete"
and a7c53e0c2cd8fc45eac90c0468e44697019ceda6
"fix out-of-tree build of crt files with stack protector enabled"
so please test.

Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 toolchain/musl/common.mk                      |  4 +-
 .../patches/200-add_libssp_nonshared.patch    | 50 -------------------
 toolchain/musl/patches/300-relative.patch     |  2 +-
 ...ribute-to-some-function-declarations.patch |  8 +--
 4 files changed, 7 insertions(+), 57 deletions(-)
 delete mode 100644 toolchain/musl/patches/200-add_libssp_nonshared.patch

diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 87424646c3..a8abe8af69 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -13,8 +13,8 @@ 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:=b4b1e10364c8737a632be61582e05a8d3acf5690
+PKG_MIRROR_HASH:=1b0530313811897fee5ab22c6d6c7c8cbb6568736dcf09dea6e4d023350c9ecd
 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/200-add_libssp_nonshared.patch b/toolchain/musl/patches/200-add_libssp_nonshared.patch
deleted file mode 100644
index 7a2909461b..0000000000
--- a/toolchain/musl/patches/200-add_libssp_nonshared.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 7ec87fbbc3cac99b4173d082dd6195f47c9a32e7 Mon Sep 17 00:00:00 2001
-From: Steven Barth <steven at midlink.org>
-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 <steven at midlink.org>
----
- 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
-@@ -66,7 +66,7 @@ CRT_LIBS = $(addprefix lib/,$(notdir $(C
- STATIC_LIBS = lib/libc.a
- SHARED_LIBS = lib/libc.so
- TOOL_LIBS = lib/musl-gcc.specs
--ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS)
-+ALL_LIBS = $(CRT_LIBS) $(STATIC_LIBS) $(SHARED_LIBS) $(EMPTY_LIBS) $(TOOL_LIBS) lib/libssp_nonshared.a
- 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)
- 	$(AR) rc $@ $(AOBJS)
- 	$(RANLIB) $@
- 
-+lib/libssp_nonshared.a: obj/src/libssp_nonshared/__stack_chk_fail_local.o
-+	rm -f $@
-+	$(AR) rc $@ $<
-+	$(RANLIB) $@
-+
- $(EMPTY_LIBS):
- 	rm -f $@
- 	$(AR) rc $@
---- /dev/null
-+++ b/src/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..e76867bb66 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
+@@ -208,7 +208,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 <hauke at hauke-m.de>
  #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 <hauke at hauke-m.de>
  
  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 <hauke at hauke-m.de>
  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 <hauke at hauke-m.de>
  #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
  
-- 
2.17.0




More information about the Lede-dev mailing list