summaryrefslogtreecommitdiff
path: root/lang/python20/patches/patch-cd
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python20/patches/patch-cd')
-rw-r--r--lang/python20/patches/patch-cd22
1 files changed, 22 insertions, 0 deletions
diff --git a/lang/python20/patches/patch-cd b/lang/python20/patches/patch-cd
new file mode 100644
index 00000000000..9dbbfb69488
--- /dev/null
+++ b/lang/python20/patches/patch-cd
@@ -0,0 +1,22 @@
+$NetBSD: patch-cd,v 1.1 2003/08/18 09:14:13 drochner Exp $
+
+--- Lib/distutils/command/build_ext.py.orig Sat Mar 31 18:09:32 2001
++++ Lib/distutils/command/build_ext.py
+@@ -445,8 +445,17 @@ class build_ext (Command):
+ # that go into the mix.
+ if ext.extra_objects:
+ objects.extend(ext.extra_objects)
++
++ # Two possible sources for extra linker arguments:
++ # - 'extra_link_args' in Extension object
++ # - LDFLAGS environment variable
++ # The environment variable should take precedence, and
++ # any sensible compiler will give precedence to later
++ # command line args. Hence we combine them in order:
+ extra_args = ext.extra_link_args or []
+
++ if os.environ.has_key('LDFLAGS'):
++ extra_args.extend(string.split(os.environ['LDFLAGS']))
+
+ self.compiler.link_shared_object(
+ objects, ext_filename,