[PATCH video-modesetting 12/14] make: add all warnings according to the platform

Gaetan Nadon memsize at videotron.ca
Sun Feb 19 05:36:17 PST 2012


The current code only adds -Wall and only for gcc.
Automake reserves the use of CPPFLAGS for the user to override
on the command line.
This also breaks the option --enable-strict-compilation

The variable CWARNFLAGS contains the complete set of warnings
and is platform sensitive.

Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac    |    4 ----
 src/Makefile.am |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index a2488f2..610c043 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,10 +45,6 @@ AM_MAINTAINER_MODE
 AC_DISABLE_STATIC
 AC_PROG_LIBTOOL
 
-if test "x$GCC" = "xyes"; then
-        CPPFLAGS="$CPPFLAGS -Wall"
-fi
-
 AH_TOP([#include "xorg-server.h"])
 
 AC_ARG_WITH(xorg-module-dir,
diff --git a/src/Makefile.am b/src/Makefile.am
index 40ebf0a..68a63fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,7 +24,7 @@
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
 
-AM_CFLAGS = @XORG_CFLAGS@ @DRM_CFLAGS@ @UDEV_CFLAGS@
+AM_CFLAGS = $(XORG_CFLAGS) $(DRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS)
 
 modesetting_drv_la_LTLIBRARIES = modesetting_drv.la
 modesetting_drv_la_LDFLAGS = -module -avoid-version
-- 
1.7.5.4



More information about the xorg-devel mailing list