[gringo] 01/02: debian/rules: use LDFLAGS to inject -latomic

Thomas Krennwallner tkren-guest at moszumanska.debian.org
Fri Dec 16 09:46:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

tkren-guest pushed a commit to branch devel
in repository gringo.

commit 8a80f710ae81bee8eaf4ba7dc9c5d46fa2ff23f7
Author: Thomas Krennwallner <tkren at kr.tuwien.ac.at>
Date:   Fri Dec 16 08:11:14 2016 +0100

    debian/rules: use LDFLAGS to inject -latomic
---
 debian/rules | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/debian/rules b/debian/rules
index 41c4068..70c31a2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,16 +21,10 @@ broken_exception_ptr = $(shell dpkg-architecture -qDEB_BUILD_ARCH | grep "armel"
 # force g++
 CONFIGPARMS = CXX='g++'
 
-do_threads = $(and $(if $(arch),threads), $(if $(broken_exception_ptr),,threads))
-do_atomic = $(and $(if $(arch),,atomic), $(if $(broken_exception_ptr),,atomic))
-
 # use c++11 threads, lua5.3, and python2.7
-ifeq ($(do_threads), threads)
+ifneq ($(if $(broken_exception_ptr),broken), broken)
 	CONFIGPARMS += WITH_THREADS='posix' WITH_LUA='lua5.3' WITH_PYTHON='python2.7' CPPPATH='$${["/usr/include/lua5.3","/usr/include/python2.7"]}'
 endif
-ifeq ($(do_atomic), atomic)
-	CONFIGPARMS += WITH_THREADS='posix' LIBS='$${["atomic"]}' WITH_LUA='lua5.3' WITH_PYTHON='python2.7' CPPPATH='$${["/usr/include/lua5.3","/usr/include/python2.7"]}'
-endif
 
 #
 # export CPPFLAGS, CXXFLAGS, and LDFLAGS for scons
@@ -39,11 +33,16 @@ endif
 #
 DEB_CXXFLAGS_MAINT_APPEND = -std=c++11 -O3 -Wall
 DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG
+DEB_LDFLAGS_MAINT_APPEND =
 
 ifeq ($(if $(broken_exception_ptr),broken), broken)
 	DEB_CPPFLAGS_MAINT_APPEND += -DBROKEN_STD_EXCEPTION_PTR
 endif
 
+ifeq ($(and $(if $(arch),,atomic), $(if $(broken_exception_ptr),,atomic)), atomic)
+	DEB_LDFLAGS_MAINT_APPEND += -latomic
+endif
+
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 DPKG_EXPORT_BUILDFLAGS = 1
@@ -58,7 +57,7 @@ SCLINKFLAGS = $(shell echo $(LDFLAGS) | sed -e 's/^/\$${["/;s/ -/","-/g;s/$$/"]}
 
 # configure with LUA, Python; forcibly turn off threads if std::exception_ptr is broken
 override_dh_auto_configure:
-	scons configure --build-dir=release $(CONFIGPARMS) CXXFLAGS='$(SCCXXFLAGS)' LINKFLAGS='$(SCLINKFLAGS)'
+	scons configure --build-dir=release $(CONFIGPARMS) CXXFLAGS='$(SCCXXFLAGS)' LINKFLAGS='$(SCLINKFLAGS)' || cat build/release.log build/release.py
 ifeq ($(if $(broken_exception_ptr),broken), broken)
 	sed -i -e 's/WITH_THREADS =.*/WITH_THREADS = None/' -e 's/WITH_LUA =.*/WITH_LUA = None/' -e 's/WITH_PYTHON =.*/WITH_PYTHON = None/' ./build/release.py
 endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/gringo.git



More information about the debian-science-commits mailing list