[Xorg-driver-geode] [PATCH 10/12] Remove duplicate warning variable and werror option
Gaetan Nadon
memsize at videotron.ca
Thu Nov 17 10:45:26 PST 2011
Use already existing:
--enable-strict-compilation
Enable all warnings from compiler and make them
errors (default: disabled)
which, byt the way was broken as it was not implemented in geode.
Use already existing CWARNINGFLAGS variable, so there is no need
to define GCC_WARNINGS.
Both come from util-macros version 1.4 or later.
http://cgit.freedesktop.org/xorg/util/macros/tree/xorg-macros.m4.in
?id=03b04a6b5d61aafbd2705f7d29e58e0c92553a4a
If you configure with a later version of util-macros you may see new
warnings appear as additional flags have been added over the years.
You get better support for platforms/compiler differences.
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
configure.ac | 15 ---------------
src/Makefile.am | 10 +++++++---
ztv/Makefile.am | 2 +-
3 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0b4045d..ec4f87e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,10 +60,6 @@ AC_ARG_ENABLE(geodegx-panel,
[ ],
[ AMD_CFLAGS="-DPNL_SUP $AMD_CFLAGS" ])
-AC_ARG_ENABLE(werror, AC_HELP_STRING([--enable-werror],
- [Treat warnings as errors (default: disabled)]),
- [WERROR=$enableval], [WERROR=no])
-
# Define a configure option to enable/disable ztv
AC_ARG_ENABLE(ztv,
AS_HELP_STRING([--enable-ztv],
@@ -85,17 +81,6 @@ if test "x$ztv" != "xno" ; then
fi
AM_CONDITIONAL(BUILD_ZTV, [test "x$BUILD_ZTV" = xyes])
-if test "x$GCC" = "xyes"; then
- GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes"
- GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations"
- GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing"
- GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3"
- if test "x$WERROR" = "xyes"; then
- GCC_WARNINGS="${GCC_WARNINGS} -Werror"
- fi
- AMD_CFLAGS="$GCC_WARNINGS $AMD_CFLAGS"
-fi
-
# Checks for extensions
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
diff --git a/src/Makefile.am b/src/Makefile.am
index d940365..6843dc5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -32,9 +32,13 @@ AM_CPPFLAGS = \
# -DPNL_SUP is now provided by AMD_CFLAGS
#
-AM_CFLAGS = @XORG_CFLAGS@ \
- -DHAVE_GX -DHAVE_LX -DOPT_ACCEL \
- @AMD_CFLAGS@
+AM_CFLAGS = \
+ $(XORG_CFLAGS) \
+ $(CWARNFLAGS) \
+ $(AMD_CFLAGS) \
+ -DHAVE_GX \
+ -DHAVE_LX \
+ -DOPT_ACCEL
geode_drv_la_LTLIBRARIES = geode_drv.la
geode_drv_la_LDFLAGS = -module -avoid-version
diff --git a/ztv/Makefile.am b/ztv/Makefile.am
index f4aaf1b..4e7b587 100644
--- a/ztv/Makefile.am
+++ b/ztv/Makefile.am
@@ -1,7 +1,7 @@
if BUILD_ZTV
-AM_CFLAGS = $(XORG_CFLAGS) $(AMD_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) $(AMD_CFLAGS)
ztv_drv_la_LTLIBRARIES = ztv_drv.la
ztv_drv_la_LDFLAGS = -module -avoid-version
--
1.7.4.1
More information about the Xorg-driver-geode
mailing list