diff options
author | Nick Clifton <nickc@redhat.com> | 2020-10-16 11:37:26 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-10-16 11:37:26 +0100 |
commit | 23ae20f5e3afeeab9aa616c63ab3b357668476d5 (patch) | |
tree | 77fe952d842fc8b8f4a0efccbc006686a3b05e77 /ld/configure | |
parent | 472d09c18a750f483ad974991f4f35ede3dfb10b (diff) | |
download | gdb-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')
-rwxr-xr-x | ld/configure | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/ld/configure b/ld/configure index b0b92a3..afe52ef 100755 --- a/ld/configure +++ b/ld/configure @@ -835,6 +835,7 @@ enable_new_dtags enable_relro enable_textrel_check enable_separate_code +enable_error_handling_script enable_default_hash_style enable_libctf enable_werror @@ -1505,6 +1506,9 @@ Optional Features: --enable-textrel-check=[yes|no|warning|error] enable DT_TEXTREL check in ELF linker --enable-separate-code enable -z separate-code in ELF linker by default + --enable-error-handling-script + enable/disable support for the + --error-handling-script option --enable-default-hash-style={sysv,gnu,both} use this default hash style --enable-libctf Handle .ctf type-info sections [default=yes] @@ -12039,7 +12043,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12042 "configure" +#line 12046 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12145,7 +12149,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12148 "configure" +#line 12152 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15945,6 +15949,17 @@ esac fi +# Decide if --error-handling-script should be supported. +ac_support_error_handling_script=unset +# Check whether --enable-error-handling-script was given. +if test "${enable_error_handling_script+set}" = set; then : + enableval=$enable_error_handling_script; case "${enableval}" in + yes) ac_support_error_handling_script=1 ;; + no) ac_support_error_handling_script=0 ;; +esac +fi + + # Decide which "--hash-style" to use by default # Provide a configure time option to override our default. # Check whether --enable-default-hash-style was given. @@ -17739,6 +17754,15 @@ cat >>confdefs.h <<_ACEOF _ACEOF +if test "${ac_support_error_handling_script}" = unset; then + ac_support_error_handling_script=1 +fi + +cat >>confdefs.h <<_ACEOF +#define SUPPORT_ERROR_HANDLING_SCRIPT $ac_support_error_handling_script +_ACEOF + + cat >>confdefs.h <<_ACEOF #define DEFAULT_EMIT_SYSV_HASH $ac_default_emit_sysv_hash |