Serge <sergem...@gmail.com> writes: > Or you mean that they should run `gcc`/`g++` with CPPFLAGS?
Yes. > If you do, then... How should they do that? I.e. if I specify: > CPPFLAGS="blablabla hehehe hohoho" > How should build system run gcc? Like that? > gcc blablabla hehehe hohoho -c test.o test.c Yes. > Is there a standard common for all the build systems? Or some kind of > recommendation? Or it's just a coincidence that all the build systems > use same environment variable CFLAGS? CFLAGS is an old, long-standing make thing. CPPFLAGS is newer and I believe was introduced by Autoconf, since Autoconf has historically wanted to run tests that only use the preprocessor and not the compiler (for checking header files, for example), at which point it needed some way of distinguishing between the flags. GNU software and other software that closely follows the Autoconf and Automake manuals uses a similar separation, and it's important to follow that separation when passing flags to configure to handle tests where just the preprocessor is run. (If, for example, you put the -I flags in CFLAGS and not CPPFLAGS, you may find that Autoconf probes won't find header files that are on non-standard -I paths.) Since the Autoconf/Automake variable naming is the closest we have to a de facto standard (and is *extremely* widespread in free software), the variable names for the dpkg build infrastructure followed the same conventions. -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87bok9vf44....@windlord.stanford.edu