From e6e5f9820cfb922db4dcf6b32346cab9b084c952 Mon Sep 17 00:00:00 2001 From: Jarod Wilson Date: Fri, 23 Feb 2007 22:18:02 +0000 Subject: [PATCH] dammit, I thought I added this... --- numpy-1.0.1-cpuinfo.patch | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 numpy-1.0.1-cpuinfo.patch diff --git a/numpy-1.0.1-cpuinfo.patch b/numpy-1.0.1-cpuinfo.patch new file mode 100644 index 0000000..258c4df --- /dev/null +++ b/numpy-1.0.1-cpuinfo.patch @@ -0,0 +1,41 @@ +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',