how to set CFLAGS variable for compiling Xorg

Peter Breitenlohner peb at
Wed Nov 5 05:29:15 PST 2008

On Wed, 5 Nov 2008, Julien Cristau wrote:

>> this very same problem occurs in many (most?) modules. If you'd apply them I
>> could prepare patches for that (against current git).
>> There are, however, two or three related problems that maybe should be
>> addressed at the same time.
>> (1) In order to further ansification, IMHO all modules should use the gcc
>> warning flags. Paulo Cesar Pereira de Andrade has even suggested to enhance
>> them with -Wdeclaration-after-statement, -Wold-style-definition,
>> and -Wbad-function-cast, that could be done unconditionally or conditionally
>> (via --enable-extra-warnings). I have prepared some patches for that, but
>> they butcher CFLAGS and need to be revised.
>> These additional warnings are extremely useful to find non-ansi declarations
>> and related problems.
> This should probably go somewhere in xorg-macros.m4, so we get a
> consistent set of warnings for all modules.

Hi Julien,

the very same thing has also proposed by Paulo and we discussed it.  First
one would, however, need some sort of agreement how exactly to proceed. 
Then this (and maybe the rule to regenerate ChangeLog) should indeed go into
xorg-macros.m4 V >= 1.1.7, but unless we can get such an animal quickly (say
within <= approx. 1 week), we need an interim solution.

>> (2) You have applied a patch that avoids the need for AM_PROG_CC_C_O in some
>> modules, but there are still plenty of modules needing that (and some others
>> really do need AM_PROG_CC_C_O).
> Is that much of a problem?  I removed it from some modules where it
> wasn't needed, but I don't care much.

Having a superfluous AM_PROG_CC_C_O is no problem. The problem occurs when
AM_PROG_CC_C_O is needed but missing.  Without AM_PROG_CC_C_O autoreconf
doesn't install compile and automake-1.10 later complains (something like
install this file manually by 'automake --add-missing').  In any case the
automatic build process fails.  I have seen this in several modules.

>> (3) The ChangeLog hook has to be revised in practically every module:
>> 	(a) replace 'git-log' by 'git log' because git-log was deprecated
>> 	in git-1.5.x and removed from PATH in git-1.6.x
To be precise: practically all git-CMD have disappeared from PATH.
>> 	(b) "(GIT_DIR=....; rm -f .changelog.tmp)" will always succeed and
>> 	consequently the second part "(touch ChangeLog...)" never be
>> 	executed. IMHO the rule should read
>> 	"(GIT_DIR=....) || (rm -f .changelog.tmp; touch ChangeLog...)"
> ugh.  :(

> I can't promise to apply them quickly, but I'll try, time permitting.

Fair enough.

> Probably need to get some agreement on which warning flags to enable on
> the list first, though.

Indeed, please do.


More information about the xorg mailing list