summaryrefslogtreecommitdiff
path: root/Lib/distutils/cygwinccompiler.py
diff options
context:
space:
mode:
authorJason Tishler <jason@tishler.net>2003-04-09 16:03:57 +0000
committerJason Tishler <jason@tishler.net>2003-04-09 16:03:57 +0000
commita5375150e264a89790adaefd9fc8778cc011d982 (patch)
tree41641921675589c35363e1ae7ac948738ce301a1 /Lib/distutils/cygwinccompiler.py
parentc32c4b618e3a08bc2215b50b65ed095555fcfbd0 (diff)
downloadcpython-a5375150e264a89790adaefd9fc8778cc011d982.tar.gz
Patch #709178: remove -static option from cygwinccompiler
Currently, the cygwinccompiler.py compiler handling in distutils is invoking the cygwin and mingw compilers with the -static option. Logically, this means that the linker should choose to link to static libraries instead of shared/dynamically linked libraries. Current win32 binutils expect import libraries to have a .dll.a suffix and static libraries to have .a suffix. If -static is passed, it will skip the .dll.a libraries. This is pain if one has a tree with both static and dynamic libraries using this naming convention, and wish to use the dynamic libraries. The -static option being passed in distutils is to get around a bug in old versions of binutils where it would get confused when it found the DLLs themselves. The decision to use static or shared libraries is site or package specific, and should be left to the setup script or to command line options.
Diffstat (limited to 'Lib/distutils/cygwinccompiler.py')
-rw-r--r--Lib/distutils/cygwinccompiler.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
index 18af388c3c..e86dc81533 100644
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -33,12 +33,6 @@ cygwin in no-cygwin mode).
# * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now
# - its dllwrap doesn't work, there is a bug in binutils 2.10.90
# see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html
-# - using gcc -mdll instead dllwrap doesn't work without -static because
-# it tries to link against dlls instead their import libraries. (If
-# it finds the dll first.)
-# By specifying -static we force ld to link against the import libraries,
-# this is windows standard and there are normally not the necessary symbols
-# in the dlls.
# *** only the version of June 2000 shows these problems
# This module should be kept compatible with Python 1.5.2.
@@ -98,7 +92,7 @@ class CygwinCCompiler (UnixCCompiler):
self.set_executables(compiler='gcc -mcygwin -O -Wall',
compiler_so='gcc -mcygwin -mdll -O -Wall',
linker_exe='gcc -mcygwin',
- linker_so=('%s -mcygwin -mdll -static' %
+ linker_so=('%s -mcygwin -mdll' %
self.linker_dll))
# cygwin and mingw32 need different sets of libraries
@@ -278,7 +272,7 @@ class Mingw32CCompiler (CygwinCCompiler):
self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
compiler_so='gcc -mno-cygwin -mdll -O -Wall',
linker_exe='gcc -mno-cygwin',
- linker_so='%s -mno-cygwin -mdll -static %s'
+ linker_so='%s -mno-cygwin -mdll %s'
% (self.linker_dll, entry_point))
# Maybe we should also append -mthreads, but then the finished
# dlls need another dll (mingwm10.dll see Mingw32 docs)