[PATCH] Separate CFLAGS and CPPFLAGS

Lutz Jaenicke Lutz.Jaenicke at aet.TU-Cottbus.DE
Thu Dec 7 20:00:32 EST 2000


On Thu, Dec 07, 2000 at 03:03:57PM +1100, Damien Miller wrote:
> On Wed, 6 Dec 2000 mouring at etoh.eviladmin.org wrote:
> > If anyone knows a better way or sees a problem with it.. Let me know.  If
> > I don't hear anything I'll apply it in a few days.

>  *-*-hpux10*)
>         if test -z "$GCC"; then
> -               CFLAGS="$CFLAGS -Ae"
> +               CPPFLAGS="$CPPFLAGS -Ae"
>         fi
> 
> Is Ae a c or cpp flag?

Seems I have to download the latest snapshot and look myself.

CFLAGS are flags passed to the C-compiler, influencing its standard version,
optimization and/or debugging feature.

CPPFLAGS are traditionally flags only needed for the C-preprocessor.
Depending on the package I have seen scripts using the C-preprocessor
directly (invoked as cpp), so CPPFLAGS should only contain flags typically
understood by C-preprocessors: That is -I and -D (there are others like
-U, but I have never seen them in practice :-).
(*) Modern versions tend to use "cc -E" to call the preprocessor.

Having this said, -Ae switches the C-compiler to ANSI mode (with some
extensions), hence this clearly belongs to CFLAGS.

My standard way of configuring packages using "autoconf"-style configure
scripts (I have a standard /usr/local instead of /opt/packagename setup):
CC=cc CFLAGS="-Ae -O +DAportable" CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure
This is how I use CFLAGS and CPPFLAGS and as far as I have experienced while
porting packages, this seems to match the expectations :-)

Best regards,
	Lutz
-- 
Lutz Jaenicke                             Lutz.Jaenicke at aet.TU-Cottbus.DE
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153





More information about the openssh-unix-dev mailing list