mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
gdb: more guile 2.0 support removal
Commit f14bbacae0 ("gdb/guile: remove support for Guile < 2.2")
removed some code supporting Guile 2.0. This patch removes more bits
related to Guile 2.0, and adds a NEWS entry.
* Remove Guile 2.0 mention from the doc.
* Remove HAVE_GUILE_MANUAL_FINALIZATION, assume it is always true.
* Remove guile-2.0 from the versions automatically tried by configure.
* Remove check for scm_new_smob (HAVE_SCM_NEW_SMOB), assume it is
always true.
* Remove hack to fill ac_cv_guild_program_name when the .pc file
wouldn't specify it.
Tested by rebuilding against guile-3.0 and guile-2.2.
Change-Id: I2e89bcd4a4429262f4c3a1c74b275768e60f0cb0
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
This commit is contained in:
parent
8eeed95625
commit
7f5aab361d
9 changed files with 9 additions and 125 deletions
2
gdb/NEWS
2
gdb/NEWS
|
|
@ -6,6 +6,8 @@
|
|||
* Support for .gdb_index sections with version less than 7 has been
|
||||
removed.
|
||||
|
||||
* Support for Guile 2.0 has been removed.
|
||||
|
||||
* GDB now accepts --no-escape-args as an alternative to --args on the
|
||||
command line. GDB will not escape special shell characters within
|
||||
arguments after --no-escape-args.
|
||||
|
|
|
|||
|
|
@ -267,17 +267,7 @@ dnl similar to Guile's 'GUILE_PROGS' macro.)
|
|||
AC_DEFUN([GDB_GUILE_PROGRAM_NAMES], [
|
||||
AC_CACHE_CHECK([for the absolute file name of the 'guild' command],
|
||||
[ac_cv_guild_program_name],
|
||||
[ac_cv_guild_program_name="`$1 --variable guild $2`"
|
||||
|
||||
# In Guile up to 2.0.11 included, guile-2.0.pc would not define
|
||||
# the 'guild' and 'bindir' variables. In that case, try to guess
|
||||
# what the program name is, at the risk of getting it wrong if
|
||||
# Guile was configured with '--program-suffix' or similar.
|
||||
if test "x$ac_cv_guild_program_name" = "x"; then
|
||||
guile_exec_prefix="`$1 --variable exec_prefix $2`"
|
||||
ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
|
||||
fi
|
||||
])
|
||||
[ac_cv_guild_program_name="`$1 --variable guild $2`"])
|
||||
|
||||
if ! "$ac_cv_guild_program_name" --version >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
|
||||
AC_MSG_ERROR(['$ac_cv_guild_program_name' appears to be unusable])
|
||||
|
|
|
|||
|
|
@ -238,9 +238,6 @@
|
|||
/* Define if Guile interpreter is being linked in. */
|
||||
#undef HAVE_GUILE
|
||||
|
||||
/* Define if Guile supports manual finalization. */
|
||||
#undef HAVE_GUILE_MANUAL_FINALIZATION
|
||||
|
||||
/* Define if you have the iconv() function and it works. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
|
|
@ -421,9 +418,6 @@
|
|||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
|
||||
/* Define to 1 if you have the `scm_new_smob' function. */
|
||||
#undef HAVE_SCM_NEW_SMOB
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
|
|
|
|||
74
gdb/configure
vendored
74
gdb/configure
vendored
|
|
@ -28818,7 +28818,7 @@ fi
|
|||
|
||||
|
||||
|
||||
try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
|
||||
try_guile_versions="guile-3.0 guile-2.2"
|
||||
have_libguile=no
|
||||
case "${with_guile}" in
|
||||
no)
|
||||
|
|
@ -28886,14 +28886,6 @@ else
|
|||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
|
||||
if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
LIBS=$save_LIBS
|
||||
if test "${found_usable_guile}" = no; then
|
||||
|
|
@ -28970,14 +28962,6 @@ else
|
|||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
|
||||
if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
LIBS=$save_LIBS
|
||||
if test "${found_usable_guile}" = no; then
|
||||
|
|
@ -29051,14 +29035,6 @@ else
|
|||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
|
||||
if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
LIBS=$save_LIBS
|
||||
if test "${found_usable_guile}" = no; then
|
||||
|
|
@ -29078,7 +29054,7 @@ $as_echo "${found_usable_guile}" >&6; }
|
|||
fi
|
||||
;;
|
||||
"" | */*)
|
||||
# Disallow --with=guile="" and --with-guile=foo/bar.
|
||||
# Disallow --with-guile="" and --with-guile=foo/bar.
|
||||
as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
|
||||
;;
|
||||
*)
|
||||
|
|
@ -29142,14 +29118,6 @@ else
|
|||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
|
||||
if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
LIBS=$save_LIBS
|
||||
if test "${found_usable_guile}" = no; then
|
||||
|
|
@ -29177,16 +29145,6 @@ if ${ac_cv_guild_program_name+:} false; then :
|
|||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
|
||||
|
||||
# In Guile up to 2.0.11 included, guile-2.0.pc would not define
|
||||
# the 'guild' and 'bindir' variables. In that case, try to guess
|
||||
# what the program name is, at the risk of getting it wrong if
|
||||
# Guile was configured with '--program-suffix' or similar.
|
||||
if test "x$ac_cv_guild_program_name" = "x"; then
|
||||
guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
|
||||
ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
|
||||
$as_echo "$ac_cv_guild_program_name" >&6; }
|
||||
|
|
@ -29207,16 +29165,6 @@ if ${ac_cv_guild_program_name+:} false; then :
|
|||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
|
||||
|
||||
# In Guile up to 2.0.11 included, guile-2.0.pc would not define
|
||||
# the 'guild' and 'bindir' variables. In that case, try to guess
|
||||
# what the program name is, at the risk of getting it wrong if
|
||||
# Guile was configured with '--program-suffix' or similar.
|
||||
if test "x$ac_cv_guild_program_name" = "x"; then
|
||||
guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
|
||||
ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
|
||||
fi
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
|
||||
$as_echo "$ac_cv_guild_program_name" >&6; }
|
||||
|
|
@ -29272,24 +29220,6 @@ $as_echo "#define HAVE_GUILE 1" >>confdefs.h
|
|||
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
|
||||
CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
|
||||
ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
|
||||
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="$GUILE_LIBS"
|
||||
CPPFLAGS="$GUILE_CPPFLAGS"
|
||||
for ac_func in scm_new_smob
|
||||
do :
|
||||
ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
|
||||
if test "x$ac_cv_func_scm_new_smob" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_SCM_NEW_SMOB 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
LIBS="$save_LIBS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
else
|
||||
# Even if Guile support is not compiled in, we need to have these files
|
||||
# included.
|
||||
|
|
|
|||
|
|
@ -1144,11 +1144,6 @@ AC_DEFUN([AC_TRY_LIBGUILE],
|
|||
GUILE_CPPFLAGS=$new_CPPFLAGS
|
||||
GUILE_LIBS=$new_LIBS],
|
||||
[found_usable_guile=no])
|
||||
dnl scm_set_automatic_finalization_enabled added in Guile 2.2.
|
||||
AC_CHECK_FUNC(scm_set_automatic_finalization_enabled,
|
||||
AC_DEFINE(HAVE_GUILE_MANUAL_FINALIZATION, 1,
|
||||
[Define if Guile supports manual finalization.])
|
||||
)
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
LIBS=$save_LIBS
|
||||
if test "${found_usable_guile}" = no; then
|
||||
|
|
@ -1170,7 +1165,7 @@ dnl fall back to "no".
|
|||
dnl guile-version [guile-version-choice-2 ...] -
|
||||
dnl A space-separated list of guile package versions to try.
|
||||
dnl These are passed to pkg-config as-is.
|
||||
dnl E.g., guile-2.0 or guile-2.2-uninstalled
|
||||
dnl E.g., guile-3.0 or guile-2.2-uninstalled
|
||||
dnl This requires making sure PKG_CONFIG_PATH is set appropriately.
|
||||
dnl /path/to/pkg-config -
|
||||
dnl Use this pkg-config program.
|
||||
|
|
@ -1192,7 +1187,7 @@ AC_MSG_RESULT([$with_guile])
|
|||
dnl We check guile with pkg-config.
|
||||
AC_PATH_PROG(pkg_config_prog_path, pkg-config, missing)
|
||||
|
||||
try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
|
||||
try_guile_versions="guile-3.0 guile-2.2"
|
||||
have_libguile=no
|
||||
case "${with_guile}" in
|
||||
no)
|
||||
|
|
@ -1219,7 +1214,7 @@ yes)
|
|||
fi
|
||||
;;
|
||||
"" | */*)
|
||||
# Disallow --with=guile="" and --with-guile=foo/bar.
|
||||
# Disallow --with-guile="" and --with-guile=foo/bar.
|
||||
AC_MSG_ERROR([invalid value for --with-guile])
|
||||
;;
|
||||
*)
|
||||
|
|
@ -1258,15 +1253,6 @@ if test "${have_libguile}" != no; then
|
|||
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
|
||||
CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
|
||||
ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
|
||||
|
||||
dnl The 'scm_new_smob' function appeared in Guile 2.0.6.
|
||||
save_LIBS="$LIBS"
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
LIBS="$GUILE_LIBS"
|
||||
CPPFLAGS="$GUILE_CPPFLAGS"
|
||||
AC_CHECK_FUNCS([scm_new_smob])
|
||||
LIBS="$save_LIBS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
else
|
||||
# Even if Guile support is not compiled in, we need to have these files
|
||||
# included.
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ Guile support in @value{GDBN} follows the Python support in @value{GDBN}
|
|||
reasonably closely, so concepts there should carry over.
|
||||
However, some things are done differently where it makes sense.
|
||||
|
||||
@value{GDBN} requires Guile version 3.0, 2.2, or 2.0.
|
||||
@value{GDBN} requires Guile version 3.0, 2.2.
|
||||
|
||||
@cindex guile scripts directory
|
||||
Guile scripts used by @value{GDBN} should be installed in
|
||||
|
|
|
|||
|
|
@ -156,18 +156,6 @@ struct scheme_integer_constant
|
|||
#define gdbscm_is_false(scm) scm_is_eq ((scm), SCM_BOOL_F)
|
||||
#define gdbscm_is_true(scm) (!gdbscm_is_false (scm))
|
||||
|
||||
#ifndef HAVE_SCM_NEW_SMOB
|
||||
|
||||
/* Guile <= 2.0.5 did not provide this function, so provide it here. */
|
||||
|
||||
static inline SCM
|
||||
scm_new_smob (scm_t_bits tc, scm_t_bits data)
|
||||
{
|
||||
SCM_RETURN_NEWSMOB (tc, data);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Function name that is passed around in case an error needs to be reported.
|
||||
__func is in C99, but we provide a wrapper "just in case",
|
||||
and because FUNC_NAME is the canonical value used in guile sources.
|
||||
|
|
|
|||
|
|
@ -633,9 +633,7 @@ call_initialize_gdb_module (void *data)
|
|||
performed within the desired module. */
|
||||
scm_c_define_module (gdbscm_module_name, initialize_gdb_module, NULL);
|
||||
|
||||
#if HAVE_GUILE_MANUAL_FINALIZATION
|
||||
scm_run_finalizers ();
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -651,12 +649,10 @@ gdbscm_initialize (const struct extension_language_defn *extlang)
|
|||
Python side to define module "gdb" which imports "_gdb". There is
|
||||
evidently no similar convention in Guile so we skip this. */
|
||||
|
||||
#if HAVE_GUILE_MANUAL_FINALIZATION
|
||||
/* Our SMOB free functions are not thread-safe, as GDB itself is not
|
||||
intended to be thread-safe. Disable automatic finalization so that
|
||||
finalizers aren't run in other threads. */
|
||||
scm_set_automatic_finalization_enabled (0);
|
||||
#endif
|
||||
|
||||
/* Before we initialize Guile, block signals needed by gdb (especially
|
||||
SIGCHLD). This is done so that all threads created during Guile
|
||||
|
|
|
|||
|
|
@ -155,9 +155,7 @@ gdbscm_with_catch (void *data)
|
|||
d->unwind_handler, d,
|
||||
d->pre_unwind_handler, d);
|
||||
|
||||
#if HAVE_GUILE_MANUAL_FINALIZATION
|
||||
scm_run_finalizers ();
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue