Alexandre Julliard : configure: Only enable -gdwarf-2 if -g was specified.
Alexandre Julliard
julliard at winehq.org
Thu Aug 23 15:19:19 CDT 2012
Module: wine
Branch: master
Commit: ce48e2c8ab4537fb57e4416d03f6fdd0685262b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ce48e2c8ab4537fb57e4416d03f6fdd0685262b8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Aug 23 12:28:41 2012 +0200
configure: Only enable -gdwarf-2 if -g was specified.
---
configure | 11 ++++++++---
configure.ac | 10 ++++++++--
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index d067b54..29b50e8 100755
--- a/configure
+++ b/configure
@@ -12287,7 +12287,10 @@ $as_echo "$ac_cv_cflags__Wwrite_strings" >&6; }
if test $ac_cv_cflags__Wwrite_strings = yes; then :
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gdwarf-2" >&5
+
+ for ac_flag in $CFLAGS; do
+ case $ac_flag in
+ -g) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gdwarf-2" >&5
$as_echo_n "checking whether the compiler supports -gdwarf-2... " >&6; }
if ${ac_cv_cflags__gdwarf_2+:} false; then :
$as_echo_n "(cached) " >&6
@@ -12312,7 +12315,7 @@ $as_echo "$ac_cv_cflags__gdwarf_2" >&6; }
if test $ac_cv_cflags__gdwarf_2 = yes; then :
EXTRACFLAGS="$EXTRACFLAGS -gdwarf-2"
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstrict-dwarf" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -gstrict-dwarf" >&5
$as_echo_n "checking whether the compiler supports -gstrict-dwarf... " >&6; }
if ${ac_cv_cflags__gstrict_dwarf+:} false; then :
$as_echo_n "(cached) " >&6
@@ -12336,7 +12339,9 @@ fi
$as_echo "$ac_cv_cflags__gstrict_dwarf" >&6; }
if test $ac_cv_cflags__gstrict_dwarf = yes; then :
EXTRACFLAGS="$EXTRACFLAGS -gstrict-dwarf"
-fi
+fi ;;
+ esac
+ done
case $host_cpu in
*i[3456789]86*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-omit-frame-pointer" >&5
diff --git a/configure.ac b/configure.ac
index 15ada86..a6be56f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1748,8 +1748,14 @@ then
WINE_TRY_CFLAGS([-Wtype-limits])
WINE_TRY_CFLAGS([-Wunused-but-set-parameter])
WINE_TRY_CFLAGS([-Wwrite-strings])
- WINE_TRY_CFLAGS([-gdwarf-2])
- WINE_TRY_CFLAGS([-gstrict-dwarf])
+
+ dnl Default to dwarf-2 debug info
+ for ac_flag in $CFLAGS; do
+ case $ac_flag in
+ -g) WINE_TRY_CFLAGS([-gdwarf-2])
+ WINE_TRY_CFLAGS([-gstrict-dwarf]) ;;
+ esac
+ done
dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections
case $host_cpu in
More information about the wine-cvs
mailing list