aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.ac
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-10-16 11:37:26 +0100
committerNick Clifton <nickc@redhat.com>2020-10-16 11:37:26 +0100
commit23ae20f5e3afeeab9aa616c63ab3b357668476d5 (patch)
tree77fe952d842fc8b8f4a0efccbc006686a3b05e77 /ld/configure.ac
parent472d09c18a750f483ad974991f4f35ede3dfb10b (diff)
downloadgdb-23ae20f5e3afeeab9aa616c63ab3b357668476d5.zip
gdb-23ae20f5e3afeeab9aa616c63ab3b357668476d5.tar.gz
gdb-23ae20f5e3afeeab9aa616c63ab3b357668476d5.tar.bz2
Add a new option to the linker: --error-handling-script=<NAME>. Run the script <NAME> if an undefined symbol or unfound library error is encountered.
PR 26626 * ldmain.c (undefined_symbol): If an error handlign script is available, call it. * ldfile.c (error_handling_script): Declare. (ldfile_open_file): If a library cannot be found and an error handling script is available, call it. * ldmain.h (error_handling_script): Prototype. * ldlex.h (OPTION_ERROR_HANDLING_SCRIPT): Define. * lexsup.c (ld_options): Add --error-handling-script. (parse_args): Add support for --errror-handling-script. * ld.texi: Document the new feature. * configure.ac: Add --error-handling-script option to disable support for the new feature. * NEWS: Mention the new feature. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'ld/configure.ac')
-rw-r--r--ld/configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/ld/configure.ac b/ld/configure.ac
index 74bcdfe..7676009 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -195,6 +195,16 @@ AC_ARG_ENABLE(separate-code,
no) ac_default_ld_z_separate_code=0 ;;
esac])
+# Decide if --error-handling-script should be supported.
+ac_support_error_handling_script=unset
+AC_ARG_ENABLE(error-handling-script,
+ AS_HELP_STRING([--enable-error-handling-script],
+ [enable/disable support for the --error-handling-script option]),
+[case "${enableval}" in
+ yes) ac_support_error_handling_script=1 ;;
+ no) ac_support_error_handling_script=0 ;;
+esac])
+
# Decide which "--hash-style" to use by default
# Provide a configure time option to override our default.
AC_ARG_ENABLE([default-hash-style],
@@ -489,6 +499,13 @@ AC_DEFINE_UNQUOTED(DEFAULT_LD_Z_SEPARATE_CODE,
$ac_default_ld_z_separate_code,
[Define to 1 if you want to enable -z separate-code in ELF linker by default.])
+if test "${ac_support_error_handling_script}" = unset; then
+ ac_support_error_handling_script=1
+fi
+AC_DEFINE_UNQUOTED(SUPPORT_ERROR_HANDLING_SCRIPT,
+ $ac_support_error_handling_script,
+ [Define to 1 if you want to support the --error-handling-script command line option.])
+
AC_DEFINE_UNQUOTED([DEFAULT_EMIT_SYSV_HASH],
[$ac_default_emit_sysv_hash],
[Define to 1 if you want to emit sysv hash in the ELF linker by default.])