Let tst-swscanf find its locale
[platform/upstream/glibc.git] / configure
index 980f25f..5e2f4d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -581,19 +581,12 @@ shared
 static
 ldd_rewrite_script
 use_ldconfig
-libc_cv_sparc_as_vis3
-libc_cv_as_i686
-libc_cv_cc_nofma
-libc_cv_cc_fma4
-libc_cv_cc_novzeroupper
-libc_cv_cc_sse2avx
-libc_cv_cc_avx
-libc_cv_cc_sse4
 libc_cv_forced_unwind
 libc_cv_rootsbindir
 libc_cv_localstatedir
 libc_cv_sysconfdir
 libc_cv_localedir
+libc_cv_rtlddir
 libc_cv_slibdir
 old_glibc_headers
 use_nscd
@@ -605,7 +598,9 @@ have_selinux
 have_libcap
 have_libaudit
 LIBGD
+libc_cv_cc_loop_to_function
 libc_cv_cc_submachine
+libc_cv_cc_nofma
 exceptions
 gnu89_inline
 libc_cv_ssp
@@ -618,7 +613,6 @@ libc_cv_z_combreloc
 ASFLAGS_config
 libc_cv_Bgroup
 libc_cv_cc_with_libunwind
-VERSIONING
 BISON
 INSTALL_INFO
 PERL
@@ -638,7 +632,6 @@ MSGFMT
 MAKE
 LD
 AS
-MIG
 OBJCOPY
 OBJDUMP
 AR
@@ -653,12 +646,14 @@ multi_arch
 base_machine
 add_on_subdirs
 add_ons
+build_pt_chown
 build_nscd
 link_obsolete_rpc
 libc_cv_nss_crypt
 all_warnings
 force_install
 bindnow
+hardcoded_path_in_tests
 oldest_abi
 use_default_link
 sysheaders
@@ -743,9 +738,10 @@ with_default_link
 enable_sanity_checks
 enable_shared
 enable_profile
-enable_versioning
 enable_oldest_abi
+enable_hardcoded_path_in_tests
 enable_stackguard_randomization
+enable_lock_elision
 enable_add_ons
 enable_hidden_plt
 enable_bind_now
@@ -759,6 +755,7 @@ enable_obsolete_rpc
 enable_systemtap
 enable_build_nscd
 enable_nscd
+enable_pt_chown
 with_cpu
 '
       ac_precious_vars='build_alias
@@ -1393,13 +1390,16 @@ Optional Features:
                           in special situations) [default=yes]
   --enable-shared         build shared library [default=yes if GNU ld]
   --enable-profile        build profiled library [default=no]
-  --disable-versioning    do not include versioning information in the library
-                          objects [default=yes if supported]
   --enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2]
                           [default=glibc default]
+  --enable-hardcoded-path-in-tests
+                          hardcode newly built glibc path in tests
+                          [default=no]
   --enable-stackguard-randomization
                           initialize __stack_chk_guard canary with a random
                           number at program start
+  --enable-lock-elision=yes/no
+                          Enable lock elision for pthread mutexes by default
   --enable-add-ons[=DIRS...]
                           configure and build add-ons in DIR1,DIR2,... search
                           for add-ons if no parameter given
@@ -1419,6 +1419,7 @@ Optional Features:
   --enable-systemtap      enable systemtap static probe points [default=no]
   --disable-build-nscd    disable building and installing the nscd daemon
   --disable-nscd          library functions will not contact the nscd daemon
+  --enable-pt_chown       Enable building and installing pt_chown
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1568,43 +1569,6 @@ fi
 
 } # ac_fn_c_try_compile
 
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
 # ac_fn_cxx_try_compile LINENO
 # ----------------------------
 # Try to compile conftest.$ac_ext, and return whether this succeeded.
@@ -2354,6 +2318,16 @@ _ACEOF
 # Glibc should not depend on any header files
 
 
+# We require GCC, and by default use its preprocessor.  Override AC_PROG_CPP
+# here to work around the Autoconf issue discussed in
+# <http://sourceware.org/ml/libc-alpha/2013-01/msg00721.html>.
+# AC_PROG_CPP
+
+# We require GCC.  Override _AC_PROG_CC_C89 here to work around the Autoconf
+# issue discussed in
+# <http://sourceware.org/ml/libc-alpha/2013-01/msg00757.html>.
+
+
 
 
 subdirs="$subdirs "
@@ -2926,96 +2900,6 @@ else
     CFLAGS=
   fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-       -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -3068,143 +2952,14 @@ done
 
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                    Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+  CPP="$CC -E"
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
 # We need the C++ compiler only for testing.
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -3673,13 +3428,6 @@ else
   profile=no
 fi
 
-# Check whether --enable-versioning was given.
-if test "${enable_versioning+set}" = set; then :
-  enableval=$enable_versioning; enable_versioning=$enableval
-else
-  enable_versioning=yes
-fi
-
 
 # Check whether --enable-oldest-abi was given.
 if test "${enable_oldest_abi+set}" = set; then :
@@ -3698,6 +3446,15 @@ _ACEOF
 fi
 
 
+# Check whether --enable-hardcoded-path-in-tests was given.
+if test "${enable_hardcoded_path_in_tests+set}" = set; then :
+  enableval=$enable_hardcoded_path_in_tests; hardcoded_path_in_tests=$enableval
+else
+  hardcoded_path_in_tests=no
+fi
+
+
+
 # Check whether --enable-stackguard-randomization was given.
 if test "${enable_stackguard_randomization+set}" = set; then :
   enableval=$enable_stackguard_randomization; enable_stackguard_randomize=$enableval
@@ -3710,6 +3467,18 @@ if test "$enable_stackguard_randomize" = yes; then
 
 fi
 
+# Check whether --enable-lock-elision was given.
+if test "${enable_lock_elision+set}" = set; then :
+  enableval=$enable_lock_elision; enable_lock_elision=$enableval
+else
+  enable_lock_elision=no
+fi
+
+if test "$enable_lock_elision" = yes ; then
+  $as_echo "#define ENABLE_LOCK_ELISION 1" >>confdefs.h
+
+fi
+
 # Check whether --enable-add-ons was given.
 if test "${enable_add_ons+set}" = set; then :
   enableval=$enable_add_ons;
@@ -3934,6 +3703,19 @@ else
 fi
 
 
+# Check whether --enable-pt_chown was given.
+if test "${enable_pt_chown+set}" = set; then :
+  enableval=$enable_pt_chown; build_pt_chown=$enableval
+else
+  build_pt_chown=no
+fi
+
+
+if test "$build_pt_chown" = yes; then
+  $as_echo "#define HAVE_PT_CHOWN 1" >>confdefs.h
+
+fi
+
 # The way shlib-versions is used to generate soversions.mk uses a
 # fairly simplistic model for name recognition that can't distinguish
 # i486-pc-linux-gnu fully from i486-pc-gnu.  So we mutate a $host_os
@@ -4175,9 +3957,9 @@ fi
 # type and particular chip.  If an add-on configure fragment already set
 # base_machine, we don't change it.
 test -n "$base_machine" || case "$machine" in
-i[34567]86)    base_machine=i386 machine=i386/$machine ;;
-powerpc)       base_machine=powerpc machine=powerpc/powerpc32 ;;
-powerpc64)     base_machine=powerpc machine=powerpc/powerpc64 ;;
+i[4567]86)     base_machine=i386 machine=i386/$machine ;;
+powerpc64*)    base_machine=powerpc machine=powerpc/powerpc64 ;;
+powerpc*)      base_machine=powerpc machine=powerpc/powerpc32 ;;
 s390)           base_machine=s390 machine=s390/s390-32 ;;
 s390x)          base_machine=s390 machine=s390/s390-64 ;;
 sh3*)          base_machine=sh machine=sh/sh3 ;;
@@ -4217,7 +3999,7 @@ $as_echo_n "checking for assembler and linker STT_GNU_IFUNC support... " >&6; }
 if ${libc_cv_ld_gnu_indirect_function+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat > conftest.s <<EOF
+  cat > conftest.S <<EOF
 .type foo,%gnu_indirect_function
 foo:
 .globl _start
@@ -4225,12 +4007,16 @@ _start:
 .globl __start
 __start:
 .data
+#ifdef _LP64
+.quad foo
+#else
 .long foo
+#endif
 EOF
 libc_cv_ld_gnu_indirect_function=no
 if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
            -nostartfiles -nostdlib \
-           -o conftest conftest.s 1>&5 2>&5; then
+           -o conftest conftest.S 1>&5 2>&5; then
   # Do a link to see if the backend supports IFUNC relocs.
   $READELF -r conftest 1>&5
   LC_ALL=C $READELF -r conftest | grep 'no relocations' >/dev/null || {
@@ -4277,6 +4063,7 @@ if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then
     multi_arch=no
   fi
 fi
+multi_arch_d=
 if test x"$multi_arch" != xno; then
   multi_arch_d=/multiarch
 fi
@@ -4329,11 +4116,16 @@ while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
   set $m
   # Prepend the machine's FPU directory unless --without-fp.
   if test "$with_fp" = yes; then
-    mach="$mach /$1/fpu"
+    maybe_fpu=/fpu
   else
-    mach="$mach /$1/nofpu"
+    maybe_fpu=/nofpu
   fi
-  mach="$mach /$1"
+  # For each machine term, try it with and then without /multiarch.
+  for try_fpu in $maybe_fpu ''; do
+    for try_multi in $multi_arch_d ''; do
+      mach="$mach /$1$try_fpu$try_multi"
+    done
+  done
   tail="$2"
 done
 
@@ -4347,15 +4139,16 @@ for b in $base ''; do
       test "$v" = / && continue
       for o in /$ostry ''; do
        test "$o" = / && continue
-       for m in $multi_arch_d $mach ''; do
+       for m in $mach ''; do
          for d in $add_ons_pfx ''; do
            for a in $add_ons_sfx ''; do
-             if test -n "$m0$m0sub$b$v$o$m$msub"; then
+             try_suffix="$m0$b$v$o$m"
+             if test -n "$try_suffix"; then
                try_srcdir="${srcdir}/"
                case "$d" in
                /*) try_srcdir= ;;
                esac
-               try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
+               try="${d}sysdeps$try_suffix$a"
                test -n "$enable_debug_configure" &&
                echo "$0 DEBUG: try $try" >&2
                if test -d "$try_srcdir$try"; then
@@ -4905,7 +4698,7 @@ $as_echo_n "checking version of $CC... " >&6; }
   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    4.[3-9].* | 4.[1-9][0-9].* | [5-9].* )
+    4.[4-9].* | 4.[1-9][0-9].* | [5-9].* )
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
@@ -5221,7 +5014,7 @@ $as_echo_n "checking version of $AWK... " >&6; }
   ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    [3-9].*)
+    3.1.[2-9]*|3.[2-9]*|[4-9]*)
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
@@ -5419,12 +5212,11 @@ if test -n "$sysheaders"; then
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
   if test -n "$CXX"; then
     CXX_SYSINCLUDES=
-    cxxmachine=`$CXX -dumpmachine 2>&5` &&
-    cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
-       | sed -n -e '1,/#include/d' -e '/^ \//{p;q;}' | sed 's/ //'`
-    test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
-    CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
--isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+    for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
+    | sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do
+      test "x$cxxheaders" != x &&
+      CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders"
+    done
   fi
 fi
 
@@ -5828,90 +5620,6 @@ if test $libc_cv_asm_unique_object = yes; then
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .symver assembler directive" >&5
-$as_echo_n "checking for .symver assembler directive... " >&6; }
-if ${libc_cv_asm_symver_directive+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.s <<EOF
-${libc_cv_dot_text}
-_sym:
-.symver _sym,sym@VERS
-EOF
-if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5; then
-  libc_cv_asm_symver_directive=yes
-else
-  libc_cv_asm_symver_directive=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_symver_directive" >&5
-$as_echo "$libc_cv_asm_symver_directive" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --version-script" >&5
-$as_echo_n "checking for ld --version-script... " >&6; }
-if ${libc_cv_ld_version_script_option+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test $libc_cv_asm_symver_directive = yes; then
-  cat > conftest.s <<EOF
-${libc_cv_dot_text}
-_sym:
-.symver _sym,sym@VERS
-EOF
-  cat > conftest.map <<EOF
-VERS_1 {
-       global: sym;
-};
-
-VERS_2 {
-       global: sym;
-} VERS_1;
-EOF
-  if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5; then
-    if { ac_try='${CC-cc} $CFLAGS $LDFLAGS -shared
-                               -o conftest.so conftest.o
-                               -nostartfiles -nostdlib
-                               -Wl,--version-script,conftest.map
-                      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
-      libc_cv_ld_version_script_option=yes
-    else
-      libc_cv_ld_version_script_option=no
-    fi
-  else
-    libc_cv_ld_version_script_option=no
-  fi
-else
-  libc_cv_ld_version_script_option=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_version_script_option" >&5
-$as_echo "$libc_cv_ld_version_script_option" >&6; }
-if test $shared != no &&
-   test $libc_cv_asm_symver_directive = yes &&
-   test $libc_cv_ld_version_script_option = yes &&
-   test $enable_versioning = yes; then
-  VERSIONING=yes
-  $as_echo "#define DO_VERSIONING 1" >>confdefs.h
-
-else
-  VERSIONING=no
-fi
-
-
-if test $shared != no && test $VERSIONING = no; then
-  echo "\
-*** WARNING: You should not compile GNU libc without versioning. Not using
-*** versioning will introduce incompatibilities so that old binaries
-*** will not run anymore.
-*** For versioning you need recent binutils (binutils-2.8.1.0.23 or newer)."
-fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .previous assembler directive" >&5
 $as_echo_n "checking for .previous assembler directive... " >&6; }
 if ${libc_cv_asm_previous_directive+:} false; then :
@@ -6231,86 +5939,101 @@ if test $libc_cv_cc_with_libunwind = yes; then
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z nodelete option" >&5
-$as_echo_n "checking for -z nodelete option... " >&6; }
-if ${libc_cv_z_nodelete+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.c <<EOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z nodelete" >&5
+$as_echo_n "checking for linker that supports -z nodelete... " >&6; }
+libc_linker_feature=no
+if test x"$gnu_ld" = x"yes"; then
+  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z nodelete"`
+  if test -n "$libc_linker_check"; then
+    cat > conftest.c <<EOF
 int _start (void) { return 42; }
 EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-                  -fPIC -shared -o conftest.so conftest.c
-                  -nostartfiles -nostdlib
-                  -Wl,--enable-new-dtags,-z,nodelete 1>&5'
+    if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+                               -Wl,--enable-new-dtags,-z,nodelete -nostdlib -nostartfiles
+                               -fPIC -shared -o conftest.so conftest.c
+                               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
+    then
+      libc_linker_feature=yes
+    fi
+    rm -f conftest*
+  fi
+fi
+if test $libc_linker_feature = yes; then
   libc_cv_z_nodelete=yes
 else
   as_fn_error $? "linker with -z nodelete support required" "$LINENO" 5
 fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_nodelete" >&5
-$as_echo "$libc_cv_z_nodelete" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
+$as_echo "$libc_linker_feature" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z nodlopen option" >&5
-$as_echo_n "checking for -z nodlopen option... " >&6; }
-if ${libc_cv_z_nodlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.c <<EOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z nodlopen" >&5
+$as_echo_n "checking for linker that supports -z nodlopen... " >&6; }
+libc_linker_feature=no
+if test x"$gnu_ld" = x"yes"; then
+  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z nodlopen"`
+  if test -n "$libc_linker_check"; then
+    cat > conftest.c <<EOF
 int _start (void) { return 42; }
 EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-                       -fPIC -shared -o conftest.so conftest.c
-                       -nostartfiles -nostdlib
-                       -Wl,--enable-new-dtags,-z,nodlopen 1>&5'
+    if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+                               -Wl,--enable-new-dtags,-z,nodlopen -nostdlib -nostartfiles
+                               -fPIC -shared -o conftest.so conftest.c
+                               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
+    then
+      libc_linker_feature=yes
+    fi
+    rm -f conftest*
+  fi
+fi
+if test $libc_linker_feature = yes; then
   libc_cv_z_nodlopen=yes
 else
   as_fn_error $? "linker with -z nodlopen support required" "$LINENO" 5
 fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_nodlopen" >&5
-$as_echo "$libc_cv_z_nodlopen" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
+$as_echo "$libc_linker_feature" >&6; }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z initfirst option" >&5
-$as_echo_n "checking for -z initfirst option... " >&6; }
-if ${libc_cv_z_initfirst+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.c <<EOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z initfirst" >&5
+$as_echo_n "checking for linker that supports -z initfirst... " >&6; }
+libc_linker_feature=no
+if test x"$gnu_ld" = x"yes"; then
+  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z initfirst"`
+  if test -n "$libc_linker_check"; then
+    cat > conftest.c <<EOF
 int _start (void) { return 42; }
 EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-                       -fPIC -shared -o conftest.so conftest.c
-                       -nostartfiles -nostdlib
-                       -Wl,--enable-new-dtags,-z,initfirst 1>&5'
+    if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+                               -Wl,--enable-new-dtags,-z,initfirst -nostdlib -nostartfiles
+                               -fPIC -shared -o conftest.so conftest.c
+                               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
+    then
+      libc_linker_feature=yes
+    fi
+    rm -f conftest*
+  fi
+fi
+if test $libc_linker_feature = yes; then
   libc_cv_z_initfirst=yes
 else
   as_fn_error $? "linker with -z initfirst support required" "$LINENO" 5
 fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_initfirst" >&5
-$as_echo "$libc_cv_z_initfirst" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
+$as_echo "$libc_linker_feature" >&6; }
 
 # Add-on fragments can set these for other machines.
 libc_commonpagesize=${libc_commonpagesize:-no}
@@ -6507,32 +6230,37 @@ if test "$libc_cv_z_combreloc" = yes; then
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -z execstack" >&5
-$as_echo_n "checking for -z execstack... " >&6; }
-if ${libc_cv_z_execstack+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.c <<EOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z execstack" >&5
+$as_echo_n "checking for linker that supports -z execstack... " >&6; }
+libc_linker_feature=no
+if test x"$gnu_ld" = x"yes"; then
+  libc_linker_check=`$LD -v --help 2>/dev/null | grep "\-z execstack"`
+  if test -n "$libc_linker_check"; then
+    cat > conftest.c <<EOF
 int _start (void) { return 42; }
 EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-                           -fPIC -shared -o conftest.so conftest.c
-                           -Wl,-z,execstack -nostdlib
-                           1>&5'
+    if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+                               -Wl,-z,execstack -nostdlib -nostartfiles
+                               -fPIC -shared -o conftest.so conftest.c
+                               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
+    then
+      libc_linker_feature=yes
+    fi
+    rm -f conftest*
+  fi
+fi
+if test $libc_linker_feature = yes; then
   libc_cv_z_execstack=yes
 else
   libc_cv_z_execstack=no
 fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_z_execstack" >&5
-$as_echo "$libc_cv_z_execstack" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
+$as_echo "$libc_linker_feature" >&6; }
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fpie" >&5
@@ -7113,6 +6841,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_nofma" >&5
 $as_echo "$libc_cv_cc_nofma" >&6; }
 
+
 if test -n "$submachine"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5
 $as_echo_n "checking for compiler option for CPU variant... " >&6; }
@@ -7141,6 +6870,38 @@ $as_echo "$libc_cv_cc_submachine" >&6; }
 fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__))" >&5
+$as_echo_n "checking if $CC accepts -fno-tree-loop-distribute-patterns with \
+__attribute__ ((__optimize__))... " >&6; }
+if ${libc_cv_cc_loop_to_function+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.c <<EOF
+void
+__attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
+foo (void) {}
+EOF
+libc_cv_cc_loop_to_function=no
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c'
+  { { 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_cc_loop_to_function=yes
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_loop_to_function" >&5
+$as_echo "$libc_cv_cc_loop_to_function" >&6; }
+if test $libc_cv_cc_loop_to_function = yes; then
+  $as_echo "#define HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1" >>confdefs.h
+
+fi
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
 $as_echo_n "checking for libgd... " >&6; }
 if test "$with_gd" != "no"; then
@@ -7568,14 +7329,6 @@ fi
 
 
 
-
-
-
-
-
-
-
-
 if test x$use_ldconfig = xyes; then
   $as_echo "#define USE_LDCONFIG 1" >>confdefs.h