bug-autoconf
[Top][All Lists]
Advanced

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

meaning of CFLAGS


From: Bruno Haible
Subject: meaning of CFLAGS
Date: Thu, 20 Jul 2006 16:08:41 +0200
User-agent: KMail/1.9.1

Hi,

The autoconf manual describes CFLAGS like this:

   "Variable: CFLAGS
     Debugging and optimization options for the C compiler.  If it is
     not set in the environment when `configure' runs, the default
     value is set when you call `AC_PROG_CC' (or empty if you don't).
     `configure' uses this variable when compiling programs to test for
     C features."

Based on this text, in a Makefile.in of mine, I use CFLAGS for .c to .o
compilation, but not for linking. Because debugging and optimization
flags are useless for linking.

But the GNU standards say:
   "`CFLAGS' should be used in every invocation of the C compiler, both
    those which do compilation and those which do linking."

Now it makes a difference. A user on Solaris/x86_64 tried to use

   CC=cc CFLAGS=-xarch=amd64

and it didn't work with my Makefile.in. Is the user supposed to use such
setting? Or does he need to use

   CC="cc -xarch=amd64"

?

Bruno




reply via email to

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