[Python-Dev] what environment variable should contain compiler warning suppression flags?

M.-A. Lemburg mal at egenix.com
Mon Jun 28 16:04:04 CEST 2010


Mark Dickinson wrote:
> On Mon, Jun 28, 2010 at 12:38 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>>> On Sun, Jun 27, 2010 at 13:37, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
>>>> On Sun, Jun 27, 2010 at 1:04 PM, Mark Dickinson <dickinsm at gmail.com> wrote:
>>>>> I'm not sure I understand the importance of allowing AC_PROG_CC to set
>>>>> CFLAGS (if CFLAGS is undefined at the point of the AC_PROG_CC);  can
>>>>> someone give an example of why this is necessary?
>>>>
>>>> Marc-Andre's argument seems to be "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)." That seems a little weak to constrain
>>>> fixing actual problems today. If it ever adds more arguments, we'll
>>>> need to inspect them anyway to see if they're more like -g or -O2
>>>> (wanted or harmful).
>>
>> Please see the discussion on the ticket for details.
> 
> Yes, I've done that.  It's repeatedly asserted in that discussion that
> AC_PROG_CC should be allowed to initialize an otherwise empty CFLAGS,
> but nowhere in that discussion does it explain *why* this is
> desirable.  What would be so bad about not allowing AC_PROG_CC to
> initialize CFLAGS?  (E.g., by setting an otherwise empty CFLAGS to
> '-g' before the AC_PROG_CC invocation.)  That would fix the issue of
> the unwanted -O2 flag that AC_PROG_CC otherwise adds.

Why do you think that the default -O2 is unwanted and how do you know
whether the compiler accepts -g as option ?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 28 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2010-07-19: EuroPython 2010, Birmingham, UK                20 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list