[issue4010] configure options don't trickle down to distutils

Roumen Petrov report at bugs.python.org
Sun Oct 5 18:40:51 CEST 2008


Roumen Petrov <bugtrack at roumenpetrov.info> added the comment:

Lets see method customize_compiler(from sysconfig.py) 
The method search variables 'CPP', 'LDFLAGS' and 'CPPFLAGS' only in
environment. The variable CPP is not a Makefile variable. 'LDFLAGS' and
'CPPFLAGS' are makefile variables(macros). Usually makefile will export
to commands a macro only if exists environment variable with same name.
So to pass to distutils LDFLAGS is enough to to run as example
"LDFLAGS=fake make".

Issue3678 is about LDFLAGS for python shared library and now  command
start with $(LDSHARED) $(LDFLAGS) ...

If we modify Makefile to use  "...LDFLAGS=$(LDFLAGS) ... setup.py"
customize_compiler will append LDFLAGS to LDSHARED.
So this issue is about to use LDFLAGS for python modules.

Another point is that configure script append LDFLAGS to LDSHARED only
on certain platforms (all BSD based) and ignore all others.

What is preferred patch:
- a simple patch that just export LDFLAGS for setup.py;
- a patch that export LDFLAGS for all python programs, i.e. in Makefile
to append to RUNSHARED LDFLAGS=@LDFLAGS@ ;
- a patch that append LDFLAGS to LDSHARED in configure for all platforms
and remove use of LDFLAGS in Makefile and setup.py ?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4010>
_______________________________________


More information about the Python-bugs-list mailing list