about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-10 07:13:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-12 14:07:16 +0000
commite2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch)
tree79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch
parent1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff)
parent84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff)
downloadnixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst
nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch')
-rw-r--r--nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch b/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch
new file mode 100644
index 000000000000..0c26300d9c06
--- /dev/null
+++ b/nixpkgs/pkgs/development/interpreters/python/cpython/3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch
@@ -0,0 +1,33 @@
+From 1911995b1a1252d80bf2b9651840e185a1a6baf5 Mon Sep 17 00:00:00 2001
+From: Hong Xu <hong@topbug.net>
+Date: Thu, 25 Jul 2019 10:25:55 -0700
+Subject: [PATCH] On all posix systems, not just Darwin, set LDSHARED (if not
+ set) according to CC
+
+This patch is slightly different from https://bugs.python.org/issue24935
+, except that we now handle LDSHARED according to CC on all posix
+systems, not just Darwin or Linux.
+---
+ Lib/distutils/sysconfig.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index 37feae5df7..9fdce6896d 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -199,10 +199,10 @@ def customize_compiler(compiler):
+ 
+         if 'CC' in os.environ:
+             newcc = os.environ['CC']
+-            if (sys.platform == 'darwin'
++            if (os.name == 'posix'
+                     and 'LDSHARED' not in os.environ
+                     and ldshared.startswith(cc)):
+-                # On OS X, if CC is overridden, use that as the default
++                # On POSIX systems, if CC is overridden, use that as the default
+                 #       command for LDSHARED as well
+                 ldshared = newcc + ldshared[len(cc):]
+             cc = newcc
+-- 
+2.25.1
+