2015-04-24 05:24:32 +02:00
|
|
|
$NetBSD: patch-ab,v 1.2 2015/04/24 03:24:32 rodent Exp $
|
2012-12-10 04:15:48 +01:00
|
|
|
|
2015-04-24 05:24:32 +02:00
|
|
|
--- Lib/distutils/command/build_ext.py.orig 2014-10-12 07:03:52.000000000 +0000
|
2012-12-10 04:15:48 +01:00
|
|
|
+++ Lib/distutils/command/build_ext.py
|
2015-04-24 05:24:32 +02:00
|
|
|
@@ -532,8 +532,19 @@ class build_ext(Command):
|
2012-12-10 04:15:48 +01:00
|
|
|
# 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.get('LDFLAGS'):
|
|
|
|
+ # extra_args = list(extra_args)
|
|
|
|
+ # extra_args.extend(string.split(os.environ['LDFLAGS']))
|
|
|
|
+
|
|
|
|
# Detect target language, if not provided
|
|
|
|
language = ext.language or self.compiler.detect_language(sources)
|
|
|
|
|