Source: gcc-7 Version: 7.2.0-18 Severity: normal Tags: patch User: debian-i...@lists.debian.org Usertags: ia64
Hi! Like with gcc-6 in #885428, we need to patch src:gcc-7 to use the internal libunwind library when cross-building for a ia64 target. The attached patch makes the necessary modifications which have been verified to work in rebootstrap. A second patch by James Clarke is necessary to modify some linker flags for building the internal libunwind. I will file a second bug report for that. 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/rules2 new/gcc-7-7.2.0/debian/rules2 --- old/gcc-7-7.2.0/debian/rules2 2017-12-27 15:47:52.000000000 +0100 +++ new/gcc-7-7.2.0/debian/rules2 2017-12-31 14:54:43.386904669 +0100 @@ -492,7 +492,9 @@ endif ifneq (,$(findstring ia64-linux,$(DEB_TARGET_GNU_TYPE))) - CONFARGS += --with-system-libunwind + ifneq ($(with_unwind),yes) + CONFARGS += --with-system-libunwind + endif endif ifneq (,$(findstring sh4-linux,$(DEB_TARGET_GNU_TYPE))) diff -Nru old/gcc-7-7.2.0/debian/rules.d/binary-libgcc.mk new/gcc-7-7.2.0/debian/rules.d/binary-libgcc.mk --- old/gcc-7-7.2.0/debian/rules.d/binary-libgcc.mk 2017-12-27 15:47:52.000000000 +0100 +++ new/gcc-7-7.2.0/debian/rules.d/binary-libgcc.mk 2017-12-31 14:54:43.386904669 +0100 @@ -290,6 +290,11 @@ $(d_l)/$(libgcc_dir$(2))/. ) + $(if $(filter yes, $(with_unwind)), + mv $(d)/$(usr_lib$(2))/libunwind.* \ + $(d_l)/$(libgcc_dir$(2))/. + ) + debian/dh_doclink -p$(p_l) $(if $(3),$(3),$(p_lbase)) debian/dh_doclink -p$(p_d) $(if $(3),$(3),$(p_lbase)) debian/dh_rmemptydirs -p$(p_l) diff -Nru old/gcc-7-7.2.0/debian/rules.defs new/gcc-7-7.2.0/debian/rules.defs --- old/gcc-7-7.2.0/debian/rules.defs 2017-12-27 15:47:52.000000000 +0100 +++ new/gcc-7-7.2.0/debian/rules.defs 2017-12-31 14:54:43.386904669 +0100 @@ -1354,6 +1354,14 @@ endif endif + # libunwind ----------------- + ifneq ($(DEB_STAGE),stage1) + with_unwind := no + ifeq ($(DEB_CROSS),yes) + with_unwind := yes + endif + endif + # Shared libgcc -------------------- ifneq ($(DEB_STAGE),stage1) with_shared_libgcc := yes