42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
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',
|