rpms/numpy/devel numpy-1.0.1-cpuinfo.patch,NONE,1.1

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Fri Feb 23 22:18:05 UTC 2007


Author: jwilson

Update of /cvs/extras/rpms/numpy/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13705

Added Files:
	numpy-1.0.1-cpuinfo.patch 
Log Message:
dammit, I thought I added this...

numpy-1.0.1-cpuinfo.patch:

--- NEW FILE numpy-1.0.1-cpuinfo.patch ---
Index: trunk/numpy/distutils/fcompiler/gnu.py
===================================================================
--- trunk/numpy/distutils/fcompiler/gnu.py (revision 3523)
+++ trunk/numpy/distutils/fcompiler/gnu.py (revision 3538)
@@ -197,4 +197,6 @@
             elif cpu.is_Nocona():
                 march_opt = '-march=nocona'
+            elif cpu.is_Core2():
+                march_opt = '-march=nocona'
             elif cpu.is_Prescott():
                 march_opt = '-march=prescott'
@@ -217,5 +219,10 @@
             if cpu.is_PentiumM():
                 march_opt = '-march=pentium-m'
-
+        
+        # Future:
+        # if gnu_ver >= '4.3':
+        #    if cpu.is_Core2():
+        #        march_opt = '-march=core2'
+        
         # Note: gcc 3.2 on win32 has breakage with -march specified
         if '3.1.1' <= gnu_ver <= '3.4' and sys.platform=='win32':
Index: trunk/numpy/distutils/cpuinfo.py
===================================================================
--- trunk/numpy/distutils/cpuinfo.py (revision 3520)
+++ trunk/numpy/distutils/cpuinfo.py (revision 3538)
@@ -186,6 +186,11 @@
 
     def _is_Nocona(self):
-        return self.is_PentiumIV() and self.is_64bit()
-
+        return self.is_64bit() and self.is_i686()
+    
+    def _is_Core2(self):
+        return self.is_64bit() and self.is_Intel() and \
+               re.match(r'.*?Core\(TM\)2\b', \
+                        self.info[0]['model name']) is not None
+    
     def _is_Itanium(self):
         return re.match(r'.*?Itanium\b',




More information about the scm-commits mailing list