Marc-Andre Lemburg <m...@egenix.com> added the comment: STINNER Victor wrote: > > STINNER Victor <victor.stin...@haypocalc.com> added the comment: > > MaL> The patch you checked in still unconditionally overrides the > MaL> CFLAGS setting applied by AC_PROG_CC in case no CFLAGS variable > MaL> is set. > MaL> > MaL> The issue now is: AC_PROG_CC no longer initializes CFLAGS > MaL> if not set. > > Sorry, but I don't understand. Why should it be initialized?
Sorry, perhaps I wasn't clear enough. The purpose of AC_PROG_CC is to setup the env vars depending on the found C compiler. One of these settings is the CFLAGS env var and you patch causes those settings to be overwritten if CFLAGS has not been defined as env var before starting ./configure. Since CFLAGS will most of the time not be set by the user running ./configure, the patch effectively disables the default settings determined based on the compiler by AC_PROG_CC. > I don't like the default value because it enables optimization when > --with-pydebug is used and I consider that as a bug. If no configure option > is used, Python adds -O3 as before. About -g: Python always add it, so the -g > from AC_PROG_CC was redundant. Right, but it's possible that AC_PROG_CC adds other flags as well (it currently doesn't, but that may well change in future versions of autoconf). I'd suggest to only override the CFLAGS setting in case it was defined before running the AC_PROG_CC code. In addition, it may be useful to have --with-pydebug replace OPT with "-O0" or add "-O0" to it the end of it. > In Makefile.pre.in, prefixes and suffixes are added to the CFLAGS: "CFLAGS= > $(BASECFLAGS) @CFLAGS@ $(OPT) $(EXTRA_CFLAGS)". But I consider this as a > separate issue. Right. That's for historic reasons. OPT is very old, BASECFLAGS and EXTRA_CFLAGS are newer additions. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8211> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com