Author: cyrus
Date: 2015-06-20 19:37:20 +0200 (Sat, 20 Jun 2015)
New Revision: 46071

Added:
   trunk/toolchain/gcc/patches/4.8-linaro/030-always-link-ssp-noshared.patch
Modified:
   trunk/toolchain/gcc/final/Makefile
Log:
gcc: musl comes with its own SSP, so use it instead of libssp

Signed-off-by: Steven Barth <[email protected]>

Modified: trunk/toolchain/gcc/final/Makefile
===================================================================
--- trunk/toolchain/gcc/final/Makefile  2015-06-20 17:37:18 UTC (rev 46070)
+++ trunk/toolchain/gcc/final/Makefile  2015-06-20 17:37:20 UTC (rev 46071)
@@ -16,6 +16,10 @@
        --with-libelf=$(TOPDIR)/staging_dir/host
 endif
 
+ifdef CONFIG_USE_MUSL
+  GCC_MAKE += gcc_cv_libc_provides_ssp=yes
+endif
+
 ifneq ($(CONFIG_SJLJ_EXCEPTIONS),)
   GCC_CONFIGURE += \
        --enable-sjlj-exceptions

Added: trunk/toolchain/gcc/patches/4.8-linaro/030-always-link-ssp-noshared.patch
===================================================================
--- trunk/toolchain/gcc/patches/4.8-linaro/030-always-link-ssp-noshared.patch   
                        (rev 0)
+++ trunk/toolchain/gcc/patches/4.8-linaro/030-always-link-ssp-noshared.patch   
2015-06-20 17:37:20 UTC (rev 46071)
@@ -0,0 +1,11 @@
+--- gcc-4.7.4.org/gcc/gcc.c
++++ gcc-4.7.4/gcc/gcc.c
+@@ -603,7 +603,7 @@
+ 
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+-#define LINK_SSP_SPEC "%{fstack-protector:}"
++#define LINK_SSP_SPEC 
"%{fstack-protector|fstack-protector-all:-lssp_nonshared}"
+ #else
+ #define LINK_SSP_SPEC 
"%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"
+ #endif
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to