summarylogtreecommitdiffstats
path: root/0085-distutils-compiler-enable-new-dtags.patch
blob: a9427386e0f17188f2fdc788bdaf11d22d837ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From fc9e160c083b5aa586615624a0000dcc901990df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
 <alexey.pawlow@gmail.com>
Date: Thu, 17 Jun 2021 18:51:22 +0530
Subject: [PATCH 085/N] distutils: compiler enable new dtags
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Алексей <alexey.pawlow@gmail.com>
---
 Lib/distutils/unixccompiler.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index f0792de..60776bc 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -248,9 +248,13 @@ class UnixCCompiler(CCompiler):
                 # -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:
-- 
2.33.0