aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/musl/patches/200-add_libssp_nonshared.patch
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2018-09-04 23:27:00 +0200
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2018-09-21 13:25:08 +0200
commit1801e60390706abc0ffe6376c5d9441ca10253c6 (patch)
treeec75e6739055a5e60ad7726bd9739652c410c3cc /toolchain/musl/patches/200-add_libssp_nonshared.patch
parent0dbdb476f3d4b21e6a3b95b596b56bf8f9bae948 (diff)
downloadupstream-1801e60390706abc0ffe6376c5d9441ca10253c6.tar.gz
upstream-1801e60390706abc0ffe6376c5d9441ca10253c6.tar.bz2
upstream-1801e60390706abc0ffe6376c5d9441ca10253c6.zip
toolchain/musl: update to version 1.1.20
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. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [altered commit msg a bit keeping it tight] Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'toolchain/musl/patches/200-add_libssp_nonshared.patch')
-rw-r--r--toolchain/musl/patches/200-add_libssp_nonshared.patch39
1 files changed, 21 insertions, 18 deletions
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 <steven@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
@@ -21,21 +16,29 @@ Signed-off-by: Steven Barth <steven@midlink.org>
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 <steven@midlink.org>
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(); }