configure: Allow specifying cross debug format.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
942e298308
commit
8e051c5802
|
@ -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
|
||||
|
||||
|
||||
if test -z "$CROSSDEBUG"
|
||||
then
|
||||
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
|
||||
-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
|
||||
|
@ -10583,9 +10594,39 @@ fi
|
|||
$as_echo "$ac_cv_crosscflags__gstrict_dwarf" >&6; }
|
||||
if test "x$ac_cv_crosscflags__gstrict_dwarf" = xyes; then :
|
||||
EXTRACROSSCFLAGS="$EXTRACROSSCFLAGS -gstrict-dwarf"
|
||||
fi ;;
|
||||
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
|
||||
done
|
||||
|
||||
if test "x$enable_werror" = "xyes"
|
||||
then
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -1100,13 +1100,23 @@ then
|
|||
WINE_TRY_CROSSCFLAGS([-Wnonnull]) ;;
|
||||
esac
|
||||
|
||||
dnl Default to dwarf-2 debug info
|
||||
dnl Determine debug info format
|
||||
AC_SUBST(CROSSDEBUG)
|
||||
if test -z "$CROSSDEBUG"
|
||||
then
|
||||
for ac_flag in $CROSSCFLAGS; do
|
||||
case $ac_flag in
|
||||
-g) WINE_TRY_CROSSCFLAGS([-gdwarf-2])
|
||||
WINE_TRY_CROSSCFLAGS([-gstrict-dwarf]) ;;
|
||||
-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
|
||||
|
|
Loading…
Reference in New Issue