Add a new option to the linker: --error-handling-script=<NAME>. Run the script ...
[deliverable/binutils-gdb.git] / ld / configure.ac
index 99957df3763bd3e1587fe71070553873dce30b42..7676009d910ad917117074f309241d4889c272ba 100644 (file)
@@ -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],
@@ -221,6 +231,13 @@ case "${enable_default_hash_style}" in
   *) ac_default_emit_gnu_hash=0 ;;
 esac
 
+GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])
+if test "${enable_libctf}" = yes; then
+    AC_DEFINE(ENABLE_LIBCTF, 1, [Handle .ctf type-info sections])
+fi
+AM_CONDITIONAL(ENABLE_LIBCTF, test "${enable_libctf}" = yes)
+AC_SUBST(enable_libctf)
+
 AM_BINUTILS_WARNINGS
 
 AM_LC_MESSAGES
@@ -274,7 +291,6 @@ dnl AC_CHECK_HEADERS(sys/mman.h)
 AC_FUNC_MMAP
 
 AC_SEARCH_LIBS([dlopen], [dl])
-AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes])
 
 AC_ARG_ENABLE(initfini-array,
 [  --disable-initfini-array do not use .init_array/.fini_array sections],
@@ -300,7 +316,7 @@ fi
 
 BFD_BINARY_FOPEN
 
-AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
+AC_CHECK_DECLS([asprintf, environ, free, getenv, sbrk, strstr])
 
 # Link in zlib if we can.  This allows us to read and write
 # compressed CTF sections.
@@ -483,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.])
@@ -525,6 +548,9 @@ else
   TESTBFDLIB="../bfd/.libs/libbfd.a"
   TESTCTFLIB="../libctf/.libs/libctf.a"
 fi
+if test "${enable_libctf}" = no; then
+    TESTCTFLIB=
+fi
 AC_SUBST(TESTBFDLIB)
 AC_SUBST(TESTCTFLIB)
 
This page took 0.023292 seconds and 4 git commands to generate.