configure: Only enable -gdwarf-2 if -g was specified.

This commit is contained in:
Alexandre Julliard 2012-08-23 12:28:41 +02:00
parent dbf1c83632
commit ce48e2c8ab
2 changed files with 16 additions and 5 deletions

11
configure vendored
View File

@ -12287,7 +12287,10 @@ $as_echo "$ac_cv_cflags__Wwrite_strings" >&6; }
if test $ac_cv_cflags__Wwrite_strings = yes; then : if test $ac_cv_cflags__Wwrite_strings = yes; then :
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings" EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
fi 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; } $as_echo_n "checking whether the compiler supports -gdwarf-2... " >&6; }
if ${ac_cv_cflags__gdwarf_2+:} false; then : if ${ac_cv_cflags__gdwarf_2+:} false; then :
$as_echo_n "(cached) " >&6 $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 : if test $ac_cv_cflags__gdwarf_2 = yes; then :
EXTRACFLAGS="$EXTRACFLAGS -gdwarf-2" EXTRACFLAGS="$EXTRACFLAGS -gdwarf-2"
fi 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; } $as_echo_n "checking whether the compiler supports -gstrict-dwarf... " >&6; }
if ${ac_cv_cflags__gstrict_dwarf+:} false; then : if ${ac_cv_cflags__gstrict_dwarf+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
@ -12336,7 +12339,9 @@ fi
$as_echo "$ac_cv_cflags__gstrict_dwarf" >&6; } $as_echo "$ac_cv_cflags__gstrict_dwarf" >&6; }
if test $ac_cv_cflags__gstrict_dwarf = yes; then : if test $ac_cv_cflags__gstrict_dwarf = yes; then :
EXTRACFLAGS="$EXTRACFLAGS -gstrict-dwarf" EXTRACFLAGS="$EXTRACFLAGS -gstrict-dwarf"
fi fi ;;
esac
done
case $host_cpu in case $host_cpu in
*i[3456789]86*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-omit-frame-pointer" >&5 *i[3456789]86*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -fno-omit-frame-pointer" >&5

View File

@ -1748,8 +1748,14 @@ then
WINE_TRY_CFLAGS([-Wtype-limits]) WINE_TRY_CFLAGS([-Wtype-limits])
WINE_TRY_CFLAGS([-Wunused-but-set-parameter]) WINE_TRY_CFLAGS([-Wunused-but-set-parameter])
WINE_TRY_CFLAGS([-Wwrite-strings]) 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 dnl gcc-4.6+ omits frame pointers by default, breaking some copy protections
case $host_cpu in case $host_cpu in