Commit 8e051c58 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

configure: Allow specifying cross debug format.

parent 942e2983
......@@ -69,6 +69,7 @@ CONVERT = @CONVERT@
ICOTOOL = @ICOTOOL@
MSGFMT = @MSGFMT@
CROSSTARGET = @CROSSTARGET@
CROSSDEBUG = @CROSSDEBUG@
SUBDIRS = @SUBDIRS@
RUNTESTFLAGS = -q -P wine
MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
......
......@@ -705,6 +705,7 @@ X_PRE_LIBS
X_CFLAGS
XMKMF
PTHREAD_LIBS
CROSSDEBUG
DELAYLOADFLAG
CROSSLDFLAGS
EXTRACROSSCFLAGS
......@@ -10520,9 +10521,19 @@ if test "x$ac_cv_crosscflags__Wnonnull" = xyes; then :
fi ;;
esac
for ac_flag in $CROSSCFLAGS; do
case $ac_flag in
-g) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -gdwarf-2" >&5
if test -z "$CROSSDEBUG"
then
for ac_flag in $CROSSCFLAGS; do
case $ac_flag in
-gdwarf*) CROSSDEBUG=dwarf ;;
-gcodeview) CROSSDEBUG=pdb ;;
-g) CROSSDEBUG=${CROSSDEBUG:-dwarf} ;;
esac
done
fi
case $CROSSDEBUG in
*dwarf) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -gdwarf-2" >&5
$as_echo_n "checking whether the cross-compiler supports -gdwarf-2... " >&6; }
if ${ac_cv_crosscflags__gdwarf_2+:} false; then :
$as_echo_n "(cached) " >&6
......@@ -10553,7 +10564,7 @@ $as_echo "$ac_cv_crosscflags__gdwarf_2" >&6; }
if test "x$ac_cv_crosscflags__gdwarf_2" = xyes; then :
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -gdwarf-2"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -gstrict-dwarf" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -gstrict-dwarf" >&5
$as_echo_n "checking whether the cross-compiler supports -gstrict-dwarf... " >&6; }
if ${ac_cv_crosscflags__gstrict_dwarf+:} false; then :
$as_echo_n "(cached) " >&6
......@@ -10584,8 +10595,38 @@ $as_echo "$ac_cv_crosscflags__gstrict_dwarf" >&6; }
if test "x$ac_cv_crosscflags__gstrict_dwarf" = xyes; then :
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -gstrict-dwarf"
fi ;;
esac
done
pdb) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the cross-compiler supports -gcodeview" >&5
$as_echo_n "checking whether the cross-compiler supports -gcodeview... " >&6; }
if ${ac_cv_crosscflags__gcodeview+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_wine_try_cflags_saved=$CFLAGS
ac_wine_try_cflags_saved_cc=$CC
ac_wine_try_cflags_saved_exeext=$ac_exeext
CFLAGS="$CFLAGS $EXTRACROSSCFLAGS -nostartfiles -nodefaultlibs -gcodeview"
CC="$CROSSCC"
ac_exeext=".exe"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int __cdecl mainCRTStartup(void) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_crosscflags__gcodeview=yes
else
ac_cv_crosscflags__gcodeview=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
CC=$ac_wine_try_cflags_saved_cc
ac_exeext=$ac_wine_try_cflags_saved_exeext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crosscflags__gcodeview" >&5
$as_echo "$ac_cv_crosscflags__gcodeview" >&6; }
if test "x$ac_cv_crosscflags__gcodeview" = xyes; then :
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -gcodeview"
fi ;;
esac
if test "x$enable_werror" = "xyes"
then
......
......@@ -1100,13 +1100,23 @@ then
WINE_TRY_CROSSCFLAGS([-Wnonnull]) ;;
esac
dnl Default to dwarf-2 debug info
for ac_flag in $CROSSCFLAGS; do
case $ac_flag in
-g) WINE_TRY_CROSSCFLAGS([-gdwarf-2])
WINE_TRY_CROSSCFLAGS([-gstrict-dwarf]) ;;
esac
done
dnl Determine debug info format
AC_SUBST(CROSSDEBUG)
if test -z "$CROSSDEBUG"
then
for ac_flag in $CROSSCFLAGS; do
case $ac_flag in
-gdwarf*) CROSSDEBUG=dwarf ;;
-gcodeview) CROSSDEBUG=pdb ;;
-g) CROSSDEBUG=${CROSSDEBUG:-dwarf} ;;
esac
done
fi
case $CROSSDEBUG in
*dwarf) WINE_TRY_CROSSCFLAGS([-gdwarf-2])
WINE_TRY_CROSSCFLAGS([-gstrict-dwarf]) ;;
pdb) WINE_TRY_CROSSCFLAGS([-gcodeview]) ;;
esac
if test "x$enable_werror" = "xyes"
then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment