classification
Title: CPPFLAGS should not be aded to ldshard command
Type: behavior Stage:
Components: Distutils Versions: Python 2.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: draghuram, loewis, sjoerd
Priority: normal Keywords:

Created on 2003-09-02 12:31 by sjoerd, last changed 2008-01-30 16:50 by draghuram. This issue is now closed.

Messages (4)
msg60374 - (view) Author: Sjoerd Mullender (sjoerd) * (Python committer) Date: 2003-09-02 12:31
CPPFLAGS contains flags for the C preprocessor.  It has
no business being added to the ldshared command (this
is in sysconfig.py).  In fact, it may be harmful since
the ldshared command may well be ld with some flags
which typically does not understand cpp flags.

Irix where the ldshared command is "ld  -shared -all"
is a good example of where it is plain wrong to add
CPPFLAGS.
msg60375 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-09-03 05:19
Logged In: YES 
user_id=21627

OTOH, it also seems wrong that, on Irix, ldshared is "ld
-shared -all". ld should never be used directly.
msg60376 - (view) Author: Sjoerd Mullender (sjoerd) * (Python committer) Date: 2003-09-03 08:14
Logged In: YES 
user_id=43607

I maintain that CPPFLAGS has no business being part of
LDSHARED.  LDSHARED is used at link time only, and the C
preprocessor is not in any way involved in that step.

If you can come up with a better way of creating shared
libraries on Irix, be my guest.  The current way has served
us well for many years.  Looking at configure.in, it's
mostly gcc based systems that use gcc to do the linking of
shared libraries.
msg61872 - (view) Author: Raghuram Devarakonda (draghuram) (Python triager) Date: 2008-01-30 16:50
For the record, the latest Lib/distutils/sysconfig.py still seems to
have this behaviour (please correct me if I am wrong). I am closing this
as there is no activity for quite some time.
History
Date User Action Args
2008-01-30 16:50:28draghuramsetstatus: open -> closed
versions: + Python 2.6
nosy: + draghuram
messages: + msg61872
resolution: wont fix
type: behavior
2003-09-02 12:31:06sjoerdcreate