[clasp] 01/04: debian/rules: enable threads on all archs
Thomas Krennwallner
tkren-guest at moszumanska.debian.org
Sat Dec 17 09:11:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
tkren-guest pushed a commit to branch devel
in repository clasp.
commit 95a9efb04278a07d2b0606069e2620f17307e4ac
Author: Thomas Krennwallner <tkren at kr.tuwien.ac.at>
Date: Fri Dec 16 10:54:19 2016 +0100
debian/rules: enable threads on all archs
use LDFLAGS to inject -latomic on archs that need it
---
debian/rules | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/debian/rules b/debian/rules
index 84e5fd1..510d243 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,32 +4,30 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# compile with c++11 threads only architectures with 64bit __atomic_exchange,
-# which seems to be unsupported on powerpc, powerpcspe, m68k, mips, mipsel.
-# see buildd log
-# https://buildd.debian.org/status/fetch.php?pkg=clasp&arch=mips&ver=3.2.1-1&stamp=1480664797
-# and
+# clasp requires c++11 threads with 64bit __atomic_exchange, we need to
+# link with libatomic on powerpc, powerpcspe, m68k, mips, mipsel, and
+# sh4, see also
# https://gcc.gnu.org/wiki/Atomic
# https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
-arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH | egrep -v -x "(powerpc|powerpcspe|m68k|mips|mipsel)")
+arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH | egrep -x "(powerpc|powerpcspe|m68k|mips|mipsel|sh4)")
# use custom hardening config flags for compiling clasp
CONFIG=hardening
-CONFIGPARMS = --prefix=/usr
-TOPBUILDDIR = build/$(CONFIG)
-
-# use c++11 threads, threading implies _mt builddir
-ifeq ($(if $(arch),good), good)
- CONFIGPARMS += --with-mt=std
- TOPBUILDDIR = build/$(CONFIG)_mt
-endif
+CONFIGPARMS = --prefix=/usr --with-mt=std
+TOPBUILDDIR = build/$(CONFIG)_mt
#
# export CXXFLAGS and LDFLAGS for configure.sh
#
# add -O3 and NDEBUG and enable all hardening flags
+# link with libatomic on architectures without built-in atomic
#
DEB_CXXFLAGS_MAINT_APPEND = -O3 -DNDEBUG
+DEB_LDFLAGS_MAINT_APPEND =
+ifeq ($(if $(arch),atomic), atomic)
+ DEB_LDFLAGS_MAINT_APPEND += -latomic
+endif
+
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/clasp.git
More information about the debian-science-commits
mailing list