[sasmodels] 08/10: Ensure compile flags get to compiler for models

Stuart Prescott stuart at debian.org
Sun Dec 31 07:17:26 UTC 2017


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

stuart pushed a commit to branch master
in repository sasmodels.

commit 7d6b6fba47b9c85f3c3c651fb52009d87b98c2ce
Author: Stuart Prescott <stuart at debian.org>
Date:   Sun Dec 31 17:07:13 2017 +1100

    Ensure compile flags get to compiler for models
---
 debian/patches/compile-flags.patch | 15 +++++++++++++++
 debian/patches/series              |  1 +
 debian/rules                       |  3 +++
 3 files changed, 19 insertions(+)

diff --git a/debian/patches/compile-flags.patch b/debian/patches/compile-flags.patch
new file mode 100644
index 0000000..a0f30b5
--- /dev/null
+++ b/debian/patches/compile-flags.patch
@@ -0,0 +1,15 @@
+Description: Ensure the compiler obeys compiler flags
+Author: Stuart Prescott <stuart at debian.org>
+
+--- a/sasmodels/kerneldll.py
++++ b/sasmodels/kerneldll.py
+@@ -116,6 +116,9 @@
+     # On mac users will need the X code command line tools installed
+     #COMPILE = "gcc-mp-4.7 -shared -fPIC -std=c99 -fopenmp -O2 -Wall %s -o %s -lm -lgomp"
+     CC = "cc -shared -fPIC -std=c99 -O2 -Wall".split()
++    CC.extend(os.environ.get("CPPFLAGS", "").split())
++    CC.extend(os.environ.get("CFLAGS", "").split())
++    CC.extend(os.environ.get("LDFLAGS", "").split())
+     # add openmp support if not running on a mac
+     if sys.platform != "darwin":
+         CC.append("-fopenmp")
diff --git a/debian/patches/series b/debian/patches/series
index 9dd8bbd..9960ac3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
 disable-failing-test.patch
 sphinx-local-mathjax.patch
 precompiled_path.patch
+compile-flags.patch
 setup-install-so.patch
diff --git a/debian/rules b/debian/rules
index 83ffbb8..8de94c5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,9 @@
 
 export PYBUILD_NAME=sasmodels
 
+# enable additional hardening
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
 # opencl needs somewhere to cache compiled objects
 export POCL_CACHE_DIR=$(CURDIR)/.cache/
 export XDG_CACHE_HOME=$(CURDIR)/.cache/

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



More information about the debian-science-commits mailing list