summaryrefslogtreecommitdiff
path: root/numpy/distutils/mingw32ccompiler.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-12-19 10:21:54 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-12-19 10:21:54 +0000
commit33b2968b0eebf6c421553d57d426684db1a7dc7c (patch)
treec62386c200a0cf0730f5f128b8a1b2e28277db92 /numpy/distutils/mingw32ccompiler.py
parent45d2c14ee19a23866ef44d4befe9058593c4e15d (diff)
downloadnumpy-33b2968b0eebf6c421553d57d426684db1a7dc7c.tar.gz
Do not use g++ for linking on amd64.
Diffstat (limited to 'numpy/distutils/mingw32ccompiler.py')
-rw-r--r--numpy/distutils/mingw32ccompiler.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/numpy/distutils/mingw32ccompiler.py b/numpy/distutils/mingw32ccompiler.py
index b7550de64..7663929ba 100644
--- a/numpy/distutils/mingw32ccompiler.py
+++ b/numpy/distutils/mingw32ccompiler.py
@@ -93,17 +93,24 @@ class Mingw32CCompiler(distutils.cygwinccompiler.CygwinCCompiler):
# linker_exe='gcc -mno-cygwin',
# linker_so='%s --driver-name g++ -mno-cygwin -mdll -static %s'
# % (self.linker, entry_point))
- if self.gcc_version <= "3.0.0":
- self.set_executables(compiler='gcc -mno-cygwin -O2 -w',
- compiler_so='gcc -mno-cygwin -mdll -O2 -w -Wstrict-prototypes',
- linker_exe='g++ -mno-cygwin',
- linker_so='%s -mno-cygwin -mdll -static %s'
- % (self.linker, entry_point))
+ if get_build_architecture() == 'AMD64':
+ self.set_executables(
+ compiler='gcc -mno-cygwin -O2 -Wall',
+ compiler_so='gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes',
+ linker_exe='gcc -mno-cygwin',
+ linker_so='gcc -mno-cygwin -shared')
else:
- self.set_executables(compiler='gcc -mno-cygwin -O2 -Wall',
- compiler_so='gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes',
- linker_exe='g++ -mno-cygwin',
- linker_so='g++ -mno-cygwin -shared')
+ if self.gcc_version <= "3.0.0":
+ self.set_executables(compiler='gcc -mno-cygwin -O2 -w',
+ compiler_so='gcc -mno-cygwin -mdll -O2 -w -Wstrict-prototypes',
+ linker_exe='g++ -mno-cygwin',
+ linker_so='%s -mno-cygwin -mdll -static %s'
+ % (self.linker, entry_point))
+ else:
+ self.set_executables(compiler='gcc -mno-cygwin -O2 -Wall',
+ compiler_so='gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes',
+ linker_exe='g++ -mno-cygwin',
+ linker_so='g++ -mno-cygwin -shared')
# added for python2.3 support
# we can't pass it through set_executables because pre 2.2 would fail
self.compiler_cxx = ['g++']