Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
5cc44b40
Commit
5cc44b40
authored
Sep 30, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except when necessary.
Patch by Oscar Benjamin.
parent
f67dd5be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
cygwinccompiler.py
cygwinccompiler.py
+18
-8
No files found.
cygwinccompiler.py
View file @
5cc44b40
...
...
@@ -48,7 +48,7 @@ cygwin in no-cygwin mode).
import
os
import
sys
import
copy
from
subprocess
import
Popen
,
PIPE
from
subprocess
import
Popen
,
PIPE
,
check_output
import
re
from
distutils.ccompiler
import
gen_preprocess_options
,
gen_lib_options
...
...
@@ -294,13 +294,18 @@ class Mingw32CCompiler(CygwinCCompiler):
else
:
entry_point
=
''
self
.
set_executables
(
compiler
=
'gcc -mno-cygwin -O -Wall'
,
compiler_so
=
'gcc -mno-cygwin -mdll -O -Wall'
,
compiler_cxx
=
'g++ -mno-cygwin -O -Wall'
,
linker_exe
=
'gcc -mno-cygwin'
,
linker_so
=
'%s -mno-cygwin %s %s'
%
(
self
.
linker_dll
,
shared_option
,
entry_point
))
if
self
.
gcc_version
<
'4'
or
is_cygwingcc
():
no_cygwin
=
' -mno-cygwin'
else
:
no_cygwin
=
''
self
.
set_executables
(
compiler
=
'gcc%s -O -Wall'
%
no_cygwin
,
compiler_so
=
'gcc%s -mdll -O -Wall'
%
no_cygwin
,
compiler_cxx
=
'g++%s -O -Wall'
%
no_cygwin
,
linker_exe
=
'gcc%s'
%
no_cygwin
,
linker_so
=
'%s%s %s %s'
%
(
self
.
linker_dll
,
no_cygwin
,
shared_option
,
entry_point
))
# Maybe we should also append -mthreads, but then the finished
# dlls need another dll (mingwm10.dll see Mingw32 docs)
# (-mthreads: Support thread-safe exception handling on `Mingw32')
...
...
@@ -393,3 +398,8 @@ def get_versions():
"""
commands = ['
gcc
-
dumpversion
', '
ld
-
v
', '
dllwrap
--
version
']
return tuple([_find_exe_version(cmd) for cmd in commands])
def is_cygwingcc():
'''Try to determine if the gcc that would be used is from cygwin.'''
out_string = check_output(['
gcc
', '
-
dumpmachine
'])
return out_string.strip().endswith(b'
cygwin
')
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment