[source] libunwind: disable building with ssp

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:45:26 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/cd901ef1a60437de6ceac5da07f53a10046096e1

commit cd901ef1a60437de6ceac5da07f53a10046096e1
Author: Yousong Zhou <yszhou4tech at gmail.com>
AuthorDate: Mon Nov 6 10:43:25 2017 +0800

    libunwind: disable building with ssp
    
    If we enable -fstack-protector while building libunwind, function
    __stack_chk_fail_local will be referred to for i386 and powerpc32
    arches.  This will cause link failure because the default gcc build
    specs says no link_ssp if -nostdlib is given.
    
    The error message:
    
        OpenWrt-libtool: link: ccache_cc -shared  -fPIC -DPIC  .libs/os-linux.o mi/.libs/init.o mi/.libs/flush_cache.o mi/.libs/mempool.o mi/.libs/strerror.o x86/.libs/is_fpreg.o x86/.libs/regname.o x86/.libs/Los-linux.o mi/.libs/backtrace.o mi/.libs/dyn-cancel.o mi/.libs/dyn-info-list.o mi/.libs/dyn-register.o mi/.libs/Ldyn-extract.o mi/.libs/Lfind_dynamic_proc_info.o mi/.libs/Lget_accessors.o mi/.libs/Lget_proc_info_by_ip.o mi/.libs/Lget_proc_name.o mi/.libs/Lput_dynamic_unwind_info.o m [...]
        .libs/os-linux.o: In function `_Ux86_get_elf_image':
        os-linux.c:(.text+0x588): undefined reference to `__stack_chk_fail_local'
        x86/.libs/Lregs.o: In function `_ULx86_access_fpreg':
        Lregs.c:(.text+0x25b): undefined reference to `__stack_chk_fail_local'
        x86/.libs/Lresume.o: In function `_ULx86_resume':
        Lresume.c:(.text+0xdc): undefined reference to `__stack_chk_fail_local'
        collect2: error: ld returned 1 exit status
        Makefile:2249: recipe for target 'libunwind.la' failed
    
    The snippet from gcc -dumpspecs
    
        %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}
    
    Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
    (cherry picked from commit f0c37f6ceb10a1db0193d4270c6807c0b2f7a3a0)
---
 package/libs/libunwind/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile
index 913d616..44f1ef2 100644
--- a/package/libs/libunwind/Makefile
+++ b/package/libs/libunwind/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libunwind
 PKG_VERSION:=1.2.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
@@ -23,6 +23,7 @@ PKG_LICENSE_FILES:=LICENSE
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech at gmail.com>
 
+PKG_SSP:=0
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libunwind



More information about the lede-commits mailing list