Package: pycuda / 2016.1.2+git20161024-1

hardening.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Description: Disable optimisation flags
 PyCUDA manages its own CXXFLAGS which enable optimisation and disable
 debug options. This patch disables setting of default optimisation levels
 as this might conflict with hardening and DEB_BUILD_OPTIONS.
Forwarded: not-needed
Author: Tomasz Rybak <tomasz.rybak@post.pl>
Last-Update: 2016-10-27
Index: pycuda-2016.1.2+git20161024/aksetup_helper.py
===================================================================
--- pycuda-2016.1.2+git20161024.orig/aksetup_helper.py
+++ pycuda-2016.1.2+git20161024/aksetup_helper.py
@@ -156,11 +156,11 @@ def hack_distutils(debug=False, fast_lin
             if debug:
                 cflags.append("-g")
             else:
+                cflags.append("-DNDEBUG")
                 if what_opt is None:
                     pass
                 else:
                     cflags.append("-O%s" % what_opt)
-                    cflags.append("-DNDEBUG")
 
             cvars['OPT'] = str.join(' ', cflags)
             cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"]
Index: pycuda-2016.1.2+git20161024/setup.py
===================================================================
--- pycuda-2016.1.2+git20161024.orig/setup.py
+++ pycuda-2016.1.2+git20161024/setup.py
@@ -107,7 +107,7 @@ def main():
 
     check_git_submodules()
 
-    hack_distutils()
+    hack_distutils(what_opt=None)
     conf = get_config(get_config_schema())
 
     EXTRA_SOURCES, EXTRA_DEFINES = set_up_shipped_boost_if_requested("pycuda", conf)