Message74346
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 ? |
|
Date |
User |
Action |
Args |
2008-10-05 16:40:51 | rpetrov | set | recipients:
+ rpetrov, skip.montanaro, brett.cannon |
2008-10-05 16:40:51 | rpetrov | set | messageid: <1223224851.44.0.0184841130311.issue4010@psf.upfronthosting.co.za> |
2008-10-05 16:40:50 | rpetrov | link | issue4010 messages |
2008-10-05 16:40:49 | rpetrov | create | |
|