Skip to content

Commit

Permalink
distutils: compiler enable new dtags
Browse files Browse the repository at this point in the history
Co-authored-by: Алексей <[email protected]>
  • Loading branch information
Alexpux authored and lazka committed Jul 19, 2023
1 parent aac2cf7 commit 7c42997
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/distutils/unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ def runtime_library_dir_option(self, dir):
# -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:
Expand Down

0 comments on commit 7c42997

Please sign in to comment.