Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Unified Diff: Lib/distutils/unixccompiler.py

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/distutils/tests/test_cygwinccompiler.py ('k') | Lib/plat-generic/regen » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/distutils/unixccompiler.py Thu Dec 27 23:52:36 2012 +0200
+++ b/Lib/distutils/unixccompiler.py Thu Dec 27 17:35:12 2012 -0500
@@ -155,6 +155,9 @@
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs,
libraries)
+
+ lib_opts.append('-L.')
+
if not isinstance(output_dir, (str, type(None))):
raise TypeError("'output_dir' must be a string or None")
if output_dir is not None:
@@ -238,9 +241,13 @@
# -Wl whenever gcc was used in the past it is probably
# safest to keep doing so.
if sysconfig.get_config_var("GNULD") == "yes":
- # GNU ld needs an extra option to get a RUNPATH
+ # GNU ELF ld needs an extra option to get a RUNPATH
# instead of just an RPATH.
- return "-Wl,--enable-new-dtags,-R" + dir
+ if sys.platform in ["win32", "cygwin"] or \
+ "mingw" in compiler:
+ return []
+ else:
+ return "-Wl,--enable-new-dtags,-R" + dir
else:
return "-Wl,-R" + dir
else:
« no previous file with comments | « Lib/distutils/tests/test_cygwinccompiler.py ('k') | Lib/plat-generic/regen » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+