Bug#885937: gcc-7: Please add patch to strip -z,defs from linker options for internal libunwind
John Paul Adrian Glaubitz <[email protected]>
| Newsgroups | gmane.linux.debian.ports.ia64 |
|---|---|
| Message-ID | <151473272737.2981.6920955298569088740.reportbug__48404.5776924633$1514732857$gmane$org@z6.physik.fu-berlin.de> |
Source: gcc-7 Version: 7.2.0-18 Severity: normal Tags: patch User: [email protected] 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 - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
gcc-adjust-libunwind-linker-opts.diff
(text/plain, 1.2 KB)
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