remote.c: Make read_ptid return a null value when no thread id is found.
[deliverable/binutils-gdb.git] / gold / configure
index 9e1ee273069b74a48f66eb444e40cf426fa9e65f..a005a757ec7a0afd29396b998fea766d005537cd 100755 (executable)
@@ -594,11 +594,14 @@ 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
+zlibinc
+zlibdir
 LIBOBJS
 LFS_CFLAGS
 GOLD_LDADD
@@ -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,8 +683,13 @@ CFLAGS
 CC
 NM
 TARGETOBJS
+DEFAULT_TARGET
+DEFAULT_TARGET_MIPS_FALSE
+DEFAULT_TARGET_MIPS_TRUE
 DEFAULT_TARGET_TILEGX_FALSE
 DEFAULT_TARGET_TILEGX_TRUE
+DEFAULT_TARGET_X32_FALSE
+DEFAULT_TARGET_X32_TRUE
 DEFAULT_TARGET_X86_64_FALSE
 DEFAULT_TARGET_X86_64_TRUE
 DEFAULT_TARGET_SPARC_FALSE
@@ -691,6 +700,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
@@ -785,7 +796,7 @@ enable_werror
 enable_build_warnings
 with_gold_ldflags
 with_gold_ldadd
-with_zlib
+with_system_zlib
 enable_maintainer_mode
 '
       ac_precious_vars='build_alias
@@ -1442,7 +1453,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
+  --with-system-zlib      use installed libz
 
 Some influential environment variables:
   CC          C compiler command
@@ -3426,6 +3437,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='#'
@@ -3458,7 +3477,20 @@ else
   DEFAULT_TARGET_SPARC_FALSE=
 fi
 
-        if test "$targ_obj" = "x86_64"; then
+       target_x86_64=no
+       target_x32=no
+       if test "$targ_obj" = "x86_64"; then
+         case "$target" in
+         x86_64*-linux-gnux32)
+           target_x32=yes
+           default_size=32
+           ;;
+         *)
+           target_x86_64=yes
+           ;;
+         esac
+       fi
+        if test "$target_x86_64" = "yes"; then
   DEFAULT_TARGET_X86_64_TRUE=
   DEFAULT_TARGET_X86_64_FALSE='#'
 else
@@ -3466,6 +3498,14 @@ else
   DEFAULT_TARGET_X86_64_FALSE=
 fi
 
+        if test "$target_x32" = "yes"; then
+  DEFAULT_TARGET_X32_TRUE=
+  DEFAULT_TARGET_X32_FALSE='#'
+else
+  DEFAULT_TARGET_X32_TRUE='#'
+  DEFAULT_TARGET_X32_FALSE=
+fi
+
         if test "$targ_obj" = "tilegx"; then
   DEFAULT_TARGET_TILEGX_TRUE=
   DEFAULT_TARGET_TILEGX_FALSE='#'
@@ -3474,6 +3514,16 @@ else
   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
@@ -6335,6 +6385,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 :
@@ -6438,7 +6517,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.  */
 
@@ -6594,6 +6673,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.  */
@@ -6628,8 +6710,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
 
@@ -6793,96 +6875,21 @@ fi
 
 # Link in zlib if we can.  This allows us to write compressed sections.
 
-  # 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
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  # Use the system's zlib library.
+  zlibdir="-L\$(top_builddir)/../zlib"
+  zlibinc="-I\$(top_srcdir)/../zlib"
 
-/* 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 zlibVersion ();
-int
-main ()
-{
-return zlibVersion ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' z; 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"
+# Check whether --with-system-zlib was given.
+if test "${with_system_zlib+set}" = set; then :
+  withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
+    zlibdir=
+    zlibinc=
   fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_zlibVersion=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_zlibVersion+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_zlibVersion+set}" = set; then :
-
-else
-  ac_cv_search_zlibVersion=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
-$as_echo "$ac_cv_search_zlibVersion" >&6; }
-ac_res=$ac_cv_search_zlibVersion
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  for ac_header in zlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ZLIB_H 1
-_ACEOF
 
 fi
 
-done
 
-fi
 
-    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
-  HAVE_ZLIB_TRUE='#'
-  HAVE_ZLIB_FALSE=
-fi
 
 
 ac_fn_c_check_decl "$LINENO" "basename" "ac_cv_have_decl_basename" "$ac_includes_default"
@@ -6957,6 +6964,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'
@@ -7099,6 +7150,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`
@@ -7139,6 +7204,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`
@@ -7380,28 +7532,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'
@@ -7605,6 +7735,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
@@ -7625,10 +7759,18 @@ 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_X32_TRUE}" && test -z "${DEFAULT_TARGET_X32_FALSE}"; then
+  as_fn_error "conditional \"DEFAULT_TARGET_X32\" 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
@@ -7694,14 +7836,14 @@ if test -z "${IFUNC_STATIC_TRUE}" && test -z "${IFUNC_STATIC_FALSE}"; then
   as_fn_error "conditional \"IFUNC_STATIC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then
-  as_fn_error "conditional \"HAVE_ZLIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 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
This page took 0.032436 seconds and 4 git commands to generate.