summaryrefslogtreecommitdiff
path: root/xorg-macros.m4.in
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2009-06-08 14:17:06 +0100
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-06-09 06:33:45 -0700
commitb885bb59ec23bb338c8df68e40c6ef2c2a9325cc (patch)
treedb1ef1d25648552c8584bed681969354aec8e63b /xorg-macros.m4.in
parent21a957428aa69b03f585378dc6e70ad9f5c513c6 (diff)
Use correct CWARNFLAGS when cross compiling
Rather than checking the version of some random gcc which happens to be in the path to determine which warning flags are supported, we should check the gcc we are going to use for the build For example, when cross-compiling, if the host gcc is >= 3.4 but the cross-compiler gcc is not, this will cause unsupported warning flags to be used This seems to work, but I don't know enough autofoolery to be sure this is right... Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'xorg-macros.m4.in')
-rw-r--r--xorg-macros.m4.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 80216e2..bcf8c44 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -442,7 +442,7 @@ if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
-Wbad-function-cast"
- case `gcc -dumpversion` in
+ case `$CC -dumpversion` in
3.4.* | 4.*)
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
;;