Link against libatomic (on platforms that require it)
authorIOhannes m zmölnig <zmoelnig@umlautS.umlaeute.mur.at>
Wed, 23 May 2018 13:16:39 +0000 (15:16 +0200)
committerIOhannes m zmölnig <zmoelnig@umlautS.umlaeute.mur.at>
Wed, 23 May 2018 13:16:39 +0000 (15:16 +0200)
debian/rules

index b9f013601f0d830aa2a27978c8c21d8c9ea19ace..e0e8e262ad28bc894d161ee614e91df987dd8e14 100755 (executable)
@@ -13,6 +13,19 @@ endif
 
 JUCE_VERSION := $(shell dpkg-query --show --showformat='$${source:Version}' juce-modules-source)
 
+# JUCE (used by giada) uses some c++11 features requiring atomic_store_8 and
+# atomic_load_8, so we need to link with libatomic on
+# armel, powerpc, powerpcspe, m68k, mips, mipsel, and sh4
+# see also:
+# - https://gcc.gnu.org/wiki/Atomic
+# - https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
+# - the 'clasp' packaging
+noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4)")
+# link with libatomic on architectures without built-in atomic
+ifeq ($(if $(noatomicarch),atomic), atomic)
+       DEB_LDFLAGS_MAINT_APPEND += -latomic
+endif
+
 CPPFLAGS+=-DBUILD_DATE='"$(BUILD_DATE)"'
 CXXFLAGS+=-std=c++11 -Wno-error