[gcc-6] 14/401: * Fix cross-building without having the common cross libraries installed.
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:47:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.
commit 3cf461cd7a954a1d5f41a90ccf1b2491606a0840
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Sun Dec 13 11:47:56 2015 +0000
* Fix cross-building without having the common cross libraries installed.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8502 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/changelog | 1 +
debian/rules.d/binary-go.mk | 3 ++-
debian/rules.d/binary-libstdcxx.mk | 9 ++++++---
debian/rules.defs | 4 +++-
debian/rules2 | 17 +++++++++++++++--
5 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index aaae678..05b86cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
gcc-6 (6-20151211-2) UNRELEASED; urgency=medium
* Update the ada-kfreebsd patch.
+ * Fix cross-building without having the common cross libraries installed.
-- Matthias Klose <doko at debian.org> Sun, 13 Dec 2015 12:20:23 +0100
diff --git a/debian/rules.d/binary-go.mk b/debian/rules.d/binary-go.mk
index db83ed2..d2fb769 100644
--- a/debian/rules.d/binary-go.mk
+++ b/debian/rules.d/binary-go.mk
@@ -127,7 +127,8 @@ define __do_gccgo
$(call shlibdirs_to_search, \
$(subst go$(GO_SONAME),gcc$(GCC_SONAME),$(p_l)) \
$(subst go$(GO_SONAME),atomic$(ATOMIC_SONAME),$(p_l)) \
- ,$(2))
+ ,$(2)) \
+ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2))
$(call cross_mangle_substvars,$(p_l))
echo $(p_l) $(p_d) >> debian/$(lib_binaries)
diff --git a/debian/rules.d/binary-libstdcxx.mk b/debian/rules.d/binary-libstdcxx.mk
index f744010..d220b9d 100644
--- a/debian/rules.d/binary-libstdcxx.mk
+++ b/debian/rules.d/binary-libstdcxx.mk
@@ -217,7 +217,8 @@ define __do_libstdcxx
$(call cross_mangle_shlibs,$(p_l))
$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_l) \
- $(call shlibdirs_to_search,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2))
+ $(call shlibdirs_to_search,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l)),$(2)) \
+ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2))
$(call cross_mangle_substvars,$(p_l))
echo $(p_l) >> debian/$(lib_binaries)
@@ -253,7 +254,8 @@ define __do_libstdcxx_dbg
)
$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_d) \
- $(call shlibdirs_to_search,$(subst $(pkg_ver),,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l))),$(2))
+ $(call shlibdirs_to_search,$(subst $(pkg_ver),,$(subst stdc++$(CXX_SONAME),gcc$(GCC_SONAME),$(p_l))),$(2)) \
+ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2))
$(call cross_mangle_substvars,$(p_d))
debian/dh_doclink -p$(p_d) $(p_lbase)
@@ -448,7 +450,8 @@ ifeq ($(with_cxxdev),yes)
endif
$(ignshld)DIRNAME=$(subst n,,$(2)) $(cross_shlibdeps) dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) \
- $(call shlibdirs_to_search,,)
+ $(call shlibdirs_to_search,,) \
+ $(if $(filter yes, $(with_common_libs)),,-- -Ldebian/shlibs.common$(2))
$(call cross_mangle_substvars,$(p_dbg))
echo $(p_dev) $(p_pic) $(p_dbg) >> debian/$(lib_binaries)
diff --git a/debian/rules.defs b/debian/rules.defs
index 1add714..360b75d 100644
--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -2007,5 +2007,7 @@ _shlibdirs = \
$(with_build_sysroot)$(subst /usr,,/$(usr_lib$(2))) \
$(with_build_sysroot)/$(usr_lib$(2)) \
$(if $(filter yes,$(biarchsf) $(biarchhf)), \
- $(with_build_sysroot)/usr/$(call mlib_to_march,$(2))/lib)
+ $(with_build_sysroot)/usr/$(call mlib_to_march,$(2))/lib) \
+ $(if $(filter yes, $(with_common_libs)),, \
+ $(CURDIR)/$(d)/usr/$(call mlib_to_march,$(2))/lib$(2))
shlibdirs_to_search = -l$(subst $(SPACE),:,$(foreach d,$(_shlibdirs),$(d)))
diff --git a/debian/rules2 b/debian/rules2
index 7a58616..6c98e3f 100644
--- a/debian/rules2
+++ b/debian/rules2
@@ -1761,7 +1761,7 @@ clean: debian/control
rm -f debian/lib*{atomic$(ATOMIC_SONAME),cilkrts$(CILKRTS_SONAME),gfortran$(FORTRAN_SONAME),gomp$(GOMP_SONAME),itm$(ITM_SONAME),mpx$(MPX_SONAME),quadmath$(QMATH_SONAME)}.symbols
find debian -maxdepth 1 -name '*-cross.symbols' -type l | xargs -r rm -f
rm -f debian/gcc-{XX,ar,nm,ranlib}-$(BASE_VERSION).1
- rm -f debian/shlibs.local debian/substvars.local
+ rm -f debian/shlibs.local debian/shlibs.common* debian/substvars.local
rm -f debian/*.debhelper
-[ -d debian/bugs ] && $(MAKE) -C debian/bugs clean
rm -f debian/README.libstdc++-baseline debian/README.Bugs debian/README.Debian.$(DEB_TARGET_ARCH)
@@ -2300,7 +2300,20 @@ endif
chmod 755 debian/dh_*
-# tar cf tmp.tar debian/tmp
+ifneq ($(with_common_libs),yes)
+# for native builds, the default ml libs are always available; no need for a placeholder
+ ifneq (,$(filter $(build_type),build-native))
+ rm -f debian/shlibs.common
+ touch debian/shlibs.common
+ else
+ echo 'libgcc_s $(GCC_SONAME) $(p_lgcc)' > debian/shlibs.common
+ echo 'libstdc++ $(CXX_SONAME) libstdc++$(CXX_SONAME)' >> debian/shlibs.common
+ endif
+ $(foreach ml,32 64 n32 x32 hf sf, \
+ echo 'libgcc_s $(GCC_SONAME) $(subst lib,lib$(ml),$(p_lgcc))' > debian/shlibs.common$(ml); \
+ echo 'libstdc++ $(CXX_SONAME) lib$(ml)stdc++$(CXX_SONAME)' >> debian/shlibs.common$(ml); \
+ )
+endif
@echo XXXXX `date -R`
touch $(install_stamp)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git
More information about the Reproducible-commits
mailing list