Chris Lambacher <ch...@kateandchris.net> added the comment:

I am not convinced that the minimal patch would work for my original issue. I 
wanted to be able to override the -march option which shows up in OPT on 
Fedora. I was cross-compiling to a target architecture that does not support 
the -march option so I would not be able to provide a different one as 
override. 

The proposed minimal patch would leave the OPT value and make it unchangeable 
because CFLAGS would pull out a value for OPT from the Makefile which shows as 
in my current Ubuntu system:

OPT=        -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes
BASECFLAGS=  -fno-strict-aliasing
CFLAGS=     $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS)

The debian-sysconfig-flags looks the most correct because it allows override at 
any point by emulating the CFLAGS = $(BASECFLAGS) $(OPT) $(EXTRA_CFLAGS) logic.

It still looks like it needs an override for EXTRA_CFLAGS and the logic for 
LD_SHARED looks wrong. In the Makefile LDSHARED is just:
LDSHARED=   $(CC) -shared -Wl,-O1 -Wl,-Bsymbolic-functions

Why does LDSHARED need CFLAGS and CPPFLAGS? When provided as an override but 
not in the Makefile? Do we need to allow for this override in the case of 
overriding OPT, BASEFLAGS or EXTRA_CFLAGS?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue969718>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to