Control: tags -1 patch

On Sun, Nov 08, 2020 at 09:53:53AM +0200, Juhani Numminen wrote:
> Control: reassign -1 src:opendht 2.1.1-1
> Control: severity -1 serious
> Control: tags -1 +ftbfs
> 
> On Sun, 17 May 2020 14:31:40 +0200 Petter Reinholdtsen <p...@hungry.com> 
> wrote:
> > 
> > I had a look at the build failure on RISC-V, as reported by the
> > autobuilders[1], and the problem seem to be that -latomic is not used
> > during linking.
> > 
> >  [1] <URL: https://buildd.debian.org/status/package.php?p=opendht >
> 
> The build failures with this message, undefined reference to 
> `__atomic_exchange_8',
> are now happening on two release architectures, armel and mipsel.

Fix/workaround below.

> Regards,
> Juhani

cu
Adrian

--- debian/rules.old    2020-11-14 12:04:18.032821426 +0000
+++ debian/rules        2020-11-14 12:07:45.514909271 +0000
@@ -3,6 +3,10 @@
 
 # Hardening
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+ifneq (,$(filter $(DEB_HOST_ARCH), armel m68k mips mipsel powerpc riscv64 sh4))
+  export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic 
-Wl,--as-needed
+endif
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
 

Reply via email to