Source: libgc Version: 1:8.0.4-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
libgc builds differently during a native build from a cross build. It figures out whether -latomic_ops is needed by checking for compiler intrinsics. Unfortunately, the check doesn't work during cross and libgc is pessimistic. Therefore it always builds with the external -latomic_ops during cross. This is an unwanted difference to native builds for a number of architectures. The attached patch forces the check to match the native behaviour for the relevant architectures. Helmut
diff --minimal -Nru libgc-8.0.4/debian/changelog libgc-8.0.4/debian/changelog --- libgc-8.0.4/debian/changelog 2020-07-22 02:37:12.000000000 +0200 +++ libgc-8.0.4/debian/changelog 2020-08-02 20:41:06.000000000 +0200 @@ -1,3 +1,11 @@ +libgc (1:8.0.4-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix cross/native difference: explicitly disable usage of + -latomic_ops. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sun, 02 Aug 2020 20:41:06 +0200 + libgc (1:8.0.4-1) unstable; urgency=medium * Team upload. diff --minimal -Nru libgc-8.0.4/debian/rules libgc-8.0.4/debian/rules --- libgc-8.0.4/debian/rules 2020-04-07 11:03:33.000000000 +0200 +++ libgc-8.0.4/debian/rules 2020-08-02 20:41:04.000000000 +0200 @@ -7,6 +7,10 @@ LDFLAGS += -pthread +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +ATOMIC_BUILTIN_ARCHS = alpha amd64 arm64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x x32 +endif + %: dh $@ --with pkgkde_symbolshelper,autoreconf @@ -26,7 +30,8 @@ --datadir=\$${prefix}/share/doc \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ - --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) + --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ + $(if $(filter $(DEB_HOST_ARCH),$(ATOMIC_BUILTIN_ARCHS)),--with-libatomic-ops=none) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: