bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to adjust default CFLAGS="-g -O2"?


From: Eric Blake
Subject: Re: how to adjust default CFLAGS="-g -O2"?
Date: Wed, 06 Aug 2008 19:20:53 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 8/6/2008 4:41 PM:
| But autoconf still hardwires this logic in _AC_PROG_CC_G:
|
| ---------------------------------------------
| elif test $ac_cv_prog_cc_g = yes; then
|   if test "$GCC" = yes; then
|     CFLAGS="-g -O2"
|
| Could this be made customizable somehow? Either through a variable that the
| developer could set in his configure.ac before the invocation of AC_PROG_CC,
| or through a macro which he could redefine in his configure.ac?

Hmm.  This is an interesting request, and seems doable.  I think it would
be reasonable to see this in the user's configure.ac, just prior to
AC_PROG_CC:

AC_PROG_GCC_DEFAULT_FLAGS([-O2 -g -Wall])

at which point, that string becomes the first set of CFLAGS tried for the
compiler (if $CFLAGS is undefined), before falling back on "-g -O2" if it
didn't work.

Anyone care to contribute a patch, even if only to add a line in the TODO
file pointing to this thread?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiaTfQACgkQ84KuGfSFAYCSOgCfbXBshx8qxuNGqq4b1XrFXWMM
3d4AoIGeog8Mav1XA67JcrxJS5JtQHZQ
=KlL+
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]