summaryrefslogtreecommitdiff
path: root/dev-libs/boost/files/boost-1.48.0-no_strict_aliasing_python2.patch
blob: cb26792f99c9cea0623d59b8dd8ca04edeb137a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- a/libs/python/build/Jamfile.v2
+++ b/libs/python/build/Jamfile.v2
@@ -85,6 +85,12 @@
 rule lib_boost_python ( is-py3 ? )
 {
 
+    local python_major_version = [ MATCH "^([^.]+)" : [ feature.values python ] ] ;
+    local python2 ;
+    if $(python_major_version) = 2
+    {
+        python2 = true ;
+    }
     lib [ cond $(is-py3) : boost_python3 : boost_python ]
         : # sources
         numeric.cpp
@@ -119,6 +125,7 @@
         :   # requirements
             <link>static:<define>BOOST_PYTHON_STATIC_LIB 
             <define>BOOST_PYTHON_SOURCE
+            [ cond $(python2) : <cxxflags>-fno-strict-aliasing ]
           
             # On Windows, all code using Python has to link to the Python
             # import library.