It is a dependency back to our Python changes that makes our NumPy changes less palatable from an upstreaming perspective. Really, we want to know if Python has been built with GCC, and that is exactly what 'GCC' in sys.version determines.
42 lines
2.3 KiB
Diff
42 lines
2.3 KiB
Diff
diff -urN numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py numpy-1.10.2/numpy/distutils/mingw32ccompiler.py
|
|
--- numpy-1.10.2.orig/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:57:55.666397000 +0000
|
|
+++ numpy-1.10.2/numpy/distutils/mingw32ccompiler.py 2016-01-02 03:54:51.695638100 +0000
|
|
@@ -120,10 +120,12 @@
|
|
else:
|
|
# gcc-4 series releases do not support -mno-cygwin option
|
|
self.set_executables(
|
|
- compiler='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall',
|
|
- compiler_so='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall -Wstrict-prototypes',
|
|
- linker_exe='gcc -g',
|
|
- linker_so='gcc -g -shared')
|
|
+ compiler='gcc -march=x86-64 -mtune=generic -DMS_WIN64'
|
|
+ ' -O2 -msse2 -Wall',
|
|
+ compiler_so='gcc -march=x86-64 -mtune=generic -DMS_WIN64'
|
|
+ ' -O2 -msse2 -Wall -Wstrict-prototypes',
|
|
+ linker_exe='gcc',
|
|
+ linker_so='gcc -shared -Wl,-gc-sections -Wl,-s')
|
|
else:
|
|
if self.gcc_version <= "3.0.0":
|
|
self.set_executables(
|
|
@@ -142,10 +144,16 @@
|
|
linker_so='g++ -mno-cygwin -shared')
|
|
else:
|
|
# gcc-4 series releases do not support -mno-cygwin option
|
|
- self.set_executables(compiler='gcc -O2 -Wall',
|
|
- compiler_so='gcc -O2 -Wall -Wstrict-prototypes',
|
|
- linker_exe='g++ ',
|
|
- linker_so='g++ -shared')
|
|
+ self.set_executables(
|
|
+ compiler='gcc -O2 -march=core2 -mtune=generic'
|
|
+ ' -mfpmath=sse -msse2'
|
|
+ ' -mincoming-stack-boundary=2 -Wall',
|
|
+ compiler_so='gcc -O2 -march=core2 -mtune=generic'
|
|
+ ' -mfpmath=sse -msse2'
|
|
+ ' -mincoming-stack-boundary=2 -Wall'
|
|
+ ' -Wstrict-prototypes',
|
|
+ linker_exe='g++ ',
|
|
+ linker_so='g++ -shared -Wl,-gc-sections -Wl,-s')
|
|
# added for python2.3 support
|
|
# we can't pass it through set_executables because pre 2.2 would fail
|
|
self.compiler_cxx = ['g++']
|