packaging: bump to 2.24.90
[platform/upstream/binutils.git] / gold / configure
index 0bffe08..6cae261 100755 (executable)
@@ -594,9 +594,12 @@ LTLIBOBJS
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+DLOPEN_LIBS
+CXXCPP
+HAVE_NO_USE_LINKER_PLUGIN_FALSE
+HAVE_NO_USE_LINKER_PLUGIN_TRUE
 HAVE_PUBNAMES_FALSE
 HAVE_PUBNAMES_TRUE
-CXXCPP
 HAVE_ZLIB_FALSE
 HAVE_ZLIB_TRUE
 LIBOBJS
@@ -621,6 +624,7 @@ STATIC_TLS_FALSE
 STATIC_TLS_TRUE
 TLS_FALSE
 TLS_TRUE
+MERGE_CONSTANTS_FLAG
 MCMODEL_MEDIUM_FALSE
 MCMODEL_MEDIUM_TRUE
 FN_PTRS_IN_SO_WITHOUT_PIC_FALSE
@@ -679,6 +683,11 @@ CFLAGS
 CC
 NM
 TARGETOBJS
+DEFAULT_TARGET
+DEFAULT_TARGET_MIPS_FALSE
+DEFAULT_TARGET_MIPS_TRUE
+DEFAULT_TARGET_TILEGX_FALSE
+DEFAULT_TARGET_TILEGX_TRUE
 DEFAULT_TARGET_X86_64_FALSE
 DEFAULT_TARGET_X86_64_TRUE
 DEFAULT_TARGET_SPARC_FALSE
@@ -689,6 +698,8 @@ DEFAULT_TARGET_I386_FALSE
 DEFAULT_TARGET_I386_TRUE
 DEFAULT_TARGET_ARM_FALSE
 DEFAULT_TARGET_ARM_TRUE
+DEFAULT_TARGET_AARCH64_FALSE
+DEFAULT_TARGET_AARCH64_TRUE
 PLUGINS_FALSE
 PLUGINS_TRUE
 THREADS_FALSE
@@ -772,7 +783,6 @@ ac_subst_files=''
 ac_user_opts='
 enable_option_checking
 with_sysroot
-enable_ld
 enable_gold
 enable_threads
 enable_plugins
@@ -784,6 +794,7 @@ enable_werror
 enable_build_warnings
 with_gold_ldflags
 with_gold_ldadd
+with_zlib
 enable_maintainer_mode
 '
       ac_precious_vars='build_alias
@@ -1421,7 +1432,6 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-ld[=ARG]     build ld [ARG={default,yes,no}]
   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
   --enable-threads        multi-threaded linking
   --enable-plugins        linker plugins
@@ -1441,6 +1451,7 @@ Optional Packages:
   --with-lib-path=dir1:dir2...  set default LIB_PATH
   --with-gold-ldflags=FLAGS  additional link flags for gold
   --with-gold-ldadd=LIBS     additional libraries for gold
+  --with-zlib             include zlib support (auto/yes/no) default=auto
 
 Some influential environment variables:
   CC          C compiler command
@@ -3266,35 +3277,21 @@ _ACEOF
 
 
 
-default_ld=
-# Check whether --enable-ld was given.
-if test "${enable_ld+set}" = set; then :
-  enableval=$enable_ld; case "${enableval}" in
-  default)
-    default_ld=ld.bfd
-    ;;
-esac
-fi
-
-
+installed_linker=ld.gold
 # Check whether --enable-gold was given.
 if test "${enable_gold+set}" = set; then :
   enableval=$enable_gold; case "${enableval}" in
- yes|default)
-   if test x${default_ld} = x; then
+ default)
+   install_as_default=yes
+   ;;
+ yes)
+   if test x${enable_ld} = xno; then
      install_as_default=yes
    fi
-   installed_linker=ld.gold
-   ;;
- no)
-   ;;
- *)
-   as_fn_error "invalid --enable-gold argument" "$LINENO" 5
    ;;
  esac
 else
   install_as_default=no
- installed_linker=ld.gold
 fi
 
 
@@ -3405,7 +3402,8 @@ for targ in $target $canon_targets; do
     . ${srcdir}/configure.tgt
 
     if test "$targ_obj" = "UNKNOWN"; then
-      as_fn_error "\"unsupported target $targ\"" "$LINENO" 5
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"unsupported target $targ\"" >&5
+$as_echo "$as_me: WARNING: \"unsupported target $targ\"" >&2;}
     else
       targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
       if test "$targ_extra_obj" != ""; then
@@ -3438,6 +3436,14 @@ for targ in $target $canon_targets; do
        default_big_endian=$targ_big_endian
        default_osabi=$targ_osabi
 
+        if test "$targ_obj" = "aarch64"; then
+  DEFAULT_TARGET_AARCH64_TRUE=
+  DEFAULT_TARGET_AARCH64_FALSE='#'
+else
+  DEFAULT_TARGET_AARCH64_TRUE='#'
+  DEFAULT_TARGET_AARCH64_FALSE=
+fi
+
         if test "$targ_obj" = "arm"; then
   DEFAULT_TARGET_ARM_TRUE=
   DEFAULT_TARGET_ARM_FALSE='#'
@@ -3478,6 +3484,24 @@ else
   DEFAULT_TARGET_X86_64_FALSE=
 fi
 
+        if test "$targ_obj" = "tilegx"; then
+  DEFAULT_TARGET_TILEGX_TRUE=
+  DEFAULT_TARGET_TILEGX_FALSE='#'
+else
+  DEFAULT_TARGET_TILEGX_TRUE='#'
+  DEFAULT_TARGET_TILEGX_FALSE=
+fi
+
+         if test "$targ_obj" = "mips"; then
+  DEFAULT_TARGET_MIPS_TRUE=
+  DEFAULT_TARGET_MIPS_FALSE='#'
+else
+  DEFAULT_TARGET_MIPS_TRUE='#'
+  DEFAULT_TARGET_MIPS_FALSE=
+fi
+
+       DEFAULT_TARGET=${targ_obj}
+
       fi
     fi
   fi
@@ -6279,7 +6303,7 @@ fi
 
  if
   case $target_cpu in
-    i?86) true;;
+    powerpc*) false;;
     x86_64) false;;
     sparc64) false;;
     *) true;;
@@ -6339,6 +6363,35 @@ else
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fmerge-constants" >&5
+$as_echo_n "checking whether $CC supports -fmerge-constants... " >&6; }
+if test "${gold_cv_merge_constants+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fmerge-constants"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+const char *s = "foo";
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gold_cv_merge_constants=yes
+else
+  gold_cv_merge_constants=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_merge_constants" >&5
+$as_echo "$gold_cv_merge_constants" >&6; }
+
+if test "$gold_cv_merge_constants" = yes; then :
+  MERGE_CONSTANTS_FLAG=-fmerge-constants
+else
+  MERGE_CONSTANTS_FLAG=
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread support" >&5
 $as_echo_n "checking for thread support... " >&6; }
 if test "${gold_cv_c_thread+set}" = set; then :
@@ -6442,7 +6495,7 @@ fi
 
 
 save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -fpic -mtls-dialect=gnu2"
+CFLAGS="$CFLAGS -Werror -fpic -mtls-dialect=gnu2"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -6598,6 +6651,9 @@ fi
 
 
 
+# Set the 'development' global.
+. $srcdir/../bfd/development.sh
+
 GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
@@ -6632,8 +6688,8 @@ case "${host}" in
   *) ;;
 esac
 
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+# Enable -Werror by default when using gcc.  Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" -a "$development" = true ; then
     ERROR_ON_WARNING=yes
 fi
 
@@ -6796,7 +6852,19 @@ esac
 fi
 
 # Link in zlib if we can.  This allows us to write compressed sections.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
+
+  # See if the user specified whether he wants zlib support or not.
+
+# Check whether --with-zlib was given.
+if test "${with_zlib+set}" = set; then :
+  withval=$with_zlib;
+else
+  with_zlib=auto
+fi
+
+
+  if test "$with_zlib" != "no"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
 $as_echo_n "checking for library containing zlibVersion... " >&6; }
 if test "${ac_cv_search_zlibVersion+set}" = set; then :
   $as_echo_n "(cached) " >&6
@@ -6863,7 +6931,12 @@ done
 
 fi
 
- if test "$ac_cv_search_zlibVersion" != "no"; then
+    if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
+      as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
+    fi
+  fi
+
+ if test "$ac_cv_header_zlib_h" = "yes"; then
   HAVE_ZLIB_TRUE=
   HAVE_ZLIB_FALSE='#'
 else
@@ -6944,6 +7017,50 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror -gpubnames"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  have_pubnames=yes
+else
+  have_pubnames=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+ if test "$have_pubnames" = "yes"; then
+  HAVE_PUBNAMES_TRUE=
+  HAVE_PUBNAMES_FALSE='#'
+else
+  HAVE_PUBNAMES_TRUE='#'
+  HAVE_PUBNAMES_FALSE=
+fi
+
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  have_no_use_linker_plugin=yes
+else
+  have_no_use_linker_plugin=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
+ if test "$have_no_use_linker_plugin" = "yes"; then
+  HAVE_NO_USE_LINKER_PLUGIN_TRUE=
+  HAVE_NO_USE_LINKER_PLUGIN_FALSE='#'
+else
+  HAVE_NO_USE_LINKER_PLUGIN_TRUE='#'
+  HAVE_NO_USE_LINKER_PLUGIN_FALSE=
+fi
+
+
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7086,6 +7203,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
+for ac_header in unordered_set unordered_map
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
 for ac_header in tr1/unordered_set tr1/unordered_map
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -7126,6 +7257,93 @@ fi
 
 done
 
+
+for ac_header in windows.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
+if test "x$ac_cv_header_windows_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINDOWS_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in dlfcn.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dl dld; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if test "${ac_cv_search_dlopen+set}" = set; then :
+  break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
+
+else
+  ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+case "$ac_cv_search_dlopen" in
+  no*) DLOPEN_LIBS="";;
+  *)   DLOPEN_LIBS="$ac_cv_search_dlopen";;
+esac
+
+
 for ac_func in mallinfo posix_fallocate fallocate readv sysconf times
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -7291,7 +7509,7 @@ else
   gold_cv_hash_off_t=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CXXFLAGS=$CFLAGS_hold
+CXXFLAGS=$CXXFLAGS_hold
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_hash_off_t" >&5
 $as_echo "$gold_cv_hash_off_t" >&6; }
@@ -7367,28 +7585,6 @@ $as_echo "#define HAVE_STAT_ST_MTIM 1" >>confdefs.h
 
 fi
 
-save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -gpubnames"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-int i;
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  have_pubnames=yes
-else
-  have_pubnames=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-CXXFLAGS="$save_CXXFLAGS"
- if test "$have_pubnames" = "yes"; then
-  HAVE_PUBNAMES_TRUE=
-  HAVE_PUBNAMES_FALSE='#'
-else
-  HAVE_PUBNAMES_TRUE='#'
-  HAVE_PUBNAMES_FALSE=
-fi
-
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7592,6 +7788,10 @@ if test -z "${PLUGINS_TRUE}" && test -z "${PLUGINS_FALSE}"; then
   as_fn_error "conditional \"PLUGINS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${DEFAULT_TARGET_AARCH64_TRUE}" && test -z "${DEFAULT_TARGET_AARCH64_FALSE}"; then
+  as_fn_error "conditional \"DEFAULT_TARGET_AARCH64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${DEFAULT_TARGET_ARM_TRUE}" && test -z "${DEFAULT_TARGET_ARM_FALSE}"; then
   as_fn_error "conditional \"DEFAULT_TARGET_ARM\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -7612,6 +7812,14 @@ if test -z "${DEFAULT_TARGET_X86_64_TRUE}" && test -z "${DEFAULT_TARGET_X86_64_F
   as_fn_error "conditional \"DEFAULT_TARGET_X86_64\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${DEFAULT_TARGET_TILEGX_TRUE}" && test -z "${DEFAULT_TARGET_TILEGX_FALSE}"; then
+  as_fn_error "conditional \"DEFAULT_TARGET_TILEGX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DEFAULT_TARGET_MIPS_TRUE}" && test -z "${DEFAULT_TARGET_MIPS_FALSE}"; then
+  as_fn_error "conditional \"DEFAULT_TARGET_MIPS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   as_fn_error "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -7685,6 +7893,10 @@ if test -z "${HAVE_PUBNAMES_TRUE}" && test -z "${HAVE_PUBNAMES_FALSE}"; then
   as_fn_error "conditional \"HAVE_PUBNAMES\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${HAVE_NO_USE_LINKER_PLUGIN_TRUE}" && test -z "${HAVE_NO_USE_LINKER_PLUGIN_FALSE}"; then
+  as_fn_error "conditional \"HAVE_NO_USE_LINKER_PLUGIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5