control: severity 962917 important control: tags 962917 patch On Tue, Jun 16, 2020 at 12:40:52AM +0200, Karsten Merker wrote:
> libatomic-ops FTBFS on riscv64 due to link failures in the > testsuite. The build log is available at > > > https://buildd.debian.org/status/fetch.php?pkg=libatomic-ops&arch=riscv64&ver=7.6.10-1&stamp=1588631725&raw=0 > > The source of the link failures is that the tests aren't built > with the "-pthread" compiler flag. > > Some architectures such as risc64 have native atomics support, > but only for word-sized operands and not for smaller entities. > When called with "-pthread", gcc automatically links in the > necessary wrapper functions to provide the missing atomic > operations on those architectures, but this doesn't happen when > one just links in libpthread with "-lpthread". > > Building the tests with "-pthread" in CFLAGS solves the build > failures. It would be great if you could upload a new version > of the package with a corresponding change. Hello, attached is a corresponding patch. If the patch is ok for you and you would like me to perform an NMU, just let me know. Regards, Karsten -- Ich widerspreche hiermit ausdrücklich der Nutzung sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der Werbung sowie der Markt- oder Meinungsforschung.
>From 2c4627e01637b6e2b4ad3c7d8b8ed92ff020e92b Mon Sep 17 00:00:00 2001 From: Karsten Merker <mer...@debian.org> Date: Wed, 17 Jun 2020 20:34:06 +0200 Subject: [PATCH] Fix FTFBS in the testsuite on riscv64 --- debian/changelog | 9 +++++++++ .../libatomic-ops-enable-pthread-in-tests.diff | 12 ++++++++++++ debian/patches/series | 1 + 3 files changed, 22 insertions(+) create mode 100644 debian/patches/libatomic-ops-enable-pthread-in-tests.diff create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 2731759..a0c6b39 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +libatomic-ops (7.6.10-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTFBS in the testsuite on riscv64 by adding "-pthread" to + the testsuite's CFLAGS and thereby making sure that gcc enables + full atomics support on all platforms. (Closes: #962917) + + -- Karsten Merker <mer...@debian.org> Wed, 17 Jun 2020 19:37:31 +0200 + libatomic-ops (7.6.10-1) unstable; urgency=medium * New upstream release diff --git a/debian/patches/libatomic-ops-enable-pthread-in-tests.diff b/debian/patches/libatomic-ops-enable-pthread-in-tests.diff new file mode 100644 index 0000000..9e6891b --- /dev/null +++ b/debian/patches/libatomic-ops-enable-pthread-in-tests.diff @@ -0,0 +1,12 @@ +diff -Nur libatomic-ops-7.6.10.orig/tests/Makefile.am libatomic-ops-7.6.10/tests/Makefile.am +--- libatomic-ops-7.6.10.orig/tests/Makefile.am ++++ libatomic-ops-7.6.10/tests/Makefile.am +@@ -10,7 +10,7 @@ + -I$(top_builddir)/src -I$(top_srcdir)/src \ + -I$(top_builddir)/tests -I$(top_srcdir)/tests + +-CFLAGS += $(CFLAGS_EXTRA) ++CFLAGS += $(CFLAGS_EXTRA) -pthread + + TESTS = test_atomic$(EXEEXT) test_atomic_generalized$(EXEEXT) \ + test_stack$(EXEEXT) test_malloc$(EXEEXT) diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..6bd8bef --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +libatomic-ops-enable-pthread-in-tests.diff -- 2.20.1