X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=configure;h=c773c487b542b3beb12fa2c70c8ea123b7bee5cd;hb=02d8b5ab1c89bcef2627d2b621bfb35b573852c2;hp=89566c54c69e0d5c10bc1b9934035dca0aefe37f;hpb=f4a58f0d3577546bb3978b042863ba0ef82a7d18;p=thirdparty%2Fglibc.git diff --git a/configure b/configure index 89566c54c69..c773c487b54 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for GNU C Library (see version.h). # -# Report bugs to . +# Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -197,8 +197,7 @@ test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -267,7 +266,7 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: http://sourceware.org/bugzilla/ about your system, +$0: https://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." @@ -582,12 +581,11 @@ PACKAGE_NAME='GNU C Library' PACKAGE_TARNAME='glibc' PACKAGE_VERSION='(see version.h)' PACKAGE_STRING='GNU C Library (see version.h)' -PACKAGE_BUGREPORT='http://sourceware.org/bugzilla/' +PACKAGE_BUGREPORT='https://sourceware.org/bugzilla/' PACKAGE_URL='http://www.gnu.org/software/glibc/' ac_unique_file="include/features.h" enable_option_checking=no -ac_includes_default='/* none */' ac_subst_vars='LTLIBOBJS LIBOBJS RELEASE @@ -596,25 +594,26 @@ mach_interface_list DEFINES static_nss profile +libc_cv_multidir +libc_cv_pie_default +libc_cv_cc_pie_default libc_cv_pic_default shared static ldd_rewrite_script use_ldconfig -libc_cv_forced_unwind libc_cv_rootsbindir libc_cv_localstatedir libc_cv_sysconfdir -libc_cv_localedir +libc_cv_complocaledir libc_cv_rtlddir libc_cv_slibdir -old_glibc_headers use_nscd libc_cv_gcc_unwind_find_fde libc_extra_cppflags libc_extra_cflags +libc_cv_cxx_thread_local CPPUNDEFS -sizeof_long_double have_selinux have_libcap have_libaudit @@ -622,27 +621,31 @@ LIBGD libc_cv_cc_loop_to_function libc_cv_cc_submachine libc_cv_cc_nofma -exceptions -gnu89_inline -libc_cv_ssp +libc_cv_mtls_dialect_gnu2 fno_unit_at_a_time libc_cv_output_format +libc_cv_has_glob_dat libc_cv_hashstyle libc_cv_fpie libc_cv_z_execstack libc_cv_z_combreloc ASFLAGS_config -libc_cv_Bgroup libc_cv_cc_with_libunwind -BISON +libc_cv_insert +libc_cv_protected_data INSTALL_INFO PERL BASH_SHELL -libc_cv_gcc_static_libgcc +CXX_BITS_STD_ABS_H +CXX_CMATH_HEADER +CXX_CSTDLIB_HEADER CXX_SYSINCLUDES SYSINCLUDES +PYTHON +PYTHON_PROG AUTOCONF NM +BISON AWK SED MAKEINFO @@ -650,6 +653,7 @@ MSGFMT MAKE LD AS +GPROF OBJCOPY OBJDUMP AR @@ -657,29 +661,37 @@ LN_S INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM -sysdeps_add_ons sysnames submachine multi_arch +libc_cv_textrel_ifunc +no_stack_protector +stack_protector +libc_cv_ssp +libc_cv_with_fp base_machine -add_on_subdirs -add_ons +have_tunables build_pt_chown build_nscd +build_obsolete_nsl link_obsolete_rpc +libc_cv_static_nss_crypt libc_cv_nss_crypt +build_crypt +experimental_malloc +enable_werror all_warnings force_install bindnow -enable_lock_elision hardcoded_path_in_tests +enable_timezone_tools +extra_nonshared_cflags use_default_link sysheaders -with_fp -READELF ac_ct_CXX CXXFLAGS CXX +READELF CPP cross_compiling BUILD_CC @@ -748,32 +760,40 @@ with_bugurl with_gd with_gd_include with_gd_lib -with_fp with_binutils with_selinux with_headers with_default_link +with_nonshared_cflags enable_sanity_checks enable_shared enable_profile +enable_static_pie +enable_timezone_tools enable_hardcoded_path_in_tests enable_stackguard_randomization -enable_lock_elision -enable_add_ons enable_hidden_plt enable_bind_now +enable_stack_protector enable_static_nss enable_force_install enable_maintainer_mode enable_kernel enable_all_warnings +enable_werror enable_multi_arch +enable_experimental_malloc +enable_crypt enable_nss_crypt enable_obsolete_rpc +enable_obsolete_nsl enable_systemtap enable_build_nscd enable_nscd enable_pt_chown +enable_tunables +enable_mathvec +enable_cet with_cpu ' ac_precious_vars='build_alias @@ -788,8 +808,7 @@ CPP CXX CXXFLAGS CCC' -ac_subdirs_all=' -' +ac_subdirs_all='' # Initialize some variables set by options. ac_init_help= @@ -1406,19 +1425,21 @@ Optional Features: in special situations) [default=yes] --enable-shared build shared library [default=yes if GNU ld] --enable-profile build profiled library [default=no] + --enable-static-pie enable static PIE support and use it in the + testsuite [default=no] + --disable-timezone-tools + do not install timezone tools [default=install] --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 --disable-hidden-plt do not hide internal function calls to avoid PLT --enable-bind-now disable lazy relocations in DSOs + --enable-stack-protector=[yes|no|all|strong] + Use -fstack-protector[-all|-strong] to detect glibc + buffer overflows --enable-static-nss build static NSS modules [default=no] --disable-force-install don't force installation of files from this package, even if they are older than the installed files @@ -1428,15 +1449,28 @@ Optional Features: --enable-kernel=VERSION compile for compatibility with kernel not older than VERSION --enable-all-warnings enable all useful warnings gcc can issue + --disable-werror do not build with -Werror --enable-multi-arch enable single DSO with optimizations for multiple architectures + --disable-experimental-malloc + disable experimental malloc features + --disable-crypt do not build nor install the passphrase hashing + library, libcrypt --enable-nss-crypt enable libcrypt to use nss --enable-obsolete-rpc build and install the obsolete RPC code for link-time usage + --enable-obsolete-nsl build and install the obsolete libnsl library and + depending NSS modules --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 + --enable-tunables Enable tunables support. Known values are 'yes', + 'no' and 'valstring' + --enable-mathvec Enable building and installing mathvec [default + depends on architecture] + --enable-cet enable Intel Control-flow Enforcement Technology + (CET), x86 only Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1446,12 +1480,13 @@ Optional Packages: --with-gd=DIR find libgd include dir and library with prefix DIR --with-gd-include=DIR find libgd include files in DIR --with-gd-lib=DIR find libgd library files in DIR - --with-fp if using floating-point hardware [default=yes] --with-binutils=PATH specify location of binutils (as and ld) --with-selinux if building with SELinux support --with-headers=PATH location of system headers to use (for example /usr/src/linux/include) [default=compiler default] --with-default-link do not use explicit linker scripts + --with-nonshared-cflags=CFLAGS + build nonshared libraries with additional CFLAGS --with-cpu=CPU select code for CPU variant Some influential environment variables: @@ -1469,7 +1504,7 @@ 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 . +Report bugs to . GNU C Library home page: . General help using GNU software: . _ACEOF @@ -1624,10 +1659,10 @@ fi } # ac_fn_cxx_try_compile -# ac_fn_c_try_link LINENO -# ----------------------- +# ac_fn_cxx_try_link LINENO +# ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () +ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext @@ -1647,7 +1682,7 @@ $as_echo "$ac_try_echo"; } >&5 fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -1668,15 +1703,15 @@ fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_link +} # ac_fn_cxx_try_link -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -1684,216 +1719,37 @@ case "(($ac_try" in esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { 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_try") 2>&5 + (eval "$ac_link") 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; }; }; then : + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : ac_retval=0 else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=1 fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_run - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -2342,12 +2198,12 @@ _ACEOF # We require GCC, and by default use its preprocessor. Override AC_PROG_CPP # here to work around the Autoconf issue discussed in -# . +# . # AC_PROG_CPP # We require GCC. Override _AC_PROG_CC_C89 here to work around the Autoconf # issue discussed in -# . +# . @@ -2982,6 +2838,99 @@ if test -z "$CPP"; then CPP="$CC -E" 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 as_fn_executable_p "$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 as_fn_executable_p "$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 + + # We need the C++ compiler only for testing. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -3240,100 +3189,76 @@ 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 -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 : +# It's useless to us if it can't link programs (e.g. missing -lstdc++). + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX can link programs" >&5 +$as_echo_n "checking whether $CXX can link programs... " >&6; } +if ${libc_cv_cxx_link_ok+:} 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 as_fn_executable_p "$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 + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -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; } +# Default, dynamic case. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + libc_cv_cxx_link_ok=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + libc_cv_cxx_link_ok=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +# Static case. +old_LDFLAGS="$LDFLAGS" +LDFLAGS="$LDFLAGS -static" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -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 as_fn_executable_p "$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 +int +main() +{ + std::cout << "Hello, world!"; + return 0; +} -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 +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : - 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" + libc_cv_cxx_link_ok=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LDFLAGS="$old_LDFLAGS" +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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cxx_link_ok" >&5 +$as_echo "$libc_cv_cxx_link_ok" >&6; } +if test $libc_cv_cxx_link_ok != yes; then : + CXX= +fi -if test "`cd $srcdir; /bin/pwd`" = "`/bin/pwd`"; then +if test "`cd $srcdir; pwd -P`" = "`pwd -P`"; then as_fn_error $? "you must configure in a separate build directory" "$LINENO" 5 fi @@ -3383,15 +3308,6 @@ libgd-LDFLAGS = $libgd_ldflags" fi -# Check whether --with-fp was given. -if test "${with_fp+set}" = set; then : - withval=$with_fp; with_fp=$withval -else - with_fp=yes -fi - - - # Check whether --with-binutils was given. if test "${with_binutils+set}" = set; then : withval=$with_binutils; path_binutils=$withval @@ -3428,6 +3344,16 @@ else fi + +# Check whether --with-nonshared-cflags was given. +if test "${with_nonshared_cflags+set}" = set; then : + withval=$with_nonshared_cflags; extra_nonshared_cflags=$withval +else + extra_nonshared_cflags= +fi + + + # Check whether --enable-sanity-checks was given. if test "${enable_sanity_checks+set}" = set; then : enableval=$enable_sanity_checks; enable_sanity=$enableval @@ -3450,6 +3376,21 @@ else profile=no fi +# Check whether --enable-static-pie was given. +if test "${enable_static_pie+set}" = set; then : + enableval=$enable_static_pie; static_pie=$enableval +else + static_pie=no +fi + +# Check whether --enable-timezone-tools was given. +if test "${enable_timezone_tools+set}" = set; then : + enableval=$enable_timezone_tools; enable_timezone_tools=$enableval +else + enable_timezone_tools=yes +fi + + # Check whether --enable-hardcoded-path-in-tests was given. if test "${enable_hardcoded_path_in_tests+set}" = set; then : @@ -3472,27 +3413,6 @@ 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; -else - enable_add_ons=yes -fi - - # Check whether --enable-hidden-plt was given. if test "${enable_hidden_plt+set}" = set; then : enableval=$enable_hidden_plt; hidden=$enableval @@ -3513,6 +3433,22 @@ else fi +if test "x$bindnow" = xyes; then + $as_echo "#define BIND_NOW 1" >>confdefs.h + +fi + +# Check whether --enable-stack-protector was given. +if test "${enable_stack_protector+set}" = set; then : + enableval=$enable_stack_protector; enable_stack_protector=$enableval +else + enable_stack_protector=no +fi + +case "$enable_stack_protector" in +all|yes|no|strong) ;; +*) as_fn_error $? "Not a valid argument for --enable-stack-protector: \"$enable_stack_protector\"" "$LINENO" 5;; +esac # Check whether --enable-static-nss was given. if test "${enable_static_nss+set}" = set; then : @@ -3565,6 +3501,15 @@ fi +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; enable_werror=$enableval +else + enable_werror=yes +fi + + + # Check whether --enable-multi-arch was given. if test "${enable_multi_arch+set}" = set; then : enableval=$enable_multi_arch; multi_arch=$enableval @@ -3573,6 +3518,24 @@ else fi +# Check whether --enable-experimental-malloc was given. +if test "${enable_experimental_malloc+set}" = set; then : + enableval=$enable_experimental_malloc; experimental_malloc=$enableval +else + experimental_malloc=yes +fi + + + +# Check whether --enable-crypt was given. +if test "${enable_crypt+set}" = set; then : + enableval=$enable_crypt; build_crypt=$enableval +else + build_crypt=yes +fi + + + # Check whether --enable-nss-crypt was given. if test "${enable_nss_crypt+set}" = set; then : enableval=$enable_nss_crypt; nss_crypt=$enableval @@ -3580,13 +3543,22 @@ else nss_crypt=no fi +if test x$build_libcrypt = xno && test x$nss_crypt = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-nss-crypt has no effect when libcrypt is disabled" >&5 +$as_echo "$as_me: WARNING: --enable-nss-crypt has no effect when libcrypt is disabled" >&2;} + nss_crypt=no +fi if test x$nss_crypt = xyes; then nss_includes=-I$(nss-config --includedir 2>/dev/null) if test $? -ne 0; then as_fn_error $? "cannot find include directory with nss-config" "$LINENO" 5 fi + nspr_includes=-I$(nspr-config --includedir 2>/dev/null) + if test $? -ne 0; then + as_fn_error $? "cannot find include directory with nspr-config" "$LINENO" 5 + fi old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $nss_includes" + CFLAGS="$CFLAGS $nss_includes $nspr_includes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3610,6 +3582,7 @@ cannot find NSS headers with lowlevel hash function interfaces" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext old_LIBS="$LIBS" + old_LDFLAGS="$LDFLAGS" LIBS="$LIBS -lfreebl3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3632,14 +3605,41 @@ cannot link program using lowlevel NSS hash functions" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + # Check to see if there is a static NSS cryptographic library. + # If there isn't then we can't link anything with libcrypt.a, + # and that might mean disabling some static tests. + LDFLAGS="$LDFLAGS -static" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int PRBool; +#include +#include +int +main () +{ +NSSLOW_Init(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libc_cv_static_nss_crypt=yes +else + libc_cv_static_nss_crypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" else libc_cv_nss_crypt=no + libc_cv_static_nss_crypt=no fi + # Check whether --enable-obsolete-rpc was given. if test "${enable_obsolete_rpc+set}" = set; then : enableval=$enable_obsolete_rpc; link_obsolete_rpc=$enableval @@ -3654,6 +3654,20 @@ if test "$link_obsolete_rpc" = yes; then fi +# Check whether --enable-obsolete-nsl was given. +if test "${enable_obsolete_nsl+set}" = set; then : + enableval=$enable_obsolete_nsl; build_obsolete_nsl=$enableval +else + build_obsolete_nsl=no +fi + + + +if test "$build_obsolete_nsl" = yes; then + $as_echo "#define LINK_OBSOLETE_NSL 1" >>confdefs.h + +fi + # Check whether --enable-systemtap was given. if test "${enable_systemtap+set}" = set; then : enableval=$enable_systemtap; systemtap=$enableval @@ -3668,7 +3682,7 @@ if ${libc_cv_sdt+:} false; then : $as_echo_n "(cached) " >&6 else old_CFLAGS="$CFLAGS" - CFLAGS="-std=gnu99 $CFLAGS" + CFLAGS="-std=gnu11 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -3730,6 +3744,47 @@ if test "$build_pt_chown" = yes; then fi +# Check whether --enable-tunables was given. +if test "${enable_tunables+set}" = set; then : + enableval=$enable_tunables; have_tunables=$enableval +else + have_tunables=yes +fi + + +if test "$have_tunables" = yes; then + $as_echo "#define HAVE_TUNABLES 1" >>confdefs.h + +fi + +# The abi-tags file 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 of `gnu*' here to be `gnu-gnu*' just so that it can tell. +# This doesn't get used much beyond that, so it's fairly safe. +case "$host_os" in +linux*) + ;; +gnu*) + host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'` + ;; +esac + +# Check whether --enable-mathvec was given. +if test "${enable_mathvec+set}" = set; then : + enableval=$enable_mathvec; build_mathvec=$enableval +else + build_mathvec=notset +fi + + +# Check whether --enable-cet was given. +if test "${enable_cet+set}" = set; then : + enableval=$enable_cet; enable_cet=$enableval +else + enable_cet=no +fi + + # We keep the original values in `$config_*' and never modify them, so we # can write them unchanged into config.make. Everything else uses # $machine, $vendor, and $os, and changes them whenever convenient. @@ -3742,7 +3797,7 @@ config_os="`echo $config_os | sed 's/^unknown-//'`" # Some configurations imply other options. elf=yes -# The configure fragment of an add-on port can modify these to supplement +# The configure fragment of a port can modify these to supplement # or override the table in the case statement below. No fragment should # ever change the config_* variables, however. machine=$config_machine @@ -3763,139 +3818,19 @@ if test "${with_cpu+set}" = set; then : fi -if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null` -then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5 -$as_echo_n "checking for sysdeps preconfigure fragments... " >&6; } - for frag in $frags; do - name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'` - echo $ECHO_N "$name $ECHO_C" >&6 - . "$frag" - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -fi - -# An add-on can set this when it wants to disable the sanity check below. +# An preconfigure script can set this when it wants to disable the sanity +# check below. libc_config_ok=no -subdirs="$subdirs " - - -case "$enable_add_ons" in -''|no) add_ons= ;; -yes|'*') - add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps | - sed 's@/[^/]*$@@' | sort | uniq` - add_ons_automatic=yes - ;; -*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'` - add_ons_automatic=no ;; -esac - -configured_add_ons= -add_ons_sfx= -add_ons_pfx= -if test x"$add_ons" != x; then - for f in $add_ons; do - # Some sanity checks - case "$f" in - crypt) - as_fn_error $? " -*** It seems that you're using an old \`crypt' add-on. crypt is now -*** part of glibc and using the old add-on will not work with this -*** release. Start again with fresh sources and without the old -*** \`crypt' add-on." "$LINENO" 5 - ;; - localedata) - as_fn_error $? " -*** It seems that you're using an old \`localedata' add-on. localedata -*** is now part of glibc and using the old add-on will not work with -*** this release. Start again with fresh sources and without the old -*** \`localedata' add-on." "$LINENO" 5 - ;; - esac - done - - # Now source each add-on's configure fragment. - # The fragments can use $srcdir/$libc_add_on to find themselves, - # and test $add_ons_automatic to see if they were explicitly requested. - # A fragment can clear (or even change) $libc_add_on to affect - # whether it goes into the list to be actually used in the build. - use_add_ons= - for libc_add_on in $add_ons; do - # Test whether such a directory really exists. - # It can be absolute, or relative to $srcdir, or relative to the build dir. - case "$libc_add_on" in - /*) - libc_add_on_srcdir=$libc_add_on - ;; - *) - test -d "$srcdir/$libc_add_on" || { - if test -d "$libc_add_on"; then - libc_add_on="`pwd`/$libc_add_on" - else - as_fn_error $? "add-on directory \"$libc_add_on\" does not exist" "$LINENO" 5 - fi - } - libc_add_on_srcdir=$srcdir/$libc_add_on - ;; - esac +# A preconfigure script for a system that may or may not use fpu +# sysdeps directories sets this to a preprocessor conditional for +# whether to use such directories. +with_fp_cond=1 - libc_add_on_frag=$libc_add_on_srcdir/configure - libc_add_on_canonical= - libc_add_on_config_subdirs= - if test -r "$libc_add_on_frag"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: running configure fragment for add-on $libc_add_on" >&5 -$as_echo "$as_me: running configure fragment for add-on $libc_add_on" >&6;} - libc_add_on_canonical=unknown - libc_add_on_subdirs= - . "$libc_add_on_frag" - test -z "$libc_add_on" || { - configured_add_ons="$configured_add_ons $libc_add_on" - if test "x$libc_add_on_canonical" = xunknown; then - as_fn_error $? "fragment must set \$libc_add_on_canonical" "$LINENO" 5 - fi - for d in $libc_add_on_subdirs; do - case "$libc_add_on" in - /*) subdir_srcdir="$libc_add_on" ;; - *) subdir_srcdir="\$(..)$libc_add_on" ;; - esac - case "$d" in - .) - d="${libc_add_on_canonical:-$libc_add_on}" - ;; - /*) - subdir_srcdir="$d" - ;; - *) - subdir_srcdir="$subdir_srcdir/$d" - ;; - esac - d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'` - add_on_subdirs="$add_on_subdirs $d" - test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars -$d-srcdir = $subdir_srcdir" - done - for d in $libc_add_on_config_subdirs; do - case "$d" in - /*) as_fn_error $? "fragment uses absolute path in \$libc_add_on_config_subdirs" "$LINENO" 5 ;; - esac - if test ! -d "$libc_add_on_srcdir/$d"; then - as_fn_error $? "fragment wants to configure missing directory $d" "$LINENO" 5 - fi - case "$libc_add_on" in - /*) as_fn_error $? "relative path required for add-on using \$libc_add_on_config_subdirs" "$LINENO" 5 ;; - esac - subdirs="$subdirs $libc_add_on/$d" - done - } - fi - if test -n "$libc_add_on"; then - if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null` +if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null` then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking add-on $libc_add_on for preconfigure fragments" >&5 -$as_echo_n "checking add-on $libc_add_on for preconfigure fragments... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5 +$as_echo_n "checking for sysdeps preconfigure fragments... " >&6; } for frag in $frags; do name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'` echo $ECHO_N "$name $ECHO_C" >&6 @@ -3904,22 +3839,8 @@ $as_echo_n "checking add-on $libc_add_on for preconfigure fragments... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } fi - use_add_ons="$use_add_ons $libc_add_on" - add_ons_pfx="$add_ons_pfx $libc_add_on/" - test -z "$libc_add_on_canonical" || - add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical" - fi - done - # Use echo to strip excess whitespace. - add_ons="`echo $use_add_ons`" -fi - - -### -### I put this here to prevent those annoying emails from people who cannot -### read and try to compile glibc on unsupported platforms. --drepper ### ### By using the undocumented --enable-hacker-mode option for configure ### one can skip this test to make the configuration not fail for unsupported @@ -3930,13 +3851,12 @@ if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then *-linux* | *-gnu*) ;; *) - echo "*** The GNU C library is currently not available for this platform." - echo "*** So far nobody cared to port it and if there is no volunteer it" - echo "*** might never happen. So, if you have interest to see glibc on" - echo "*** this platform visit" - echo "*** http://www.gnu.org/software/libc/porting.html" - echo "*** and join the group of porters" - exit 1 + as_fn_error $? " +*** The GNU C library is currently unavailable for this platform. +*** If you are interested in seeing glibc on this platform visit +*** the \"How to submit a new port\" in the wiki: +*** https://sourceware.org/glibc/wiki/#Development +*** and join the community!" "$LINENO" 5 ;; esac fi @@ -3945,15 +3865,138 @@ fi test -n "$base_machine" || base_machine=$machine -# For the multi-arch option we need support in the assembler & linker. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler and linker STT_GNU_IFUNC support" >&5 -$as_echo_n "checking for assembler and linker STT_GNU_IFUNC support... " >&6; } -if ${libc_cv_ld_gnu_indirect_function+:} false; then : +# Determine whether to use fpu or nofpu sysdeps directories. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use of fpu sysdeps directories" >&5 +$as_echo_n "checking for use of fpu sysdeps directories... " >&6; } +if ${libc_cv_with_fp+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.S < conftest.c <&5 2>&5 ; then + libc_cv_with_fp=yes +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_with_fp" >&5 +$as_echo "$libc_cv_with_fp" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector" >&5 +$as_echo_n "checking for -fstack-protector... " >&6; } +if ${libc_cv_ssp+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -xc /dev/null -S -o /dev/null' + { { 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_ssp=yes +else + libc_cv_ssp=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5 +$as_echo "$libc_cv_ssp" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector-strong" >&5 +$as_echo_n "checking for -fstack-protector-strong... " >&6; } +if ${libc_cv_ssp_strong+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector-strong -xc /dev/null -S -o /dev/null' + { { 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_ssp_strong=yes +else + libc_cv_ssp_strong=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp_strong" >&5 +$as_echo "$libc_cv_ssp_strong" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector-all" >&5 +$as_echo_n "checking for -fstack-protector-all... " >&6; } +if ${libc_cv_ssp_all+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector-all -xc /dev/null -S -o /dev/null' + { { 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_ssp_all=yes +else + libc_cv_ssp_all=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp_all" >&5 +$as_echo "$libc_cv_ssp_all" >&6; } + +stack_protector= +no_stack_protector= +if test "$libc_cv_ssp" = yes; then + no_stack_protector="-fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0" + $as_echo "#define HAVE_CC_NO_STACK_PROTECTOR 1" >>confdefs.h + +fi + +if test "$enable_stack_protector" = yes && test "$libc_cv_ssp" = yes; then + stack_protector="-fstack-protector" + $as_echo "#define STACK_PROTECTOR_LEVEL 1" >>confdefs.h + +elif test "$enable_stack_protector" = all && test "$libc_cv_ssp_all" = yes; then + stack_protector="-fstack-protector-all" + $as_echo "#define STACK_PROTECTOR_LEVEL 2" >>confdefs.h + +elif test "$enable_stack_protector" = strong && test "$libc_cv_ssp_strong" = yes; then + stack_protector="-fstack-protector-strong" + $as_echo "#define STACK_PROTECTOR_LEVEL 3" >>confdefs.h + +else + stack_protector="-fno-stack-protector" + $as_echo "#define STACK_PROTECTOR_LEVEL 0" >>confdefs.h + +fi + + + + +if test -n "$stack_protector"; then + no_ssp=-fno-stack-protector +else + no_ssp= + + if test "$enable_stack_protector" != no; then + as_fn_error $? "--enable-stack-protector=$enable_stack_protector specified, but specified level of stack protection is not supported by the compiler." "$LINENO" 5 + fi +fi + +# For the multi-arch option we need support in the assembler & linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler and linker STT_GNU_IFUNC support" >&5 +$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 <&5 2>&5; then # Do a link to see if the backend supports IFUNC relocs. $READELF -r conftest 1>&5 @@ -3980,33 +4023,107 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_gnu_indirect_function" >&5 $as_echo "$libc_cv_ld_gnu_indirect_function" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .text pseudo-op must be used" >&5 -$as_echo_n "checking whether .text pseudo-op must be used... " >&6; } -if ${libc_cv_dot_text+:} false; then : +# Check if gcc supports attribute ifunc as it is used in libc_ifunc macro. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc attribute ifunc support" >&5 +$as_echo_n "checking for gcc attribute ifunc support... " >&6; } +if ${libc_cv_gcc_indirect_function+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.s < conftest.c <&5 \ + 2>&5 ; then + if $READELF -s conftest.o | grep IFUNC >/dev/null 2>&5; then + libc_cv_gcc_indirect_function=yes + fi +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_indirect_function" >&5 +$as_echo "$libc_cv_gcc_indirect_function" >&6; } + +# Check if linker supports textrel relocation with ifunc (used on elf/tests). +# Note that it relies on libc_cv_ld_gnu_indirect_function test above. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker supports textrels along with ifunc" >&5 +$as_echo_n "checking whether the linker supports textrels along with ifunc... " >&6; } +if ${libc_cv_textrel_ifunc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.S <&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_dot_text=.text + libc_cv_textrel_ifunc=yes + fi fi rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_textrel_ifunc" >&5 +$as_echo "$libc_cv_textrel_ifunc" >&6; } -if test -z "$libc_cv_dot_text"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + +# Check if gcc warns about alias for function with incompatible types. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler warns about alias for function with incompatible types" >&5 +$as_echo_n "checking if compiler warns about alias for function with incompatible types... " >&6; } +if ${libc_cv_gcc_incompatible_alias+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + cat > conftest.c <&5 2>&5 ; then + libc_cv_gcc_incompatible_alias=no fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_incompatible_alias" >&5 +$as_echo "$libc_cv_gcc_incompatible_alias" >&6; } if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then if test x"$multi_arch" = xyes; then @@ -4015,6 +4132,26 @@ if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then multi_arch=no fi fi +if test x"$libc_cv_gcc_indirect_function" != xyes; then + # GCC 8+ emits a warning for alias with incompatible types and it might + # fail to build ifunc resolvers aliases to either weak or internal + # symbols. Disables multiarch build in this case. + if test x"$libc_cv_gcc_incompatible_alias" == xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc emits a warning for alias between functions of incompatible types" >&5 +$as_echo "$as_me: WARNING: gcc emits a warning for alias between functions of incompatible types" >&2;} + if test x"$multi_arch" = xyes; then + as_fn_error $? "--enable-multi-arch support requires a gcc with gnu-indirect-function support" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Multi-arch is disabled." >&5 +$as_echo "$as_me: WARNING: Multi-arch is disabled." >&2;} + multi_arch=no + elif test x"$multi_arch" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-multi-arch support recommends a gcc with gnu-indirect-function support. +Please use a gcc which supports it by default or configure gcc with --enable-gnu-indirect-function" >&5 +$as_echo "$as_me: WARNING: --enable-multi-arch support recommends a gcc with gnu-indirect-function support. +Please use a gcc which supports it by default or configure gcc with --enable-gnu-indirect-function" >&2;} + fi +fi multi_arch_d= if test x"$multi_arch" != xno; then multi_arch_d=/multiarch @@ -4067,7 +4204,7 @@ tail=$machine${submachine:+/$submachine} 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 + if test "$libc_cv_with_fp" = yes; then maybe_fpu=/fpu else maybe_fpu=/nofpu @@ -4083,7 +4220,6 @@ done # Find what sysdep directories exist. -sysnames_add_ons= sysnames= for b in $base ''; do for m0 in $mach ''; do @@ -4092,34 +4228,21 @@ for b in $base ''; do for o in /$ostry ''; do test "$o" = / && continue for m in $mach ''; do - for d in $add_ons_pfx ''; do - for a in $add_ons_sfx ''; do - 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$try_suffix$a" - test -n "$enable_debug_configure" && - echo "$0 DEBUG: try $try" >&2 - if test -d "$try_srcdir$try"; then - sysnames="$sysnames $try" - { test -n "$o" || test -n "$b"; } && os_used=t - { test -n "$m" || test -n "$m0"; } && machine_used=t - case x${m0:-$m} in - x*/$submachine) submachine_used=t ;; - esac - if test -n "$d"; then - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - fi - fi - done - done + try_suffix="$m0$b$v$o$m" + if test -n "$try_suffix"; then + try_srcdir="${srcdir}/" + try="sysdeps$try_suffix" + test -n "$enable_debug_configure" && + echo "$0 DEBUG: try $try" >&2 + if test -d "$try_srcdir$try"; then + sysnames="$sysnames $try" + { test -n "$o" || test -n "$b"; } && os_used=t + { test -n "$m" || test -n "$m0"; } && machine_used=t + case x${m0:-$m} in + x*/$submachine) submachine_used=t ;; + esac + fi + fi done done done @@ -4128,7 +4251,7 @@ done # If the assembler supports gnu_indirect_function symbol type and the # architecture supports multi-arch, we enable multi-arch by default. -case $sysnames_add_ons$sysnames in +case $sysnames in *"$multi_arch_d"*) ;; *) @@ -4191,24 +4314,15 @@ while test $# -gt 0; do eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" found=yes fi - for d in $add_ons_pfx ''; do - try="${d}sysdeps/$x" - case $d in - /*) try_srcdir= ;; - *) try_srcdir=$srcdir/ ;; - esac - test -n "$enable_debug_configure" && - echo "DEBUG: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 - if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; - then - eval "${implies_type}=\"\$${implies_type} \$try\"" - found=yes - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - done + try="sysdeps/$x" + try_srcdir=$srcdir/ + test -n "$enable_debug_configure" && + echo "DEBUG: $name $implies_file $x try() {$try_srcdir}$try" >&2 + if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; + then + eval "${implies_type}=\"\$${implies_type} \$try\"" + found=yes + fi if test $found = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $name/$implies_file specifies nonexistent $x" >&5 $as_echo "$as_me: WARNING: $name/$implies_file specifies nonexistent $x" >&2;} @@ -4246,63 +4360,6 @@ sysnames="$names $default_sysnames" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_sysnames" >&5 $as_echo "$default_sysnames" >&6; } -# Collect the list of add-ons that supply partial sysdeps trees. -sysdeps_add_ons= -for add_on in $add_ons; do - case "$add_on" in - /*) xsrcdir= ;; - *) xsrcdir="$srcdir/" ;; - esac - - test -d "$xsrcdir$add_on/sysdeps" || { - case "$configured_add_ons " in - *" $add_on "*) ;; - *|'') - as_fn_error $? "add-on $add_on has no configure fragment or sysdeps tree" "$LINENO" 5 - ;; - esac - continue - } - - sysdeps_add_ons="$sysdeps_add_ons $add_on" - case "$sysnames_add_ons" in - *" $add_on/ "*) ;; - *|'') - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add-on $add_on contributed no sysdeps directories" >&5 -$as_echo "$as_me: WARNING: add-on $add_on contributed no sysdeps directories" >&2;} - continue ;; - esac - - found=no - for d in $sysnames; do - case "$d" in - $add_on/sysdeps/*) ;; - *) continue ;; - esac - (cd "$xsrcdir$d" && for f in *[!~]; do - case "$f" in - sys|bits) - for ff in $f/*.h; do - test -d "$ff" || { test -e "$ff" && exit 88; } - done - ;; - *) - test -d "$f" || { test -e "$f" && exit 88; } - ;; - esac - done) - if test $? -eq 88; then - found=yes - break - fi - done - if test $found = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add-on $add_on contributed no useful sysdeps directories" >&5 -$as_echo "$as_me: WARNING: add-on $add_on contributed no useful sysdeps directories" >&2;} - fi -done - - ### Locate tools. @@ -4429,6 +4486,8 @@ OBJDUMP=`$CC -print-prog-name=objdump` OBJCOPY=`$CC -print-prog-name=objcopy` +GPROF=`$CC -print-prog-name=gprof` + # Determine whether we are using GNU binutils. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5 @@ -4469,7 +4528,7 @@ $as_echo "$libc_cv_prog_ld_gnu" >&6; } gnu_ld=$libc_cv_prog_ld_gnu -# Accept binutils 2.20 or newer. +# Accept binutils 2.25 or newer. for ac_prog in $AS do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -4521,7 +4580,7 @@ $as_echo_n "checking version of $AS... " >&6; } ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*) + 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4533,7 +4592,10 @@ if test $ac_verc_fail = yes; then AS=: critic_missing="$critic_missing as" fi -for ac_prog in $LD + +if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then + # Accept gold 1.14 or higher + for ac_prog in $LD do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4581,10 +4643,10 @@ else # Found it, now check the version. { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 $as_echo_n "checking version of $LD... " >&6; } - ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU gold.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*) + 1.1[4-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4593,23 +4655,21 @@ $as_echo_n "checking version of $LD... " >&6; } $as_echo "$ac_prog_version" >&6; } fi if test $ac_verc_fail = yes; then - LD=: critic_missing="$critic_missing ld" + LD=: critic_missing="$critic_missing GNU gold" fi - -# These programs are version sensitive. - -for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc +else + for ac_prog in $LD do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; 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_CC+:} false; then : +if ${ac_cv_prog_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4618,7 +4678,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_prog" + ac_cv_prog_LD="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4628,29 +4688,29 @@ IFS=$as_save_IFS fi fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$CC" && break + test -n "$LD" && break done -if test -z "$CC"; then +if test -z "$LD"; then ac_verc_fail=yes else # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $CC" >&5 -$as_echo_n "checking version of $CC... " >&6; } - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 +$as_echo_n "checking version of $LD... " >&6; } + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ) + 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4659,9 +4719,13 @@ $as_echo_n "checking version of $CC... " >&6; } $as_echo "$ac_prog_version" >&6; } fi if test $ac_verc_fail = yes; then - critic_missing="$critic_missing gcc" + LD=: critic_missing="$critic_missing GNU ld" +fi + fi +# These programs are version sensitive. + for ac_prog in gnumake gmake make do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -4713,7 +4777,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + [4-9].* | [1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4840,7 +4904,7 @@ $as_echo_n "checking version of $MAKEINFO... " >&6; } ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 4.[5-9]*|4.[1-9][0-9]*|[5-9].*) + 4.[7-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;; @@ -4978,17 +5042,17 @@ if test $ac_verc_fail = yes; then critic_missing="$critic_missing gawk" fi - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. -set dummy ${ac_tool_prefix}nm; ac_word=$2 +for ac_prog in bison +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_NM+:} false; then : +if ${ac_cv_prog_BISON+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$NM"; then - ac_cv_prog_NM="$NM" # Let the user override the test. + if test -n "$BISON"; then + ac_cv_prog_BISON="$BISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4997,7 +5061,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_NM="${ac_tool_prefix}nm" + ac_cv_prog_BISON="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5007,56 +5071,152 @@ IFS=$as_save_IFS fi fi -NM=$ac_cv_prog_NM -if test -n "$NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 -$as_echo "$NM" >&6; } +BISON=$ac_cv_prog_BISON +if test -n "$BISON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 +$as_echo "$BISON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -fi -if test -z "$ac_cv_prog_NM"; then - ac_ct_NM=$NM - # Extract the first word of "nm", so it can be a program name with args. -set dummy nm; 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_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NM"; then - ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_NM="nm" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi + test -n "$BISON" && break done - done -IFS=$as_save_IFS +if test -z "$BISON"; then + ac_verc_fail=yes +else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $BISON" >&5 +$as_echo_n "checking version of $BISON... " >&6; } + ac_prog_version=`$BISON --version 2>&1 | sed -n 's/^.*bison (GNU Bison) \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.7*|[3-9].*|[1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } fi +if test $ac_verc_fail = yes; then + critic_missing="$critic_missing bison" fi -ac_ct_NM=$ac_cv_prog_ac_ct_NM -if test -n "$ac_ct_NM"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 -$as_echo "$ac_ct_NM" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc" >&5 +$as_echo_n "checking if $CC is sufficient to build libc... " >&6; } +if ${libc_cv_compiler_ok+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_ct_NM" = x; then +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#error insufficient compiler +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libc_cv_compiler_ok=yes +else + libc_cv_compiler_ok=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_ok" >&5 +$as_echo "$libc_cv_compiler_ok" >&6; } +if test $libc_cv_compiler_ok != yes; then : + critic_missing="$critic_missing compiler" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args. +set dummy ${ac_tool_prefix}nm; 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_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$NM"; then + ac_cv_prog_NM="$NM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_NM="${ac_tool_prefix}nm" + $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 +NM=$ac_cv_prog_NM +if test -n "$NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5 +$as_echo "$NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_NM"; then + ac_ct_NM=$NM + # Extract the first word of "nm", so it can be a program name with args. +set dummy nm; 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_NM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_NM"; then + ac_cv_prog_ac_ct_NM="$ac_ct_NM" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_NM="nm" + $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_NM=$ac_cv_prog_ac_ct_NM +if test -n "$ac_ct_NM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5 +$as_echo "$ac_ct_NM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_NM" = x; then NM="false" else case $cross_compiling:$ac_tool_warned in @@ -5142,17 +5302,84 @@ else AUTOCONF=no fi +# Check for python3 if available, or else python. +for ac_prog in python3 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_PYTHON_PROG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PYTHON_PROG"; then + ac_cv_prog_PYTHON_PROG="$PYTHON_PROG" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PYTHON_PROG="$ac_prog" + $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 +PYTHON_PROG=$ac_cv_prog_PYTHON_PROG +if test -n "$PYTHON_PROG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PROG" >&5 +$as_echo "$PYTHON_PROG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON_PROG" && break +done + +if test -z "$PYTHON_PROG"; then + ac_verc_fail=yes +else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $PYTHON_PROG" >&5 +$as_echo_n "checking version of $PYTHON_PROG... " >&6; } + ac_prog_version=`$PYTHON_PROG --version 2>&1 | sed -n 's/^.*Python \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } +fi +if test $ac_verc_fail = yes; then + critic_missing="$critic_missing python" +fi + +PYTHON="$PYTHON_PROG -B" + + test -n "$critic_missing" && as_fn_error $? " *** These critical programs are missing or too old:$critic_missing *** Check the INSTALL file for required versions." "$LINENO" 5 test -n "$aux_missing" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** These auxiliary programs are missing or incompatible versions:$aux_missing -*** some features will be disabled. +*** some features or tests will be disabled. *** Check the INSTALL file for required versions." >&5 $as_echo "$as_me: WARNING: *** These auxiliary programs are missing or incompatible versions:$aux_missing -*** some features will be disabled. +*** some features or tests will be disabled. *** Check the INSTALL file for required versions." >&2;} # if using special system headers, find out the compiler's sekrit @@ -5178,6 +5405,21 @@ fi +# Obtain some C++ header file paths. This is used to make a local +# copy of those headers in Makerules. +if test -n "$CXX"; then + find_cxx_header () { + echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \ + | sed -n "\,$1:,{s/:\$//;p}" + } + CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" + CXX_CMATH_HEADER="$(find_cxx_header cmath)" + CXX_BITS_STD_ABS_H="$(find_cxx_header bits/std_abs.h)" +fi + + + + # Test if LD_LIBRARY_PATH contains the notation for the current directory # since this would lead to problems installing/building glibc. # LD_LIBRARY_PATH contains the current directory if one of the following @@ -5204,21 +5446,6 @@ as_fn_error $? " *** and run configure again." "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GCC supports -static-libgcc" >&5 -$as_echo_n "checking whether GCC supports -static-libgcc... " >&6; } -if ${libc_cv_gcc_static_libgcc+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $CC -v -static-libgcc 2>&1 | grep 'unrecognized option.*static-libgcc' >/dev/null; then - libc_cv_gcc_static_libgcc= -else - libc_cv_gcc_static_libgcc=-static-libgcc -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_static_libgcc" >&5 -$as_echo "$libc_cv_gcc_static_libgcc" >&6; } - - # Extract the first word of "bash", so it can be a program name with args. set dummy bash; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -5348,114 +5575,6 @@ $as_echo "no" >&6; } fi -# Extract the first word of "bison", so it can be a program name with args. -set dummy bison; 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_path_BISON+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $BISON in - [\\/]* | ?:[\\/]*) - ac_cv_path_BISON="$BISON" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/local/bin:/usr/bin:/bin" -for as_dir in $as_dummy -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext" - $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 - - test -z "$ac_cv_path_BISON" && ac_cv_path_BISON="no" - ;; -esac -fi -BISON=$ac_cv_path_BISON -if test -n "$BISON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 -$as_echo "$BISON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libc-friendly stddef.h" >&5 -$as_echo_n "checking for libc-friendly stddef.h... " >&6; } -if ${libc_cv_friendly_stddef+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define __need_size_t -#define __need_wchar_t -#include -#define __need_NULL -#include -int -main () -{ -size_t size; wchar_t wchar; -#ifdef offsetof -#error stddef.h ignored __need_* -#endif -if (&size == NULL || &wchar == NULL) abort (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - libc_cv_friendly_stddef=yes -else - libc_cv_friendly_stddef=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_friendly_stddef" >&5 -$as_echo "$libc_cv_friendly_stddef" >&6; } -if test $libc_cv_friendly_stddef = yes; then - config_vars="$config_vars -override stddef.h = # The installed seems to be libc-friendly." -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to use -P to assemble .S files" >&5 -$as_echo_n "checking whether we need to use -P to assemble .S files... " >&6; } -if ${libc_cv_need_minus_P+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.S <&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_need_minus_P=no -else - libc_cv_need_minus_P=yes -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_need_minus_P" >&5 -$as_echo "$libc_cv_need_minus_P" >&6; } -if test $libc_cv_need_minus_P = yes; then - config_vars="$config_vars -asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives." -fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .set assembler directive" >&5 $as_echo_n "checking for .set assembler directive... " >&6; } @@ -5463,7 +5582,7 @@ if ${libc_cv_asm_set_directive+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.s <&5 2>&5; then libc_cv_asm_set_directive=yes else @@ -5490,175 +5609,72 @@ if test $libc_cv_asm_set_directive = yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler gnu_unique_object symbol type" >&5 -$as_echo_n "checking for assembler gnu_unique_object symbol type... " >&6; } -if ${libc_cv_asm_unique_object+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for protected data symbol" >&5 +$as_echo_n "checking linker support for protected data symbol... " >&6; } +if ${libc_cv_protected_data+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.s <&5 2>&5; then - libc_cv_asm_unique_object=yes -else - libc_cv_asm_unique_object=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_unique_object" >&5 -$as_echo "$libc_cv_asm_unique_object" >&6; } -if test $libc_cv_asm_unique_object = yes; then - $as_echo "#define HAVE_ASM_UNIQUE_OBJECT 1" >>confdefs.h - -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 : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <&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_asm_previous_directive=yes -else - libc_cv_asm_previous_directive=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_previous_directive" >&5 -$as_echo "$libc_cv_asm_previous_directive" >&6; } -if test $libc_cv_asm_previous_directive = yes; then - $as_echo "#define HAVE_ASM_PREVIOUS_DIRECTIVE 1" >>confdefs.h - -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .popsection assembler directive" >&5 -$as_echo_n "checking for .popsection assembler directive... " >&6; } -if ${libc_cv_asm_popsection_directive+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <&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_asm_popsection_directive=yes - else - libc_cv_asm_popsection_directive=no - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_popsection_directive" >&5 -$as_echo "$libc_cv_asm_popsection_directive" >&6; } - if test $libc_cv_asm_popsection_directive = yes; then - $as_echo "#define HAVE_ASM_POPSECTION_DIRECTIVE 1" >>confdefs.h - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .protected and .hidden assembler directive" >&5 -$as_echo_n "checking for .protected and .hidden assembler directive... " >&6; } -if ${libc_cv_asm_protected_directive+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s < conftest.c <&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_asm_protected_directive=yes -else - as_fn_error $? "assembler support for symbol visibility is required" "$LINENO" 5 -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_protected_directive" >&5 -$as_echo "$libc_cv_asm_protected_directive" >&6; } - -if test $libc_cv_asm_protected_directive = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((visibility())) is supported" >&5 -$as_echo_n "checking whether __attribute__((visibility())) is supported... " >&6; } -if ${libc_cv_visibility_attribute+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c < conftest.c <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then - if grep '\.hidden.*foo' conftest.s >/dev/null; then - if grep '\.protected.*bar' conftest.s >/dev/null; then - libc_cv_visibility_attribute=yes - fi - fi + libc_cv_protected_data=yes fi - rm -f conftest.{c,s} + fi + rm -f conftest.* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_visibility_attribute" >&5 -$as_echo "$libc_cv_visibility_attribute" >&6; } - if test $libc_cv_visibility_attribute != yes; then - as_fn_error $? "compiler support for visibility attribute is required" "$LINENO" 5 - fi -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_protected_data" >&5 +$as_echo "$libc_cv_protected_data" >&6; } + -if test $libc_cv_visibility_attribute = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken __attribute__((visibility()))" >&5 -$as_echo_n "checking for broken __attribute__((visibility()))... " >&6; } -if ${libc_cv_broken_visibility_attribute+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for INSERT in linker script" >&5 +$as_echo_n "checking linker support for INSERT in linker script... " >&6; } +if ${libc_cv_insert+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c < conftest.t <&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then - if grep '\.hidden[ _]foo' conftest.s >/dev/null; then - libc_cv_broken_visibility_attribute=no - fi - fi - rm -f conftest.c conftest.s + libc_cv_insert=yes + fi + rm -f conftest.* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_broken_visibility_attribute" >&5 -$as_echo "$libc_cv_broken_visibility_attribute" >&6; } - if test $libc_cv_broken_visibility_attribute = yes; then - as_fn_error $? "working compiler support for visibility attribute is required" "$LINENO" 5 - fi -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_insert" >&5 +$as_echo "$libc_cv_insert" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken __attribute__((alias()))" >&5 $as_echo_n "checking for broken __attribute__((alias()))... " >&6; } @@ -5694,65 +5710,25 @@ if test $libc_cv_broken_alias_attribute = yes; then as_fn_error $? "working alias attribute support required" "$LINENO" 5 fi -if test $libc_cv_visibility_attribute = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to put _rtld_local into .sdata section" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to put _rtld_local into .sdata section" >&5 $as_echo_n "checking whether to put _rtld_local into .sdata section... " >&6; } if ${libc_cv_have_sdata_section+:} false; then : $as_echo_n "(cached) " >&6 else echo "int i;" > conftest.c - libc_cv_have_sdata_section=no - if ${CC-cc} $LDFLAGS -fPIC -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \ - | grep '\.sdata' >/dev/null; then - libc_cv_have_sdata_section=yes - fi - rm -f conftest.c conftest.so + libc_cv_have_sdata_section=no + if ${CC-cc} $LDFLAGS -fPIC -shared -Wl,--verbose conftest.c -o conftest.so 2>&1 \ + | grep '\.sdata' >/dev/null; then + libc_cv_have_sdata_section=yes + fi + rm -f conftest.c conftest.so fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_sdata_section" >&5 $as_echo "$libc_cv_have_sdata_section" >&6; } - if test $libc_cv_have_sdata_section = yes; then - $as_echo "#define HAVE_SDATA_SECTION 1" >>confdefs.h +if test $libc_cv_have_sdata_section = yes; then + $as_echo "#define HAVE_SDATA_SECTION 1" >>confdefs.h - fi -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for .preinit_array/.init_array/.fini_array support" >&5 -$as_echo_n "checking for .preinit_array/.init_array/.fini_array support... " >&6; } -if ${libc_cv_initfini_array+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $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 - libc_cv_initfini_array=yes - else - libc_cv_initfini_array=no - fi -else - libc_cv_initfini_array=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_initfini_array" >&5 -$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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use .ctors/.dtors header and trailer" >&5 @@ -5769,7 +5745,7 @@ __attribute__ ((constructor)) void ctor (void) { asm (""); } __attribute__ ((destructor)) void dtor (void) { asm (""); } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -o conftest conftest.c -static -nostartfiles -nostdlib 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -5833,129 +5809,6 @@ if test $libc_cv_cc_with_libunwind = yes; then fi -{ $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 <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - 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 -{ $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 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 <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - 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 -{ $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 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 <&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } - 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 -{ $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 -Bgroup option" >&5 -$as_echo_n "checking for -Bgroup option... " >&6; } -if ${libc_cv_Bgroup+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <&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_Bgroup=yes -else - libc_cv_Bgroup=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_Bgroup" >&5 -$as_echo "$libc_cv_Bgroup" >&6; } - - ASFLAGS_config= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether --noexecstack is desirable for .S files" >&5 $as_echo_n "checking whether --noexecstack is desirable for .S files... " >&6; } @@ -6005,7 +5858,7 @@ extern int mumble; int foo (void) { return bar (mumble); } EOF if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c + -fPIC -shared $no_ssp -o conftest.so conftest.c -nostdlib -nostartfiles -Wl,-z,combreloc 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -6014,7 +5867,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $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 -E '.rela?.dyn' > /dev/null; then libc_cv_z_combreloc=yes else libc_cv_z_combreloc=no @@ -6041,7 +5894,7 @@ if test x"$gnu_ld" = x"yes"; then cat > conftest.c <&5' @@ -6065,6 +5918,62 @@ fi $as_echo "$libc_linker_feature" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports --no-dynamic-linker" >&5 +$as_echo_n "checking for linker that supports --no-dynamic-linker... " >&6; } +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\--no-dynamic-linker"` + if test -n "$libc_linker_check"; then + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then + libc_cv_no_dynamic_linker=yes +else + libc_cv_no_dynamic_linker=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5 +$as_echo "$libc_linker_feature" >&6; } +config_vars="$config_vars +have-no-dynamic-linker = $libc_cv_no_dynamic_linker" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -static-pie" >&5 +$as_echo_n "checking for -static-pie... " >&6; } +if ${libc_cv_static_pie+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -static-pie -xc /dev/null -S -o /dev/null' + { { 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_static_pie=yes +else + libc_cv_static_pie=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_static_pie" >&5 +$as_echo "$libc_cv_static_pie" >&6; } +config_vars="$config_vars +have-static-pie = $libc_cv_static_pie" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fpie" >&5 $as_echo_n "checking for -fpie... " >&6; } if ${libc_cv_fpie+:} false; then : @@ -6095,7 +6004,7 @@ else cat > conftest.c <&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -6170,12 +6079,45 @@ $ac_try" ;; esac fi - rm -f conftest* + 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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5 +$as_echo_n "checking for GLOB_DAT reloc... " >&6; } +if ${libc_cv_has_glob_dat+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then + if $READELF -rW conftest.so | grep '_GLOB_DAT' > /dev/null; then + libc_cv_has_glob_dat=yes + else + libc_cv_has_glob_dat=no + fi +else + libc_cv_has_glob_dat=no 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 +rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_has_glob_dat" >&5 +$as_echo "$libc_cv_has_glob_dat" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker output format" >&5 $as_echo_n "checking linker output format... " >&6; } @@ -6183,7 +6125,7 @@ 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` +${CC-cc} -nostartfiles -nostdlib $no_ssp -Wl,--print-output-format 2>&5` then : else @@ -6226,62 +6168,37 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector" >&5 -$as_echo_n "checking for -fstack-protector... " >&6; } -if ${libc_cv_ssp+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -xc /dev/null -S -o /dev/null' - { { 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_ssp=yes -else - libc_cv_ssp=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5 -$as_echo "$libc_cv_ssp" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fgnu89-inline" >&5 -$as_echo_n "checking for -fgnu89-inline... " >&6; } -if ${libc_cv_gnu89_inline+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mtls-dialect=gnu2" >&5 +$as_echo_n "checking for -mtls-dialect=gnu2... " >&6; } +if ${libc_cv_mtls_dialect_gnu2+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&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_gnu89_inline=yes + libc_cv_mtls_dialect_gnu2=yes else - libc_cv_gnu89_inline=no + libc_cv_mtls_dialect_gnu2=no fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gnu89_inline" >&5 -$as_echo "$libc_cv_gnu89_inline" >&6; } -if test $libc_cv_gnu89_inline = yes; then - gnu89_inline=-fgnu89-inline -else - gnu89_inline= -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mtls_dialect_gnu2" >&5 +$as_echo "$libc_cv_mtls_dialect_gnu2" >&6; } +config_vars="$config_vars +have-mtls-dialect-gnu2 = $libc_cv_mtls_dialect_gnu2" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5 $as_echo_n "checking whether cc puts quotes around section names... " >&6; } @@ -6311,133 +6228,6 @@ if test $libc_cv_have_section_quotes = yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .weak directive" >&5 -$as_echo_n "checking for assembler .weak directive... " >&6; } -if ${libc_cv_asm_weak_directive+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <&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_asm_weak_directive=yes -else - libc_cv_asm_weak_directive=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_weak_directive" >&5 -$as_echo "$libc_cv_asm_weak_directive" >&6; } - -if test $libc_cv_asm_weak_directive = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .weakext directive" >&5 -$as_echo_n "checking for assembler .weakext directive... " >&6; } -if ${libc_cv_asm_weakext_directive+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <&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_asm_weakext_directive=yes - else - libc_cv_asm_weakext_directive=no - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_asm_weakext_directive" >&5 -$as_echo "$libc_cv_asm_weakext_directive" >&6; } - -fi # no .weak - -if test $libc_cv_asm_weak_directive = yes; then - $as_echo "#define HAVE_ASM_WEAK_DIRECTIVE 1" >>confdefs.h - -elif test $libc_cv_asm_weakext_directive = yes; then - $as_echo "#define HAVE_ASM_WEAKEXT_DIRECTIVE 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld --no-whole-archive" >&5 -$as_echo_n "checking for ld --no-whole-archive... " >&6; } -if ${libc_cv_ld_no_whole_archive+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<\EOF -_start () {} -int __eh_pc; -__throw () {} -EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -nostdlib -nostartfiles -Wl,--no-whole-archive - -o conftest 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 - libc_cv_ld_no_whole_archive=yes -else - libc_cv_ld_no_whole_archive=no -fi -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 = 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 -$as_echo_n "checking for gcc -fexceptions... " >&6; } -if ${libc_cv_gcc_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.c <<\EOF -_start () {} -int __eh_pc; -__throw () {} -EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -nostdlib -nostartfiles -fexceptions - -o conftest 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 - libc_cv_gcc_exceptions=yes -else - libc_cv_gcc_exceptions=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_exceptions" >&5 -$as_echo "$libc_cv_gcc_exceptions" >&6; } -if test $libc_cv_gcc_exceptions = yes; then - exceptions=-fexceptions -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5 $as_echo_n "checking for __builtin_memset... " >&6; } if ${libc_cv_gcc_builtin_memset+:} false; then : @@ -6449,7 +6239,7 @@ void zero (void *x) __builtin_memset (x, 0, 1000); } EOF -if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null' +if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "memset" > /dev/null' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6481,7 +6271,7 @@ char *foo (const char *a, const char *b) return __builtin_strstr (a, b); } EOF -if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null' +if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6500,58 +6290,6 @@ if test "$libc_cv_gcc_builtin_redirection" = no; then as_fn_error $? "support for the symbol redirection needed" "$LINENO" 5 fi -{ $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 -else - cat > conftest.c <<\EOF -__thread int a = 42; -EOF -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* -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" = no; then - as_fn_error $? "support for the __thread keyword is required" "$LINENO" 5 -fi - -{ $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 -extern __thread int a __attribute__((tls_model ("initial-exec"))); -EOF -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* -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" = no; then - as_fn_error $? "support for the tls_model attribute is required" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option to disable generation of FMA instructions" >&5 $as_echo_n "checking for compiler option to disable generation of FMA instructions... " >&6; } if ${libc_cv_cc_nofma+:} false; then : @@ -6831,43 +6569,6 @@ $as_echo "#define HAVE_LIBCAP 1" >>confdefs.h fi - -# The cast to long int works around a bug in the HP C Compiler -# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -# This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 -$as_echo_n "checking size of long double... " >&6; } -if ${ac_cv_sizeof_long_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : - -else - if test "$ac_cv_type_long_double" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (long double) -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_sizeof_long_double=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -$as_echo "$ac_cv_sizeof_long_double" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double -_ACEOF - - -sizeof_long_double=$ac_cv_sizeof_long_double - - CPPUNDEFS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FORTIFY_SOURCE predefine" >&5 $as_echo_n "checking for _FORTIFY_SOURCE predefine... " >&6; } @@ -6902,58 +6603,6 @@ if test $libc_cv_predef_fortify_source = yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implicitly enables -fstack-protector" >&5 -$as_echo_n "checking whether $CC implicitly enables -fstack-protector... " >&6; } -if ${libc_cv_predef_stack_protector+:} false; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern void foobar (char *); -int -main () -{ -char large_array[2048]; foobar (large_array); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -libc_undefs=`$NM -u conftest.o | - LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \ - 2>&5` || { - as_fn_error $? "confusing output from $NM -u" "$LINENO" 5 -} -echo >&5 "libc_undefs='$libc_undefs'" -# On some architectures, there are architecture-specific undefined -# symbols (resolved by the linker), so filter out unknown symbols. -# This will fail to produce the correct result if the compiler -# defaults to -fstack-protector but this produces an undefined symbol -# other than __stack_chk_fail. However, compilers like that have not -# been encountered in practice. -libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'` -case "$libc_undefs" in -foobar) libc_cv_predef_stack_protector=no ;; -'__stack_chk_fail -foobar') libc_cv_predef_stack_protector=yes ;; -*) as_fn_error $? "unexpected symbols in test: $libc_undefs" "$LINENO" 5 ;; -esac -else - as_fn_error $? "test compilation failed" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_predef_stack_protector" >&5 -$as_echo "$libc_cv_predef_stack_protector" >&6; } -libc_extra_cflags= -if test $libc_cv_predef_stack_protector = yes; then - libc_extra_cflags="$libc_extra_cflags -fno-stack-protector" -fi -libc_extra_cppflags= - # Some linkers on some architectures support __ehdr_start but with # bugs. Make sure usage of it does not create relocations in the # output (as the linker should resolve them all for us). @@ -6967,7 +6616,7 @@ old_CFLAGS="$CFLAGS" old_LDFLAGS="$LDFLAGS" old_LIBS="$LIBS" CFLAGS="$CFLAGS -fPIC" -LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared" +LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared $no_ssp" LIBS= cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6981,7 +6630,7 @@ long ehdr (void) { return __ehdr_start.val; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - if $READELF -r conftest | fgrep __ehdr_start >/dev/null; then + if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then libc_cv_ehdr_start=broken else libc_cv_ehdr_start=yes @@ -7044,6 +6693,61 @@ if test $libc_cv_builtin_trap = yes; then fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler supports thread_local" >&5 +$as_echo_n "checking whether the C++ compiler supports thread_local... " >&6; } +if ${libc_cv_cxx_thread_local+:} false; then : + $as_echo_n "(cached) " >&6 +else + +old_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS -std=gnu++11" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include + +// Compiler support. +struct S +{ + S (); + ~S (); +}; +thread_local S s; +S * get () { return &s; } + +// libstdc++ support. +#ifndef _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL +#error __cxa_thread_atexit_impl not supported +#endif + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + libc_cv_cxx_thread_local=yes +else + libc_cv_cxx_thread_local=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CXXFLAGS="$old_CXXFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cxx_thread_local" >&5 +$as_echo "$libc_cv_cxx_thread_local" >&6; } + + +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 + + ### End of automated tests. ### Now run sysdeps configure fragments. @@ -7069,6 +6773,12 @@ $as_echo "running configure fragment for $dir" >&6; } fi done +if test x"$build_mathvec" = xnotset; then + build_mathvec=no +fi +config_vars="$config_vars +build-mathvec = $build_mathvec" + @@ -7083,6 +6793,13 @@ fi if test x"$libc_cv_ld_gnu_indirect_function" = xyes; then $as_echo "#define HAVE_IFUNC 1" >>confdefs.h +fi +config_vars="$config_vars +have-ifunc = $libc_cv_ld_gnu_indirect_function" + +if test x"$libc_cv_gcc_indirect_function" = xyes; then + $as_echo "#define HAVE_GCC_IFUNC 1" >>confdefs.h + fi # This is far from the AC_ARG_ENABLE that sets it so that a sysdeps @@ -7096,27 +6813,6 @@ if test "x$build_nscd" = xdefault; then build_nscd=$use_nscd fi -# 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 -$as_echo_n "checking for old glibc 2.0.x headers... " >&6; } -if eval test -f "${includedir}/elfclass.h" -a -f "${includedir}/fcntlbits.h" -then - old_glibc_headers=yes -else - old_glibc_headers=no -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $old_glibc_headers" >&5 -$as_echo "$old_glibc_headers" >&6; } -if test ${old_glibc_headers} = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** During \"make install\" old headers from glibc 2.0.x will" >&5 -$as_echo "$as_me: WARNING: *** During \"make install\" old headers from glibc 2.0.x will" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** be removed." >&5 -$as_echo "$as_me: WARNING: *** be removed." >&2;} -fi - - - @@ -7154,6 +6850,46 @@ fi $as_echo "$libc_cv_pic_default" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIE is default" >&5 +$as_echo_n "checking whether -fPIE is default... " >&6; } +if ${libc_cv_cc_pie_default+:} false; then : + $as_echo_n "(cached) " >&6 +else + libc_cv_cc_pie_default=yes +cat > conftest.c <&5 1>&5"; then + libc_cv_cc_pie_default=no +fi +rm -f conftest.* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_pie_default" >&5 +$as_echo "$libc_cv_cc_pie_default" >&6; } +libc_cv_pie_default=$libc_cv_cc_pie_default + + + +# Set the `multidir' variable by grabbing the variable from the compiler. +# We do it once and save the result in a generated makefile. +libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` + + +if test "$static_pie" = yes; then + # The linker must support --no-dynamic-linker. + if test "$libc_cv_no_dynamic_linker" != yes; then + as_fn_error $? "linker support for --no-dynamic-linker needed" "$LINENO" 5 + fi + # Default to PIE. + libc_cv_pie_default=yes + $as_echo "#define ENABLE_STATIC_PIE 1" >>confdefs.h + +fi +config_vars="$config_vars +enable-static-pie = $static_pie" + @@ -7736,7 +7472,7 @@ $config_headers Configuration commands: $config_commands -Report bugs to . +Report bugs to . GNU C Library home page: . General help using GNU software: ."