Avoid assertion in processes with VM in bad shape
[platform/upstream/glibc.git] / configure
index 1db57ae..55cb008 100755 (executable)
--- a/configure
+++ b/configure
@@ -3,7 +3,7 @@
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68 for GNU C Library (see version.h).
 #
-# Report bugs to <glibc>.
+# Report bugs to <http://sourceware.org/bugzilla/>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -239,8 +239,9 @@ fi
     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and glibc about your
-$0: system, including any error possibly output before this
+    $as_echo "$0: Please tell bug-autoconf@gnu.org and
+$0: http://sourceware.org/bugzilla/ about your system,
+$0: including any error possibly output before this
 $0: message. Then install a modern shell, or manually run
 $0: the script under such a shell if you do have one."
   fi
@@ -559,11 +560,11 @@ MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='GNU C Library'
-PACKAGE_TARNAME='c-library'
+PACKAGE_TARNAME='glibc'
 PACKAGE_VERSION='(see version.h)'
 PACKAGE_STRING='GNU C Library (see version.h)'
-PACKAGE_BUGREPORT='glibc'
-PACKAGE_URL='http://www.gnu.org/software/c-library/'
+PACKAGE_BUGREPORT='http://sourceware.org/bugzilla/'
+PACKAGE_URL='http://www.gnu.org/software/glibc/'
 
 ac_unique_file="include/features.h"
 enable_option_checking=no
@@ -622,6 +623,7 @@ elf
 ldd_rewrite_script
 use_ldconfig
 libc_cv_as_i686
+libc_cv_cc_fma4
 libc_cv_cc_novzeroupper
 libc_cv_cc_avx
 libc_cv_cc_sse4
@@ -642,11 +644,11 @@ have_libaudit
 LIBGD
 libc_cv_cc_submachine
 exceptions
-no_whole_archive
 libc_cv_have_initfini
 gnu89_inline
 libc_cv_ssp
 fno_unit_at_a_time
+libc_cv_output_format
 libc_cv_hashstyle
 libc_cv_fpie
 libc_cv_z_execstack
@@ -669,6 +671,7 @@ libc_cv_gcc_static_libgcc
 CXX_SYSINCLUDES
 SYSINCLUDES
 AUTOCONF
+READELF
 SED
 MAKEINFO
 MSGFMT
@@ -677,6 +680,7 @@ PWD_P
 LD
 AS
 MIG
+OBJCOPY
 OBJDUMP
 AR
 LN_S
@@ -691,13 +695,12 @@ base_machine
 add_on_subdirs
 add_ons
 libc_cv_nss_crypt
-experimental_malloc
 all_warnings
 force_install
 bindnow
 oldest_abi
 enable_check_abi
-with_cvs
+use_default_link
 with_fp
 ac_ct_CXX
 CXXFLAGS
@@ -769,8 +772,8 @@ with_binutils
 with_elf
 with_selinux
 with_xcoff
-with_cvs
 with_headers
+with_default_link
 enable_sanity_checks
 enable_check_abi
 enable_shared
@@ -781,8 +784,6 @@ enable_versioning
 enable_oldest_abi
 enable_stackguard_randomization
 enable_add_ons
-with_tls
-with___thread
 enable_hidden_plt
 enable_bind_now
 enable_static_nss
@@ -790,7 +791,6 @@ enable_force_install
 enable_kernel
 enable_all_warnings
 enable_multi_arch
-enable_experimental_malloc
 enable_nss_crypt
 with_cpu
 '
@@ -1397,7 +1397,7 @@ Fine tuning of the installation directories:
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/c-library]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/glibc]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1450,8 +1450,6 @@ Optional Features:
   --enable-all-warnings   enable all useful warnings gcc can issue
   --enable-multi-arch     enable single DSO with optimizations for multiple
                           architectures
-  --enable-experimental-malloc
-                          enable experimental malloc features
   --enable-nss-crypt      enable libcrypt to use nss
 
 Optional Packages:
@@ -1465,11 +1463,9 @@ Optional Packages:
   --with-elf              if using the ELF object format
   --with-selinux          if building with SELinux support
   --with-xcoff            if using the XCOFF object format
-  --without-cvs           if CVS should not be used
   --with-headers=PATH     location of system headers to use (for example
                           /usr/src/linux/include) [default=compiler default]
-  --with-tls              enable support for TLS
-  --without-__thread      do not use TLS features even when supporting them
+  --with-default-link     do not use explicit linker scripts
   --with-cpu=CPU          select code for CPU variant
 
 Some influential environment variables:
@@ -1487,8 +1483,8 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <glibc>.
-GNU C Library home page: <http://www.gnu.org/software/c-library/>.
+Report bugs to <http://sourceware.org/bugzilla/>.
+GNU C Library home page: <http://www.gnu.org/software/glibc/>.
 General help using GNU software: <http://www.gnu.org/gethelp/>.
 _ACEOF
 ac_status=$?
@@ -3561,27 +3557,22 @@ else
 fi
 
 
-# Check whether --with-cvs was given.
-if test "${with_cvs+set}" = set; then :
-  withval=$with_cvs; with_cvs=$withval
+
+# Check whether --with-headers was given.
+if test "${with_headers+set}" = set; then :
+  withval=$with_headers; sysheaders=$withval
 else
-  with_cvs=yes
+  sysheaders=''
 fi
 
-if test "$with_cvs" = yes; then
-  if test -d $srcdir/CVS && grep :pserver: $srcdir/CVS/Root > /dev/null
-  then
-    with_cvs=no
-  fi
-fi
 
 
 
-# Check whether --with-headers was given.
-if test "${with_headers+set}" = set; then :
-  withval=$with_headers; sysheaders=$withval
+# Check whether --with-default-link was given.
+if test "${with_default_link+set}" = set; then :
+  withval=$with_default_link; use_default_link=$withval
 else
-  sysheaders=''
+  use_default_link=default
 fi
 
 
@@ -3676,24 +3667,6 @@ else
 fi
 
 
-
-# Check whether --with-tls was given.
-if test "${with_tls+set}" = set; then :
-  withval=$with_tls; usetls=$withval
-else
-  usetls=yes
-fi
-
-
-
-# Check whether --with-__thread was given.
-if test "${with___thread+set}" = set; then :
-  withval=$with___thread; use__thread=$withval
-else
-  use__thread=yes
-fi
-
-
 # Check whether --enable-hidden-plt was given.
 if test "${enable_hidden_plt+set}" = set; then :
   enableval=$enable_hidden_plt; hidden=$enableval
@@ -3766,13 +3739,6 @@ else
 fi
 
 
-# Check whether --enable-experimental-malloc was given.
-if test "${enable_experimental_malloc+set}" = set; then :
-  enableval=$enable_experimental_malloc; experimental_malloc=$enableval
-fi
-
-
-
 # Check whether --enable-nss-crypt was given.
 if test "${enable_nss_crypt+set}" = set; then :
   enableval=$enable_nss_crypt; nss_crypt=$enableval
@@ -4684,6 +4650,8 @@ AR=`$CC -print-prog-name=ar`
 
 OBJDUMP=`$CC -print-prog-name=objdump`
 
+OBJCOPY=`$CC -print-prog-name=objcopy`
+
 
 # Determine whether we are using GNU binutils.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5
@@ -5221,6 +5189,99 @@ if test $ac_verc_fail = yes; then
 fi
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}readelf", so it can be a program name with args.
+set dummy ${ac_tool_prefix}readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_READELF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$READELF"; then
+  ac_cv_prog_READELF="$READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_READELF="${ac_tool_prefix}readelf"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+READELF=$ac_cv_prog_READELF
+if test -n "$READELF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
+$as_echo "$READELF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_READELF"; then
+  ac_ct_READELF=$READELF
+  # Extract the first word of "readelf", so it can be a program name with args.
+set dummy readelf; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_READELF+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_READELF"; then
+  ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_READELF="readelf"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
+if test -n "$ac_ct_READELF"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
+$as_echo "$ac_ct_READELF" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_READELF" = x; then
+    READELF="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    READELF=$ac_ct_READELF
+  fi
+else
+  READELF="$ac_cv_prog_READELF"
+fi
+
+
 for ac_prog in autoconf
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5283,8 +5344,7 @@ $as_echo "$libc_cv_autoconf_works" >&6; }
   test $libc_cv_autoconf_works = yes || AUTOCONF=no
   ;;
 esac
-if test "x$with_cvs" = xyes && test "x$AUTOCONF" = xno; then
-  # If --without-cvs they probably won't change configure.in, so no complaints.
+if test "x$AUTOCONF" = xno; then
   aux_missing="$aux_missing autoconf"
 fi
 
@@ -5313,11 +5373,16 @@ if test -n "$sysheaders"; then
   SYSINCLUDES="$SYSINCLUDES \
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
   if test -n "$CXX"; then
+    CXX_SYSINCLUDES=
     cxxversion=`$CXX -dumpversion 2>&5` &&
     cxxmachine=`$CXX -dumpmachine 2>&5` &&
-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
-    CXX_SYSINCLUDES="-isystem $cxxheaders \
+    for d in include "$cxxmachine/include"; do
+      i=../../../../$d/c++/$cxxversion
+      cxxheaders=`$CXX -print-file-name="$i"` &&
+      test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+      CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
 -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+    done
   fi
 fi
 
@@ -6097,7 +6162,7 @@ EOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }
   then
-    if readelf -S conftest | fgrep INIT_ARRAY > /dev/null; then
+    if $READELF -S conftest | fgrep INIT_ARRAY > /dev/null; then
       libc_cv_initfini_array=yes
     else
       libc_cv_initfini_array=no
@@ -6111,12 +6176,57 @@ fi
 $as_echo "$libc_cv_initfini_array" >&6; }
   if test $libc_cv_initfini_array != yes; then
     as_fn_error $? "Need linker with .init_array/.fini_array support." "$LINENO" 5
-  elif { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&5'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use .ctors/.dtors header and trailer" >&5
+$as_echo_n "checking whether to use .ctors/.dtors header and trailer... " >&6; }
+if ${libc_cv_ctors_header+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      libc_cv_ctors_header=yes
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+__attribute__ ((constructor)) void ctor (void) { puts("ctor"); }
+__attribute__ ((destructor))  void dtor (void) { puts("dtor"); }
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+        if $READELF -WS conftest$ac_exeext | $AWK '
+       { gsub(/\[ */, "[") }
+       $2 == ".ctors" || $2 == ".dtors" {
+         size = strtonum("0x" $6)
+         align = strtonum("0x" $NF)
+         seen[$2] = 1
+         stub[$2] = size == align * 2
+       }
+       END {
+         ctors_ok = !seen[".ctors"] || stub[".ctors"]
+         dtors_ok = !seen[".dtors"] || stub[".dtors"]
+         exit ((ctors_ok && dtors_ok) ? 0 : 1)
+       }
+      '; then :
+  libc_cv_ctors_header=no
+fi
+
+else
+        as_fn_error $? "missing __attribute__ ((constructor)) support??" "$LINENO" 5
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ctors_header" >&5
+$as_echo "$libc_cv_ctors_header" >&6; }
+  if test $libc_cv_ctors_header = no; then
     $as_echo "#define NO_CTORS_DTORS_SECTIONS 1" >>confdefs.h
 
   fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_initfirst" >&5
 $as_echo "$libc_cv_z_initfirst" >&6; }
 
+  # Add-on fragments can set these for other machines.
+  libc_commonpagesize=${libc_commonpagesize:-no}
+  libc_relro_required=${libc_relro_required:-no}
   case "$base_machine" in
-    i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z relro option" >&5
+    i[34567]86 | x86_64 | powerpc* | s390*)
+      libc_commonpagesize=0x1000
+      libc_relro_required=yes
+      ;;
+    sparc*)
+      libc_commonpagesize=0x2000
+      libc_relro_required=yes
+      ;;
+    ia64*)
+      libc_commonpagesize=0x4000
+      ;;
+    alpha*)
+      libc_commonpagesize=0x10000
+      libc_relro_required=yes
+      ;;
+  esac
+
+  if test $libc_commonpagesize != no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z relro option" >&5
 $as_echo_n "checking for -z relro option... " >&6; }
 if ${libc_cv_z_relro+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-    libc_cv_z_relro=no
-  if { ac_try='${CC-cc} -v --help 2>&1|grep "z relro" 1>&5'
+      libc_cv_z_relro=no
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int _start (void) { return 42; }
+extern void _exit (int);
+/* Since these pointers are const, they should go in rodata.
+   Since they refer to functions that have to be resolved by
+   dynamic linking, they should instead go in RELRO data.  */
+const void *const relro[] = { &_start, &_exit, 0 };
+/* GNU ld fails to produce RELRO data when it's very small and there is no
+   normal writable data following it, or if only uninitialized (.bss) data
+   follows it, or only very small writable data.  */
+int data[0x10000] = { 1, };
+
+_ACEOF
+    cat > conftest.awk <<\EOF
+BEGIN {
+  result = "no"
+  commonpagesize = strtonum(commonpagesize)
+}
+{ print "LINE:", $0 > "/dev/stderr" }
+$1 == "GNU_RELRO" {
+  vaddr = strtonum($3)
+  memsz = strtonum($6)
+  end = vaddr + memsz
+  printf "vaddr %#x memsz %#x end %#x commonpagesize %#x\n", \
+    vaddr, memsz, end, commonpagesize > "/dev/stderr"
+  result = (end % commonpagesize == 0) ? "yes" : "broken"
+}
+END { print result }
+EOF
+    { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+                   -fPIC -shared -o conftest.so conftest.c
+                   -nostartfiles -nostdlib
+                   -Wl,-z,relro 1>&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-  then
-    if { ac_try='${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&5'
+  test $ac_status = 0; }; } &&
+    { ac_try='$READELF -Wl conftest.so > conftest.ph'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }
-    then
-      libc_cv_z_relro=yes
-    fi
-  fi
+  test $ac_status = 0; }; } &&
+    { ac_try='
+      $AWK -v commonpagesize=$libc_commonpagesize -f conftest.awk
+          conftest.ph > conftest.cps
+    '
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } &&
+    libc_cv_z_relro=`cat conftest.cps 2>&5`
+    rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_relro" >&5
 $as_echo "$libc_cv_z_relro" >&6; }
-      if test "$libc_cv_z_relro" = no; then
-       as_fn_error $? "linker with -z relro support required" "$LINENO" 5
-      fi
-      ;;
-    *) ;;
-   esac
+    if { test "x$libc_relro_required" = xyes &&
+        test "x$libc_cv_z_relro" != xyes
+       }
+    then
+      as_fn_error $? "linker with -z relro support required" "$LINENO" 5
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: missing architecture parameter to check for working -z relro" >&5
+$as_echo "$as_me: WARNING: missing architecture parameter to check for working -z relro" >&2;}
+  fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Bgroup option" >&5
 $as_echo_n "checking for -Bgroup option... " >&6; }
@@ -6393,7 +6567,7 @@ EOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }
   then
-    if readelf -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
+    if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
       libc_cv_z_combreloc=yes
     else
       libc_cv_z_combreloc=no
@@ -6493,7 +6667,88 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5
 $as_echo "$libc_cv_hashstyle" >&6; }
 
+
+  # The linker's default -shared behavior is good enough if it
+  # does these things that our custom linker scripts ensure that
+  # all allocated NOTE sections come first.
+  if test "$use_default_link" = default; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sufficient default -shared layout" >&5
+$as_echo_n "checking for sufficient default -shared layout... " >&6; }
+if ${libc_cv_use_default_link+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      libc_cv_use_default_link=no
+    cat > conftest.s <<\EOF
+         .section .note.a,"a",%note
+         .balign 4
+         .long 4,4,9
+         .string "GNU"
+         .string "foo"
+         .section .note.b,"a",%note
+         .balign 4
+         .long 4,4,9
+         .string "GNU"
+         .string "bar"
+EOF
+    if { ac_try='  ${CC-cc} $ASFLAGS -shared -o conftest.so conftest.s 1>&5'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } &&
+       ac_try=`$READELF -S conftest.so | sed -n \
+        '${x;p;}
+         s/^ *\[ *[1-9][0-9]*\]  *\([^ ][^ ]*\)  *\([^ ][^ ]*\) .*$/\2 \1/
+         t a
+         b
+         : a
+         H'`
+    then
+      libc_seen_a=no libc_seen_b=no
+      set -- $ac_try
+      while test $# -ge 2 -a "$1" = NOTE; do
+       case "$2" in
+       .note.a) libc_seen_a=yes ;;
+       .note.b) libc_seen_b=yes ;;
+       esac
+       shift 2
+      done
+      case "$libc_seen_a$libc_seen_b" in
+      yesyes)
+       libc_cv_use_default_link=yes
+       ;;
+      *)
+       echo >&5 "\
+$libc_seen_a$libc_seen_b from:
+$ac_try"
+       ;;
+      esac
+    fi
+    rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_use_default_link" >&5
+$as_echo "$libc_cv_use_default_link" >&6; }
+    use_default_link=$libc_cv_use_default_link
+  fi
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5
+$as_echo_n "checking linker output format... " >&6; }
+if ${libc_cv_output_format+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if libc_cv_output_format=`
+${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&5`
+then
+  :
+else
+  libc_cv_output_format=
+fi
+test -n "$libc_cv_output_format" || libc_cv_output_format=unknown
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_output_format" >&5
+$as_echo "$libc_cv_output_format" >&6; }
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fno-toplevel-reorder -fno-section-anchors" >&5
 $as_echo_n "checking for -fno-toplevel-reorder -fno-section-anchors... " >&6; }
@@ -6860,8 +7115,8 @@ rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_no_whole_archive" >&5
 $as_echo "$libc_cv_ld_no_whole_archive" >&6; }
-if test $libc_cv_ld_no_whole_archive = yes; then
-  no_whole_archive=-Wl,--no-whole-archive
+if test $libc_cv_ld_no_whole_archive = no; then
+  as_fn_error $? "support for --no-whole-archive is needed" "$LINENO" 5
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc -fexceptions" >&5
@@ -6956,9 +7211,8 @@ rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5
 $as_echo "$libc_cv_gcc_builtin_expect" >&6; }
-if test "$libc_cv_gcc_builtin_expect" = yes; then
-  $as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
-
+if test "$libc_cv_gcc_builtin_expect" = no; then
+  as_fn_error $? "support for __builtin_expect needed" "$LINENO" 5
 fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5
@@ -7019,13 +7273,11 @@ rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_redirection" >&5
 $as_echo "$libc_cv_gcc_builtin_redirection" >&6; }
-if test "$libc_cv_gcc_builtin_redirection" = yes ; then
-  $as_echo "#define HAVE_BUILTIN_REDIRECTION 1" >>confdefs.h
-
+if test "$libc_cv_gcc_builtin_redirection" = no; then
+  as_fn_error $? "support for the symbol redirection needed" "$LINENO" 5
 fi
 
-if test "x$use__thread" != xno; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread" >&5
 $as_echo_n "checking for __thread... " >&6; }
 if ${libc_cv_gcc___thread+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -7033,55 +7285,48 @@ else
   cat > conftest.c <<\EOF
 __thread int a = 42;
 EOF
-  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&5'
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then
-    libc_cv_gcc___thread=yes
-  else
-    libc_cv_gcc___thread=no
-  fi
-  rm -f conftest*
+  libc_cv_gcc___thread=yes
+else
+  libc_cv_gcc___thread=no
+fi
+rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc___thread" >&5
 $as_echo "$libc_cv_gcc___thread" >&6; }
-  if test "$libc_cv_gcc___thread" = yes; then
-    $as_echo "#define HAVE___THREAD 1" >>confdefs.h
-
-  fi
-else
-  libc_cv_gcc___thread=no
+if test "$libc_cv_gcc___thread" = no; then
+  as_fn_error $? "support for the __thread keyword is required" "$LINENO" 5
 fi
 
-if test "$libc_cv_gcc___thread" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tls_model attribute" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tls_model attribute" >&5
 $as_echo_n "checking for tls_model attribute... " >&6; }
 if ${libc_cv_gcc_tls_model_attr+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-    cat > conftest.c <<\EOF
+  cat > conftest.c <<\EOF
 extern __thread int a __attribute__((tls_model ("initial-exec")));
 EOF
-  if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&5'
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&5'
   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then
-    libc_cv_gcc_tls_model_attr=yes
-  else
-    libc_cv_gcc_tls_model_attr=no
-  fi
-  rm -f conftest*
+  libc_cv_gcc_tls_model_attr=yes
+else
+  libc_cv_gcc_tls_model_attr=no
+fi
+rm -f conftest*
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_tls_model_attr" >&5
 $as_echo "$libc_cv_gcc_tls_model_attr" >&6; }
-  if test "$libc_cv_gcc_tls_model_attr" = yes; then
-    $as_echo "#define HAVE_TLS_MODEL_ATTRIBUTE 1" >>confdefs.h
-
-  fi
+if test "$libc_cv_gcc_tls_model_attr" = no; then
+  as_fn_error $? "support for the tls_model attribute is required" "$LINENO" 5
 fi
 
 if test -n "$submachine"; then
@@ -7664,9 +7909,6 @@ if test x$libc_cv_gcc_unwind_find_fde = xyes; then
 fi
 
 
-$as_echo "#define USE_IN_LIBIO 1" >>confdefs.h
-
-
 # Test for old glibc 2.0.x headers so that they can be removed properly
 # Search only in includedir.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for old glibc 2.0.x headers" >&5
@@ -7703,6 +7945,7 @@ fi
 
 
 
+
 if test $elf = yes; then
   $as_echo "#define HAVE_ELF 1" >>confdefs.h
 
@@ -8341,8 +8584,8 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <glibc>.
-GNU C Library home page: <http://www.gnu.org/software/c-library/>.
+Report bugs to <http://sourceware.org/bugzilla/>.
+GNU C Library home page: <http://www.gnu.org/software/glibc/>.
 General help using GNU software: <http://www.gnu.org/gethelp/>."
 
 _ACEOF