Source: gcc-7
Version: 7.2.0-18
Severity: normal
Tags: patch
User: debian-i...@lists.debian.org
Usertags: ia64

Hi!

As a follow-up for #885931 which enables gcc's internal libunwind
when cross-building gcc for ia64, we need this additional patch
by James Clarke which strips "-z,defs" from the linker options
for libunwind.

Without these options removed, linking against libunwind.so will
fail in later stages of rebootstrap. James Clarke will be able
to add more details if necessary.

Attaching a patch which adds the patch to debian/patches and
enables it in debian/rules.patch.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
diff -Nru old/gcc-7-7.2.0/debian/patches/t-libunwind-elf-Wl-z-defs.diff 
new/gcc-7-7.2.0/debian/patches/t-libunwind-elf-Wl-z-defs.diff
--- old/gcc-7-7.2.0/debian/patches/t-libunwind-elf-Wl-z-defs.diff       
1970-01-01 01:00:00.000000000 +0100
+++ new/gcc-7-7.2.0/debian/patches/t-libunwind-elf-Wl-z-defs.diff       
2017-12-31 15:51:00.191817965 +0100
@@ -0,0 +1,11 @@
+--- a/src/libgcc/config/t-libunwind-elf
++++ b/src/libgcc/config/t-libunwind-elf
+@@ -31,7 +31,7 @@
+ 
+ SHLIBUNWIND_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared \
+       -nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \
+-      -Wl,-z,text -Wl,-z,defs -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \
++      -Wl,-z,text -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \
+       @multilib_flags@ $(SHLIB_OBJS) -lc && \
+       rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+       if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \
diff -Nru old/gcc-7-7.2.0/debian/rules.patch new/gcc-7-7.2.0/debian/rules.patch
--- old/gcc-7-7.2.0/debian/rules.patch  2017-12-27 15:47:52.000000000 +0100
+++ new/gcc-7-7.2.0/debian/rules.patch  2017-12-31 15:51:00.191817965 +0100
@@ -207,6 +207,7 @@
 debian_patches += \
        sys-auxv-header \
        libcilkrts-targets \
+       t-libunwind-elf-Wl-z-defs \
 
 ifeq ($(with_ibm_branch),yes)
   debian_patches += ibm-branch

Reply via email to