From patchwork Fri Dec 2 19:00:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61387 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AAD6E38493E0 for ; Fri, 2 Dec 2022 19:01:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAD6E38493E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670007711; bh=ldbtET90O+1NQAOXe7efOQjZGkf0QrfHNPvb03kfUC8=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ubG/K/0b3BF/XXPPDXaRkArBpssBbmQYEB9MA3vDyKG/Ot8udr0Y3wHSUH6ffIIxb dR9MiNFfByqMA4Wzi2qS1uLqys/SWBuIjYMml5YTuTpE7ZSsChmRHReYrG9dbNhFIV ndaHxQsMKxxh0AuinLyomIhEal3KpKa0oGlOfjrU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 73E313858407 for ; Fri, 2 Dec 2022 19:00:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 73E313858407 Received: by mail-ot1-x332.google.com with SMTP id l42-20020a9d1b2d000000b0066c6366fbc3so3481480otl.3 for ; Fri, 02 Dec 2022 11:00:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ldbtET90O+1NQAOXe7efOQjZGkf0QrfHNPvb03kfUC8=; b=Q1ERmuv68J/bMl0PLKRw1ix10xcR5SDOBxsB2nl/aebnU3v+pGnob/UOZhFgZuFsBf c0lgDL6YoNPuejQO9E4EsflXStxEkqVNOL2oMgOv1iaG4QlfSt0HvMuahJovLLk/QT0p ZQ6+3fuyDXPU56YjvNZW0+lgyCPbCpoaHscj9BFIhox70odtU9Rvo/XSfOp//WmjChRR rjMkp2n6sxD71QJJUnRDBpaAU1EmYpLMcZolBgRH8A87tayETPk6QmNYU2UUTq7pGbSW 2anCsSY2ocQG8JnNRBKE7xVD7a0aBsB7U9HsV5tCMsdypfP/BcveeA5O5ftAKYOdmL/3 EHfA== X-Gm-Message-State: ANoB5pltrT0XMPzwG5eF/EgAeNw1GMsanDwqlo/R9FvdXyKu9xDM4qwb aKQZMqi63daXQoOwjO7hRJKOrI5Pvuc9e3k0IIw= X-Google-Smtp-Source: AA0mqf6eMYwalI9yuMFYakgNmd13YWyTEoFSqyhCOPZEcq7lwqwTzWMRTqTgwbuBYe6L91WyVv9pGg== X-Received: by 2002:a9d:3624:0:b0:66e:c8:8203 with SMTP id w33-20020a9d3624000000b0066e00c88203mr28473142otb.364.1670007636124; Fri, 02 Dec 2022 11:00:36 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:f215:6472:4682:7ef0:a0a8]) by smtp.gmail.com with ESMTPSA id k60-20020a9d19c2000000b0066ca9001e68sm2218159otk.5.2022.12.02.11.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:00:35 -0800 (PST) To: libc-alpha@sourceware.org, Vineet Gupta , =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: [PATCH 1/6] configure: Move locale tools early Date: Fri, 2 Dec 2022 16:00:25 -0300 Message-Id: <20221202190030.1671870-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" When using --with-binutils, the configure might not use the specified linker or assembler while checking for expected support. Move the tools check early, before any compiler usage test. Reviewed-by: Carlos O'Donell --- configure | 2304 +++++++++++++++++++++++++------------------------- configure.ac | 238 +++--- 2 files changed, 1271 insertions(+), 1271 deletions(-) diff --git a/configure b/configure index cb0996d59e..9a8acc4ef7 100755 --- a/configure +++ b/configure @@ -635,6 +635,14 @@ CXX_CMATH_HEADER CXX_CSTDLIB_HEADER CXX_SYSINCLUDES SYSINCLUDES +sysnames +submachine +multi_arch +libc_cv_textrel_ifunc +no_stack_protector +stack_protector +libc_cv_ssp +libc_cv_with_fp PYTHON PYTHON_PROG AUTOCONF @@ -654,14 +662,6 @@ LN_S INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM -sysnames -submachine -multi_arch -libc_cv_textrel_ifunc -no_stack_protector -stack_protector -libc_cv_ssp -libc_cv_with_fp base_machine have_tunables build_pt_chown @@ -4025,709 +4025,646 @@ fi test -n "$base_machine" || base_machine=$machine -# 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 : +### Locate tools. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.c <&5 2>&5 ; then - libc_cv_with_fp=yes + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + fi -rm -f conftest* + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi 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}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -{ $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 +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then + # The makefiles need to use a different form to find it in $srcdir. + INSTALL='\$(..)./scripts/install-sh -c' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +$as_echo_n "checking whether ln -s works... " >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - libc_cv_ssp=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +$as_echo "no, using $LN_S" >&6; } fi + +# Was a --with-binutils option given? +if test -n "$path_binutils"; then + # Make absolute; ensure a single trailing slash. + path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'` + CC="$CC -B$path_binutils" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5 -$as_echo "$libc_cv_ssp" >&6; } +case "$CC" in + *fuse-ld=lld*) LDNAME=ld.lld;; + *) LDNAME=ld;; +esac +AS=`$CC -print-prog-name=as` +LD=`$CC -print-prog-name=$LDNAME` +AR=`$CC -print-prog-name=ar` -{ $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 : +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 +$as_echo_n "checking whether $AS is GNU as... " >&6; } +if ${libc_cv_prog_as_gnu+:} 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 + # Most GNU programs take a -v and spit out some text including +# the word 'GNU'. Some try to read stdin, so give them /dev/null. +if $AS -o conftest -v &1 | grep GNU > /dev/null 2>&1; then + libc_cv_prog_as_gnu=yes else - libc_cv_ssp_strong=no + libc_cv_prog_as_gnu=no fi - +rm -fr contest* 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}: result: $libc_cv_prog_as_gnu" >&5 +$as_echo "$libc_cv_prog_as_gnu" >&6; } +rm -f a.out +gnu_as=$libc_cv_prog_as_gnu -{ $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 "$as_me:${as_lineno-$LINENO}: checking whether $LD is GNU ld" >&5 +$as_echo_n "checking whether $LD is GNU ld... " >&6; } +if ${libc_cv_prog_ld_gnu+:} 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 + # Most GNU programs take a -v and spit out some text including +# the word 'GNU'. Some try to read stdin, so give them /dev/null. +if $LD -o conftest -v &1 | grep GNU > /dev/null 2>&1; then + libc_cv_prog_ld_gnu=yes else - libc_cv_ssp_all=no -fi - + libc_cv_prog_ld_gnu=no 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 - +rm -fr contest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_prog_ld_gnu" >&5 +$as_echo "$libc_cv_prog_ld_gnu" >&6; } +gnu_ld=$libc_cv_prog_ld_gnu -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 +# 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. +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_AS+:} false; then : + $as_echo_n "(cached) " >&6 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 + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. 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 +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_AS="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi -fi +done + done +IFS=$as_save_IFS -# 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 - LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && { - libc_cv_ld_gnu_indirect_function=yes - } fi -rm -f conftest* 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; } - -# 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 +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else - cat > 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* + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } 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 + + test -n "$AS" && break +done + +if test -z "$AS"; then + ac_verc_fail=yes 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_textrel_ifunc=yes - fi + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AS" >&5 +$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[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;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } fi -rm -f conftest* +if test $ac_verc_fail = yes; then + AS=: critic_missing="$critic_missing as" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_textrel_ifunc" >&5 -$as_echo "$libc_cv_textrel_ifunc" >&6; } -# Check if CC supports attribute retain as it is used in attribute_used_retain macro. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU attribute retain support" >&5 -$as_echo_n "checking for GNU attribute retain support... " >&6; } -if ${libc_cv_gnu_retain+:} false; then : +libc_cv_with_lld=no +case $($LD --version) in + "GNU gold"*) + # 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LD+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.c <&5 \ - 2>&5 ; then - libc_cv_gnu_retain=yes + 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 +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_LD="$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 -rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gnu_retain" >&5 -$as_echo "$libc_cv_gnu_retain" >&6; } -if test $libc_cv_gnu_retain = yes; then - $as_echo "#define HAVE_GNU_RETAIN 1" >>confdefs.h - +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 -config_vars="$config_vars -have-gnu-retain = $libc_cv_gnu_retain" -# 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 - cat > conftest.c <&5 2>&5 ; then - libc_cv_gcc_incompatible_alias=no +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 $LD" >&5 +$as_echo_n "checking version of $LD... " >&6; } + 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;; + 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;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } fi -rm -f conftest* +if test $ac_verc_fail = yes; then + LD=: critic_missing="$critic_missing GNU gold" 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 - as_fn_error $? "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5 - else - 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;} + ;; + "LLD"*) + # Accept LLD 13.0.0 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +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_LD="$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 -multi_arch_d= -if test x"$multi_arch" != xno; then - multi_arch_d=/multiarch +fi +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 -# Compute the list of sysdep directories for this configuration. -# This can take a while to compute. -sysdep_dir=$srcdir/sysdeps -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sysdep dirs" >&5 -$as_echo_n "checking sysdep dirs... " >&6; } -# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1. -os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`" - -test "x$base_os" != x || case "$os" in -gnu*) - base_os=mach/hurd ;; -linux*) - base_os=unix/sysv ;; -esac -# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos. -tail=$os -ostry=$os -while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do - ostry="$ostry /$o" - tail=$o + test -n "$LD" && break done -o=`echo $tail | sed 's/[0-9]*$//'` -if test $o != $tail; then - ostry="$ostry /$o" + +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 $LD" >&5 +$as_echo_n "checking version of $LD... " >&6; } + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*LLD.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1[3-9].*|[2-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 -# For linux-gnu, try linux-gnu, then linux. -o=`echo $tail | sed 's/-.*$//'` -if test $o != $tail; then - ostry="$ostry /$o" +if test $ac_verc_fail = yes; then + LD=: critic_missing="$critic_missing LLD" fi -# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix. -base= -tail=$base_os -while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do - set $b - base="$base /$1" - tail="$2" -done - -# For sparc/sparc32, try sparc/sparc32 and then sparc. -mach= -tail=$machine${submachine:+/$submachine} -while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do - set $m - # Prepend the machine's FPU directory unless the architecture specific - # preconfigure disables it. - if test "$libc_cv_with_fp" = yes; then - maybe_fpu=/fpu - else - maybe_fpu=/nofpu + libc_cv_with_lld=yes + ;; + *) + 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_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +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_LD="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 fi - # For each machine term, try it with and then without /multiarch. - for try_fpu in $maybe_fpu ''; do - for try_multi in $multi_arch_d ''; do - mach="$mach /$1$try_fpu$try_multi" - done - done - tail="$2" done - - -# Find what sysdep directories exist. -sysnames= -for b in $base ''; do - for m0 in $mach ''; do - for v in /$vendor ''; do - test "$v" = / && continue - for o in /$ostry ''; do - test "$o" = / && continue - for m in $mach ''; do - 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 done -done - -# If the assembler supports gnu_indirect_function symbol type and the -# architecture supports multi-arch, we enable multi-arch by default. -case $sysnames in -*"$multi_arch_d"*) - ;; -*) - test x"$multi_arch" = xdefault && multi_arch=no - ;; -esac -if test x"$multi_arch" != xno; then - $as_echo "#define USE_MULTIARCH 1" >>confdefs.h - -fi - +IFS=$as_save_IFS -if test -z "$os_used" && test "$os" != none; then - as_fn_error $? "Operating system $os is not supported." "$LINENO" 5 fi -if test -z "$machine_used" && test "$machine" != none; then - as_fn_error $? "The $machine is not supported." "$LINENO" 5 fi -if test -z "$submachine_used" && test -n "$submachine"; then - as_fn_error $? "The $submachine subspecies of $host_cpu is not supported." "$LINENO" 5 +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 -# We have now validated the configuration. + test -n "$LD" && break +done -# Expand the list of system names into a full list of directories -# from each element's parent name and Implies file (if present). -set $sysnames -names= -while test $# -gt 0; do - name=$1 - shift +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 $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;; + 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;; - case " $names " in *" $name "*) - # Already in the list. - continue 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 + LD=: critic_missing="$critic_missing GNU ld" +fi - # Report each name as we discover it, so there is no long pause in output. - echo $ECHO_N "$name $ECHO_C" >&6 - - name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'` - - case $name in - /*) xsrcdir= ;; - *) xsrcdir=$srcdir/ ;; - esac - test -n "$enable_debug_configure" && - echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2 + ;; +esac +config_vars="$config_vars +with-lld = $libc_cv_with_lld" - for implies_file in Implies Implies-before Implies-after; do - implies_type=`echo $implies_file | sed s/-/_/` - eval ${implies_type}= - if test -f $xsrcdir$name/$implies_file; then - # Collect more names from the `Implies' file (removing comments). - implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" - for x in $implied_candidate; do - found=no - if test -d $xsrcdir$name_base/$x; then - eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" - found=yes - fi - 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;} - fi - done - 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. +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_MAKE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MAKE"; then + ac_cv_prog_MAKE="$MAKE" # 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_MAKE="$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 - # Add NAME to the list of names. - names="$names $name" - - # Find the parent of NAME, using the empty string if it has none. - parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" +fi +fi +MAKE=$ac_cv_prog_MAKE +if test -n "$MAKE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 +$as_echo "$MAKE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi - test -n "$enable_debug_configure" && - echo "DEBUG: $name Implies='$Implies' rest='$*' parent='$parent' \ -Implies_before='$Implies_before' Implies_after='$Implies_after'" >&2 - # Add the names implied by NAME, and NAME's parent (if it has one), to - # the list of names to be processed (the argument list). We prepend the - # implied names to the list and append the parent. We want implied - # directories to come before further directories inferred from the - # configuration components; this ensures that for sysv4, unix/common - # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*) - # after sysv4). - sysnames="`echo $Implies $* $Implies_before $parent $Implies_after`" - test -n "$sysnames" && set $sysnames + test -n "$MAKE" && break done -# Add the default directories. -default_sysnames="sysdeps/generic" -sysnames="$names $default_sysnames" - -# The other names were emitted during the scan. -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_sysnames" >&5 -$as_echo "$default_sysnames" >&6; } +if test -z "$MAKE"; then + ac_verc_fail=yes +else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $MAKE" >&5 +$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;; + [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 make" +fi -### Locate tools. -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : +for ac_prog in gnumsgfmt gmsgfmt msgfmt +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_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + if test -n "$MSGFMT"; then + ac_cv_prog_MSGFMT="$MSGFMT" # 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=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - + 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_MSGFMT="$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 -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then - # The makefiles need to use a different form to find it in $srcdir. - INSTALL='\$(..)./scripts/install-sh -c' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +MSGFMT=$ac_cv_prog_MSGFMT +if test -n "$MSGFMT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +$as_echo "$MSGFMT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -# Was a --with-binutils option given? -if test -n "$path_binutils"; then - # Make absolute; ensure a single trailing slash. - path_binutils=`(cd $path_binutils; pwd) | sed 's%/*$%/%'` - CC="$CC -B$path_binutils" -fi -case "$CC" in - *fuse-ld=lld*) LDNAME=ld.lld;; - *) LDNAME=ld;; -esac -AS=`$CC -print-prog-name=as` -LD=`$CC -print-prog-name=$LDNAME` -AR=`$CC -print-prog-name=ar` - -OBJCOPY=`$CC -print-prog-name=objcopy` + test -n "$MSGFMT" && break +done -GPROF=`$CC -print-prog-name=gprof` +if test -z "$MSGFMT"; then + ac_verc_fail=yes +else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $MSGFMT" >&5 +$as_echo_n "checking version of $MSGFMT... " >&6; } + ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-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 + MSGFMT=: aux_missing="$aux_missing msgfmt" +fi -# Determine whether we are using GNU binutils. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5 -$as_echo_n "checking whether $AS is GNU as... " >&6; } -if ${libc_cv_prog_as_gnu+:} false; then : +for ac_prog in makeinfo +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_MAKEINFO+:} false; then : $as_echo_n "(cached) " >&6 else - # Most GNU programs take a -v and spit out some text including -# the word 'GNU'. Some try to read stdin, so give them /dev/null. -if $AS -o conftest -v &1 | grep GNU > /dev/null 2>&1; then - libc_cv_prog_as_gnu=yes + if test -n "$MAKEINFO"; then + ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. else - libc_cv_prog_as_gnu=no +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_MAKEINFO="$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 -rm -fr contest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_prog_as_gnu" >&5 -$as_echo "$libc_cv_prog_as_gnu" >&6; } -rm -f a.out -gnu_as=$libc_cv_prog_as_gnu - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $LD is GNU ld" >&5 -$as_echo_n "checking whether $LD is GNU ld... " >&6; } -if ${libc_cv_prog_ld_gnu+:} false; then : - $as_echo_n "(cached) " >&6 +MAKEINFO=$ac_cv_prog_MAKEINFO +if test -n "$MAKEINFO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 +$as_echo "$MAKEINFO" >&6; } else - # Most GNU programs take a -v and spit out some text including -# the word 'GNU'. Some try to read stdin, so give them /dev/null. -if $LD -o conftest -v &1 | grep GNU > /dev/null 2>&1; then - libc_cv_prog_ld_gnu=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MAKEINFO" && break +done + +if test -z "$MAKEINFO"; then + ac_verc_fail=yes else - libc_cv_prog_ld_gnu=no + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $MAKEINFO" >&5 +$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.[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;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } fi -rm -fr contest* +if test $ac_verc_fail = yes; then + MAKEINFO=: aux_missing="$aux_missing makeinfo" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_prog_ld_gnu" >&5 -$as_echo "$libc_cv_prog_ld_gnu" >&6; } -gnu_ld=$libc_cv_prog_ld_gnu - -# Accept binutils 2.25 or newer. -for ac_prog in $AS +for ac_prog in sed 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_AS+:} false; then : +if ${ac_cv_prog_SED+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. + if test -n "$SED"; then + ac_cv_prog_SED="$SED" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4736,7 +4673,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_AS="$ac_prog" + ac_cv_prog_SED="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4746,29 +4683,29 @@ IFS=$as_save_IFS fi fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } +SED=$ac_cv_prog_SED +if test -n "$SED"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 +$as_echo "$SED" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$AS" && break + test -n "$SED" && break done -if test -z "$AS"; then +if test -z "$SED"; then ac_verc_fail=yes else # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AS" >&5 -$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'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 +$as_echo_n "checking version of $SED... " >&6; } + ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^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[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) + 3.0[2-9]*|3.[1-9]*|[4-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4777,25 +4714,20 @@ $as_echo_n "checking version of $AS... " >&6; } $as_echo "$ac_prog_version" >&6; } fi if test $ac_verc_fail = yes; then - AS=: critic_missing="$critic_missing as" + SED=: aux_missing="$aux_missing sed" fi - -libc_cv_with_lld=no -case $($LD --version) in - "GNU gold"*) - # Accept gold 1.14 or higher - for ac_prog in $LD +for ac_prog in gawk 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_LD+:} false; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$LD"; then - ac_cv_prog_LD="$LD" # Let the user override the test. + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -4804,7 +4736,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_LD="$ac_prog" + ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4814,29 +4746,29 @@ IFS=$as_save_IFS fi fi -LD=$ac_cv_prog_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$LD" && break + test -n "$AWK" && break done -if test -z "$LD"; then +if test -z "$AWK"; then ac_verc_fail=yes 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 gold.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AWK" >&5 +$as_echo_n "checking version of $AWK... " >&6; } + ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.1[4-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*) + 3.1.[2-9]*|3.[2-9]*|[4-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4845,23 +4777,20 @@ $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 GNU gold" + critic_missing="$critic_missing gawk" fi - ;; - "LLD"*) - # Accept LLD 13.0.0 or higher - for ac_prog in $LD +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_LD+:} false; then : +if ${ac_cv_prog_BISON+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$LD"; then - ac_cv_prog_LD="$LD" # 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 @@ -4870,7 +4799,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_LD="$ac_prog" + 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 @@ -4880,29 +4809,29 @@ IFS=$as_save_IFS fi fi -LD=$ac_cv_prog_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&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 - test -n "$LD" && break + test -n "$BISON" && break done -if test -z "$LD"; then +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 $LD" >&5 -$as_echo_n "checking version of $LD... " >&6; } - ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*LLD.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` + { $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;; - 1[3-9].*|[2-9][0-9].*) + 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;; @@ -4911,23 +4840,53 @@ $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 LLD" + critic_missing="$critic_missing bison" fi - libc_cv_with_lld=yes - ;; - *) - 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 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 + +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_cpp "$LINENO"; then : + libc_cv_compiler_ok=yes +else + libc_cv_compiler_ok=no +fi +rm -f conftest.err conftest.i 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_LD+:} false; then : +if ${ac_cv_prog_NM+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$LD"; then - ac_cv_prog_LD="$LD" # Let the user override the test. + 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 @@ -4936,7 +4895,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_LD="$ac_prog" + 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 @@ -4945,58 +4904,29 @@ done IFS=$as_save_IFS fi -fi -LD=$ac_cv_prog_LD -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } +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 - test -n "$LD" && break -done - -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 $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;; - 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;; - - 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 - LD=: critic_missing="$critic_missing GNU ld" -fi - - ;; -esac -config_vars="$config_vars -with-lld = $libc_cv_with_lld" - -# 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. -set dummy $ac_prog; ac_word=$2 +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_MAKE+:} false; then : +if ${ac_cv_prog_ac_ct_NM+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MAKE"; then - ac_cv_prog_MAKE="$MAKE" # Let the user override the test. + 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 @@ -5005,7 +4935,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_MAKE="$ac_prog" + 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 @@ -5015,52 +4945,43 @@ IFS=$as_save_IFS fi fi -MAKE=$ac_cv_prog_MAKE -if test -n "$MAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5 -$as_echo "$MAKE" >&6; } +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 - - test -n "$MAKE" && break -done - -if test -z "$MAKE"; then - ac_verc_fail=yes + if test "x$ac_ct_NM" = x; then + NM="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 + NM=$ac_ct_NM + fi else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $MAKE" >&5 -$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;; - [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 make" + NM="$ac_cv_prog_NM" fi -for ac_prog in gnumsgfmt gmsgfmt msgfmt +if test "x$maintainer" = "xyes"; then + for ac_prog in autoconf 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_MSGFMT+:} false; then : +if ${ac_cv_prog_AUTOCONF+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MSGFMT"; then - ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test. + if test -n "$AUTOCONF"; then + ac_cv_prog_AUTOCONF="$AUTOCONF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -5069,7 +4990,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_MSGFMT="$ac_prog" + ac_cv_prog_AUTOCONF="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5079,51 +5000,58 @@ IFS=$as_save_IFS fi fi -MSGFMT=$ac_cv_prog_MSGFMT -if test -n "$MSGFMT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -$as_echo "$MSGFMT" >&6; } +AUTOCONF=$ac_cv_prog_AUTOCONF +if test -n "$AUTOCONF"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5 +$as_echo "$AUTOCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MSGFMT" && break + test -n "$AUTOCONF" && break done +test -n "$AUTOCONF" || AUTOCONF="no" -if test -z "$MSGFMT"; then - ac_verc_fail=yes + case "x$AUTOCONF" in + xno|x|x:) AUTOCONF=no ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works" >&5 +$as_echo_n "checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works... " >&6; } +if ${libc_cv_autoconf_works+:} false; then : + $as_echo_n "(cached) " >&6 else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $MSGFMT" >&5 -$as_echo_n "checking version of $MSGFMT... " >&6; } - ac_prog_version=`$MSGFMT --version 2>&1 | sed -n 's/^.*GNU gettext.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-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; } + if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then + libc_cv_autoconf_works=yes + else + libc_cv_autoconf_works=no + fi fi -if test $ac_verc_fail = yes; then - MSGFMT=: aux_missing="$aux_missing msgfmt" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_autoconf_works" >&5 +$as_echo "$libc_cv_autoconf_works" >&6; } + test $libc_cv_autoconf_works = yes || AUTOCONF=no + ;; + esac + if test "x$AUTOCONF" = xno; then + aux_missing="$aux_missing autoconf" + fi +else + AUTOCONF=no fi -for ac_prog in makeinfo +# 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_MAKEINFO+:} false; then : +if ${ac_cv_prog_PYTHON_PROG+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MAKEINFO"; then - ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. + 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 @@ -5132,7 +5060,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_MAKEINFO="$ac_prog" + 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 @@ -5142,29 +5070,29 @@ IFS=$as_save_IFS fi fi -MAKEINFO=$ac_cv_prog_MAKEINFO -if test -n "$MAKEINFO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 -$as_echo "$MAKEINFO" >&6; } +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 "$MAKEINFO" && break + test -n "$PYTHON_PROG" && break done -if test -z "$MAKEINFO"; then +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 $MAKEINFO" >&5 -$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'` + { $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;; - 4.[7-9]*|4.[1-9][0-9]*|[5-9].*) + 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;; @@ -5173,474 +5101,546 @@ $as_echo_n "checking version of $MAKEINFO... " >&6; } $as_echo "$ac_prog_version" >&6; } fi if test $ac_verc_fail = yes; then - MAKEINFO=: aux_missing="$aux_missing makeinfo" + critic_missing="$critic_missing python" fi -for ac_prog in sed -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_SED+:} false; then : +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 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 or tests will be disabled. +*** Check the INSTALL file for required versions." >&2;} + + +# 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 - if test -n "$SED"; then - ac_cv_prog_SED="$SED" # 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_SED="$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 - + cat > conftest.c <&5 2>&5 ; then + libc_cv_with_fp=yes fi +rm -f conftest* fi -SED=$ac_cv_prog_SED -if test -n "$SED"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5 -$as_echo "$SED" >&6; } +{ $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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + 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; } - test -n "$SED" && break -done - -if test -z "$SED"; then - ac_verc_fail=yes +{ $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 - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $SED" >&5 -$as_echo_n "checking version of $SED... " >&6; } - ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.0[2-9]*|3.[1-9]*|[4-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 -$as_echo "$ac_prog_version" >&6; } + 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 -if test $ac_verc_fail = yes; then - SED=: aux_missing="$aux_missing sed" + fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp_strong" >&5 +$as_echo "$libc_cv_ssp_strong" >&6; } -for ac_prog in gawk -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_AWK+:} false; then : +{ $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 test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. + 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 -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_AWK="$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 + 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 -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + +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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + stack_protector="-fno-stack-protector" + $as_echo "#define STACK_PROTECTOR_LEVEL 0" >>confdefs.h + fi - test -n "$AWK" && break -done -if test -z "$AWK"; then - ac_verc_fail=yes + +if test -n "$stack_protector"; then + no_ssp=-fno-stack-protector else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AWK" >&5 -$as_echo_n "checking version of $AWK... " >&6; } - ac_prog_version=`$AWK --version 2>&1 | sed -n 's/^.*GNU Awk[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.1.[2-9]*|3.[2-9]*|[4-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + no_ssp= - 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 gawk" + 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 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_BISON+:} false; then : +# 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 - if test -n "$BISON"; then - ac_cv_prog_BISON="$BISON" # Let the user override the test. + cat > conftest.S <&5 2>&5; then + # Do a link to see if the backend supports IFUNC relocs. + $READELF -r conftest 1>&5 + LC_ALL=C $READELF -Wr conftest | grep -q 'IRELATIVE\|R_SPARC_JMP_IREL' && { + libc_cv_ld_gnu_indirect_function=yes + } +fi +rm -f conftest* +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; } + +# 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 -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_BISON="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 + cat > 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 -done - done -IFS=$as_save_IFS - 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_textrel_ifunc=yes + fi fi -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; } +rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_textrel_ifunc" >&5 +$as_echo "$libc_cv_textrel_ifunc" >&6; } - test -n "$BISON" && break -done - -if test -z "$BISON"; then - ac_verc_fail=yes +# Check if CC supports attribute retain as it is used in attribute_used_retain macro. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU attribute retain support" >&5 +$as_echo_n "checking for GNU attribute retain support... " >&6; } +if ${libc_cv_gnu_retain+:} false; then : + $as_echo_n "(cached) " >&6 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; } + cat > conftest.c <&5 \ + 2>&5 ; then + libc_cv_gnu_retain=yes fi -if test $ac_verc_fail = yes; then - critic_missing="$critic_missing bison" +rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gnu_retain" >&5 +$as_echo "$libc_cv_gnu_retain" >&6; } +if test $libc_cv_gnu_retain = yes; then + $as_echo "#define HAVE_GNU_RETAIN 1" >>confdefs.h +fi +config_vars="$config_vars +have-gnu-retain = $libc_cv_gnu_retain" -{ $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 : +# 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 + cat > conftest.c <conftest.$ac_ext -/* end confdefs.h. */ - -int -main () +__typeof (__redirect_foo) *foo_impl (void) __asm__ ("foo"); +__typeof (__redirect_foo) *foo_impl (void) { - -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) -#error insufficient compiler -#endif - ; return 0; } -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - libc_cv_compiler_ok=yes -else - libc_cv_compiler_ok=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext + +extern __typeof (__redirect_foo) foo_alias __attribute__ ((alias ("foo"))); +EOF +libc_cv_gcc_incompatible_alias=yes +if ${CC-cc} -Werror -c conftest.c -o conftest.o 1>&5 2>&5 ; then + libc_cv_gcc_incompatible_alias=no 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" +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 -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 +if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then + if test x"$multi_arch" = xyes; then + as_fn_error $? "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5 + else + multi_arch=no fi -done - done -IFS=$as_save_IFS - 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 -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; } +multi_arch_d= +if test x"$multi_arch" != xno; then + multi_arch_d=/multiarch fi +# Compute the list of sysdep directories for this configuration. +# This can take a while to compute. +sysdep_dir=$srcdir/sysdeps +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sysdep dirs" >&5 +$as_echo_n "checking sysdep dirs... " >&6; } +# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1. +os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`" + +test "x$base_os" != x || case "$os" in +gnu*) + base_os=mach/hurd ;; +linux*) + base_os=unix/sysv ;; +esac +# For sunos4.1.1, try sunos4.1.1, then sunos4.1, then sunos4, then sunos. +tail=$os +ostry=$os +while o=`echo $tail | sed 's/\.[^.]*$//'`; test $o != $tail; do + ostry="$ostry /$o" + tail=$o +done +o=`echo $tail | sed 's/[0-9]*$//'` +if test $o != $tail; then + ostry="$ostry /$o" 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 +# For linux-gnu, try linux-gnu, then linux. +o=`echo $tail | sed 's/-.*$//'` +if test $o != $tail; then + ostry="$ostry /$o" +fi + +# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix. +base= +tail=$base_os +while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do + set $b + base="$base /$1" + tail="$2" +done + +# For sparc/sparc32, try sparc/sparc32 and then sparc. +mach= +tail=$machine${submachine:+/$submachine} +while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do + set $m + # Prepend the machine's FPU directory unless the architecture specific + # preconfigure disables it. + if test "$libc_cv_with_fp" = yes; then + maybe_fpu=/fpu + else + maybe_fpu=/nofpu fi + # For each machine term, try it with and then without /multiarch. + for try_fpu in $maybe_fpu ''; do + for try_multi in $multi_arch_d ''; do + mach="$mach /$1$try_fpu$try_multi" + done + done + tail="$2" done + + +# Find what sysdep directories exist. +sysnames= +for b in $base ''; do + for m0 in $mach ''; do + for v in /$vendor ''; do + test "$v" = / && continue + for o in /$ostry ''; do + test "$o" = / && continue + for m in $mach ''; do + 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 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 +done - if test "x$ac_ct_NM" = x; then - NM="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 ;; +# If the assembler supports gnu_indirect_function symbol type and the +# architecture supports multi-arch, we enable multi-arch by default. +case $sysnames in +*"$multi_arch_d"*) + ;; +*) + test x"$multi_arch" = xdefault && multi_arch=no + ;; esac - NM=$ac_ct_NM - fi -else - NM="$ac_cv_prog_NM" -fi +if test x"$multi_arch" != xno; then + $as_echo "#define USE_MULTIARCH 1" >>confdefs.h +fi -if test "x$maintainer" = "xyes"; then - for ac_prog in autoconf -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_AUTOCONF+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AUTOCONF"; then - ac_cv_prog_AUTOCONF="$AUTOCONF" # 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_AUTOCONF="$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 +if test -z "$os_used" && test "$os" != none; then + as_fn_error $? "Operating system $os is not supported." "$LINENO" 5 fi +if test -z "$machine_used" && test "$machine" != none; then + as_fn_error $? "The $machine is not supported." "$LINENO" 5 fi -AUTOCONF=$ac_cv_prog_AUTOCONF -if test -n "$AUTOCONF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AUTOCONF" >&5 -$as_echo "$AUTOCONF" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } +if test -z "$submachine_used" && test -n "$submachine"; then + as_fn_error $? "The $submachine subspecies of $host_cpu is not supported." "$LINENO" 5 fi - test -n "$AUTOCONF" && break -done -test -n "$AUTOCONF" || AUTOCONF="no" +# We have now validated the configuration. - case "x$AUTOCONF" in - xno|x|x:) AUTOCONF=no ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works" >&5 -$as_echo_n "checking whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works... " >&6; } -if ${libc_cv_autoconf_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then - libc_cv_autoconf_works=yes - else - libc_cv_autoconf_works=no - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_autoconf_works" >&5 -$as_echo "$libc_cv_autoconf_works" >&6; } - test $libc_cv_autoconf_works = yes || AUTOCONF=no - ;; +# Expand the list of system names into a full list of directories +# from each element's parent name and Implies file (if present). +set $sysnames +names= +while test $# -gt 0; do + name=$1 + shift + + case " $names " in *" $name "*) + # Already in the list. + continue esac - if test "x$AUTOCONF" = xno; then - aux_missing="$aux_missing autoconf" - fi -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 + # Report each name as we discover it, so there is no long pause in output. + echo $ECHO_N "$name $ECHO_C" >&6 -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 + name_base=`echo $name | sed -e 's@\(.*sysdeps\)/.*@\1@'` + case $name in + /*) xsrcdir= ;; + *) xsrcdir=$srcdir/ ;; + esac + test -n "$enable_debug_configure" && + echo "DEBUG: name/Implies $xsrcdir$name/Implies" >&2 - test -n "$PYTHON_PROG" && break -done + for implies_file in Implies Implies-before Implies-after; do + implies_type=`echo $implies_file | sed s/-/_/` + eval ${implies_type}= + if test -f $xsrcdir$name/$implies_file; then + # Collect more names from the `Implies' file (removing comments). + implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" + for x in $implied_candidate; do + found=no + if test -d $xsrcdir$name_base/$x; then + eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" + found=yes + fi + 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;} + fi + done + fi + 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;; + # Add NAME to the list of names. + names="$names $name" - 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 + # Find the parent of NAME, using the empty string if it has none. + parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" -PYTHON="$PYTHON_PROG -B" + test -n "$enable_debug_configure" && + echo "DEBUG: $name Implies='$Implies' rest='$*' parent='$parent' \ +Implies_before='$Implies_before' Implies_after='$Implies_after'" >&2 + # Add the names implied by NAME, and NAME's parent (if it has one), to + # the list of names to be processed (the argument list). We prepend the + # implied names to the list and append the parent. We want implied + # directories to come before further directories inferred from the + # configuration components; this ensures that for sysv4, unix/common + # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*) + # after sysv4). + sysnames="`echo $Implies $* $Implies_before $parent $Implies_after`" + test -n "$sysnames" && set $sysnames +done -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 +# Add the default directories. +default_sysnames="sysdeps/generic" +sysnames="$names $default_sysnames" -test -n "$aux_missing" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: -*** These auxiliary programs are missing or incompatible versions:$aux_missing -*** 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 or tests will be disabled. -*** Check the INSTALL file for required versions." >&2;} +# The other names were emitted during the scan. +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_sysnames" >&5 +$as_echo "$default_sysnames" >&6; } # if using special system headers, find out the compiler's sekrit # header directory and add that to the list. NOTE: Only does the right diff --git a/configure.ac b/configure.ac index 20b5e8043f..5709c7a0cf 100644 --- a/configure.ac +++ b/configure.ac @@ -560,6 +560,125 @@ fi test -n "$base_machine" || base_machine=$machine AC_SUBST(base_machine) +### Locate tools. + +AC_PROG_INSTALL +if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then + # The makefiles need to use a different form to find it in $srcdir. + INSTALL='\$(..)./scripts/install-sh -c' +fi +AC_PROG_LN_S + +LIBC_PROG_BINUTILS + +# Accept binutils 2.25 or newer. +AC_CHECK_PROG_VER(AS, $AS, --version, + [GNU assembler.* \([0-9]*\.[0-9.]*\)], + [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], + AS=: critic_missing="$critic_missing as") + +libc_cv_with_lld=no +case $($LD --version) in + "GNU gold"*) + # Accept gold 1.14 or higher + AC_CHECK_PROG_VER(LD, $LD, --version, + [GNU gold.* \([0-9][0-9]*\.[0-9.]*\)], + [1.1[4-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*], + LD=: critic_missing="$critic_missing GNU gold") + ;; + "LLD"*) + # Accept LLD 13.0.0 or higher + AC_CHECK_PROG_VER(LD, $LD, --version, + [LLD.* \([0-9][0-9]*\.[0-9.]*\)], + [1[3-9].*|[2-9][0-9].*], + LD=: critic_missing="$critic_missing LLD") + libc_cv_with_lld=yes + ;; + *) + AC_CHECK_PROG_VER(LD, $LD, --version, + [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], + [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], + LD=: critic_missing="$critic_missing GNU ld") + ;; +esac +LIBC_CONFIG_VAR([with-lld], [$libc_cv_with_lld]) + +# These programs are version sensitive. +AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], + [[4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + +AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], + [0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*], + MSGFMT=: aux_missing="$aux_missing msgfmt") +AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, + [GNU texinfo.* \([0-9][0-9.]*\)], + [4.[7-9]*|4.[1-9][0-9]*|[5-9].*], + MAKEINFO=: aux_missing="$aux_missing makeinfo") +AC_CHECK_PROG_VER(SED, sed, --version, + [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], + [3.0[2-9]*|3.[1-9]*|[4-9]*], + SED=: aux_missing="$aux_missing sed") +AC_CHECK_PROG_VER(AWK, gawk, --version, + [GNU Awk[^0-9]*\([0-9][0-9.]*\)], + [3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk") +AC_CHECK_PROG_VER(BISON, bison, --version, + [bison (GNU Bison) \([0-9]*\.[0-9.]*\)], + [2.7*|[3-9].*|[1-9][0-9]*], critic_missing="$critic_missing bison") + +AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [ +AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[ +#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +#error insufficient compiler +#endif]])], + [libc_cv_compiler_ok=yes], + [libc_cv_compiler_ok=no])]) +AS_IF([test $libc_cv_compiler_ok != yes], + [critic_missing="$critic_missing compiler"]) + +AC_CHECK_TOOL(NM, nm, false) + +if test "x$maintainer" = "xyes"; then + AC_CHECK_PROGS(AUTOCONF, autoconf, no) + case "x$AUTOCONF" in + xno|x|x:) AUTOCONF=no ;; + *) + AC_CACHE_CHECK(dnl + whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works, [dnl + if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then + libc_cv_autoconf_works=yes + else + libc_cv_autoconf_works=no + fi]) + test $libc_cv_autoconf_works = yes || AUTOCONF=no + ;; + esac + if test "x$AUTOCONF" = xno; then + aux_missing="$aux_missing autoconf" + fi +else + AUTOCONF=no +fi + +# Check for python3 if available, or else python. +AC_CHECK_PROG_VER(PYTHON_PROG, python3 python, --version, + [Python \([0-9][0-9.]*\)], + [3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*], + critic_missing="$critic_missing python") +PYTHON="$PYTHON_PROG -B" +AC_SUBST(PYTHON) + +test -n "$critic_missing" && AC_MSG_ERROR([ +*** These critical programs are missing or too old:$critic_missing +*** Check the INSTALL file for required versions.]) + +test -n "$aux_missing" && AC_MSG_WARN([ +*** These auxiliary programs are missing or incompatible versions:$aux_missing +*** some features or tests will be disabled. +*** Check the INSTALL file for required versions.]) + + # Determine whether to use fpu or nofpu sysdeps directories. AC_CACHE_CHECK([for use of fpu sysdeps directories], libc_cv_with_fp, [dnl @@ -991,125 +1110,6 @@ AC_SUBST(sysnames) # The other names were emitted during the scan. AC_MSG_RESULT($default_sysnames) - -### Locate tools. - -AC_PROG_INSTALL -if test "$INSTALL" = "${srcdir}/scripts/install-sh -c"; then - # The makefiles need to use a different form to find it in $srcdir. - INSTALL='\$(..)./scripts/install-sh -c' -fi -AC_PROG_LN_S - -LIBC_PROG_BINUTILS - -# Accept binutils 2.25 or newer. -AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], - AS=: critic_missing="$critic_missing as") - -libc_cv_with_lld=no -case $($LD --version) in - "GNU gold"*) - # Accept gold 1.14 or higher - AC_CHECK_PROG_VER(LD, $LD, --version, - [GNU gold.* \([0-9][0-9]*\.[0-9.]*\)], - [1.1[4-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*], - LD=: critic_missing="$critic_missing GNU gold") - ;; - "LLD"*) - # Accept LLD 13.0.0 or higher - AC_CHECK_PROG_VER(LD, $LD, --version, - [LLD.* \([0-9][0-9]*\.[0-9.]*\)], - [1[3-9].*|[2-9][0-9].*], - LD=: critic_missing="$critic_missing LLD") - libc_cv_with_lld=yes - ;; - *) - AC_CHECK_PROG_VER(LD, $LD, --version, - [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], - LD=: critic_missing="$critic_missing GNU ld") - ;; -esac -LIBC_CONFIG_VAR([with-lld], [$libc_cv_with_lld]) - -# These programs are version sensitive. -AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], - [[4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") - -AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], - [0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*], - MSGFMT=: aux_missing="$aux_missing msgfmt") -AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version, - [GNU texinfo.* \([0-9][0-9.]*\)], - [4.[7-9]*|4.[1-9][0-9]*|[5-9].*], - MAKEINFO=: aux_missing="$aux_missing makeinfo") -AC_CHECK_PROG_VER(SED, sed, --version, - [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)], - [3.0[2-9]*|3.[1-9]*|[4-9]*], - SED=: aux_missing="$aux_missing sed") -AC_CHECK_PROG_VER(AWK, gawk, --version, - [GNU Awk[^0-9]*\([0-9][0-9.]*\)], - [3.1.[2-9]*|3.[2-9]*|[4-9]*], critic_missing="$critic_missing gawk") -AC_CHECK_PROG_VER(BISON, bison, --version, - [bison (GNU Bison) \([0-9]*\.[0-9.]*\)], - [2.7*|[3-9].*|[1-9][0-9]*], critic_missing="$critic_missing bison") - -AC_CACHE_CHECK([if $CC is sufficient to build libc], libc_cv_compiler_ok, [ -AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[ -#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) -#error insufficient compiler -#endif]])], - [libc_cv_compiler_ok=yes], - [libc_cv_compiler_ok=no])]) -AS_IF([test $libc_cv_compiler_ok != yes], - [critic_missing="$critic_missing compiler"]) - -AC_CHECK_TOOL(NM, nm, false) - -if test "x$maintainer" = "xyes"; then - AC_CHECK_PROGS(AUTOCONF, autoconf, no) - case "x$AUTOCONF" in - xno|x|x:) AUTOCONF=no ;; - *) - AC_CACHE_CHECK(dnl - whether $AUTOCONF${ACFLAGS:+ }$ACFLAGS works, libc_cv_autoconf_works, [dnl - if (cd $srcdir; $AUTOCONF $ACFLAGS configure.ac > /dev/null 2>&1); then - libc_cv_autoconf_works=yes - else - libc_cv_autoconf_works=no - fi]) - test $libc_cv_autoconf_works = yes || AUTOCONF=no - ;; - esac - if test "x$AUTOCONF" = xno; then - aux_missing="$aux_missing autoconf" - fi -else - AUTOCONF=no -fi - -# Check for python3 if available, or else python. -AC_CHECK_PROG_VER(PYTHON_PROG, python3 python, --version, - [Python \([0-9][0-9.]*\)], - [3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*], - critic_missing="$critic_missing python") -PYTHON="$PYTHON_PROG -B" -AC_SUBST(PYTHON) - -test -n "$critic_missing" && AC_MSG_ERROR([ -*** These critical programs are missing or too old:$critic_missing -*** Check the INSTALL file for required versions.]) - -test -n "$aux_missing" && AC_MSG_WARN([ -*** These auxiliary programs are missing or incompatible versions:$aux_missing -*** some features or tests will be disabled. -*** Check the INSTALL file for required versions.]) - # if using special system headers, find out the compiler's sekrit # header directory and add that to the list. NOTE: Only does the right # thing on a system that doesn't need fixincludes. (Not presently a problem.) From patchwork Fri Dec 2 19:00:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61383 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14A3838582AB for ; Fri, 2 Dec 2022 19:01:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14A3838582AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670007662; bh=jQGCm5Z+hMO0heQWNteUH414nwLX+WvBpjv4MvK49mQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=x0fpF4udEAcJXBvFDl7EWRIX64Geb0vO3F010+Ph/VEXdXXiBMeSjajTt5HFwkZ74 3tq1DWYaFQlU+/GTFbF3TjrgoqUDeSaEgVLxMhomLnyMI8yoyeZzoGjRVqeL3R4RZP /S9v19QB6O1XA6u4rY/PymzG9zmSLfrCwr3E4Czk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by sourceware.org (Postfix) with ESMTPS id 84372385515F for ; Fri, 2 Dec 2022 19:00:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 84372385515F Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-143ffc8c2b2so6586204fac.2 for ; Fri, 02 Dec 2022 11:00:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jQGCm5Z+hMO0heQWNteUH414nwLX+WvBpjv4MvK49mQ=; b=uqOW57QU0sWvl4xyiM+nghW2Wr20DwpcjNLuApS2eDVugAHph0iimd9GM7XFpoe6+g fynM/HY8gOz/LLxTjfKg7XsapEoftJbthUBquXlsEmukgaNvstswkj8qp2MRMM1L1y3C 9LC+xCpLCNU4GhApJ3976ri+MS4XKdbEAjIlcVUEuwfMTRlzMKqrafK+t3YKUOkIvdBY PXpeF96aB011Rfx9cxQvjPLoVahFpzk4lJypuvF0K+3/tLHsE0FwTibQveymbWDAdfkD BYGIA9/LN4SPlf9XN3vsvbefrerAvclj24PfJp4xmXgYGsFIjy4+tBwV0IU2ZIM3SPMQ t97Q== X-Gm-Message-State: ANoB5pk3GJdokNthGGQYuoYBKeBtIGrxTFuUCpUjtSZiLH9Ix55uXRYz hUykvXn11DkErNHPhzFZppr+/MuBPrLd9GvrdlY= X-Google-Smtp-Source: AA0mqf5SsACPMYKDtiIjJFfD88EjXSxpU3yo4Cbus0KZ+SU71QLipOpDQHcBZ4+WRb4WXixXRVHrMA== X-Received: by 2002:a05:6870:3b8a:b0:13d:6f6d:781d with SMTP id gi10-20020a0568703b8a00b0013d6f6d781dmr34564905oab.126.1670007637670; Fri, 02 Dec 2022 11:00:37 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:f215:6472:4682:7ef0:a0a8]) by smtp.gmail.com with ESMTPSA id k60-20020a9d19c2000000b0066ca9001e68sm2218159otk.5.2022.12.02.11.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:00:37 -0800 (PST) To: libc-alpha@sourceware.org, Vineet Gupta , =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: [PATCH 2/6] configure: Remove check if as is GNU Date: Fri, 2 Dec 2022 16:00:26 -0300 Message-Id: <20221202190030.1671870-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" It is not used in any place. Reviewed-by: Carlos O'Donell --- aclocal.m4 | 6 ------ configure | 20 -------------------- 2 files changed, 26 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 531b11cb69..149b9e5376 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -127,12 +127,6 @@ AC_SUBST(OBJCOPY) GPROF=`$CC -print-prog-name=gprof` AC_SUBST(GPROF) -# Determine whether we are using GNU binutils. -AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu, -[LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)]) -rm -f a.out -gnu_as=$libc_cv_prog_as_gnu - AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu, [LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) gnu_ld=$libc_cv_prog_ld_gnu diff --git a/configure b/configure index 9a8acc4ef7..2d3b3946b9 100755 --- a/configure +++ b/configure @@ -4155,26 +4155,6 @@ 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 -$as_echo_n "checking whether $AS is GNU as... " >&6; } -if ${libc_cv_prog_as_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Most GNU programs take a -v and spit out some text including -# the word 'GNU'. Some try to read stdin, so give them /dev/null. -if $AS -o conftest -v &1 | grep GNU > /dev/null 2>&1; then - libc_cv_prog_as_gnu=yes -else - libc_cv_prog_as_gnu=no -fi -rm -fr contest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_prog_as_gnu" >&5 -$as_echo "$libc_cv_prog_as_gnu" >&6; } -rm -f a.out -gnu_as=$libc_cv_prog_as_gnu - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $LD is GNU ld" >&5 $as_echo_n "checking whether $LD is GNU ld... " >&6; } if ${libc_cv_prog_ld_gnu+:} false; then : From patchwork Fri Dec 2 19:00:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61384 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 09ABD3854552 for ; Fri, 2 Dec 2022 19:01:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09ABD3854552 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670007665; bh=2OOTFxtjuYgkqIxQFhOziwIiikjnpnkSfZtbMZI8hTI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=g4IHntjiJzQxowObH9/KMCHNYg8k/i6BUk9gQyUnBzk7QSbmrCijFHySUocSVZGgL sa3/ZhVGIBaYq/eBtz4KUc19HNCPJNPHg2WsPZdd18sXdzIgb1emwiugAbJEaKNZDT By4DaNl/Ow6UCJT/sZwAJkTQVWvYrI0SNZHNvm7c= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 2FEF6385B1BD for ; Fri, 2 Dec 2022 19:00:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2FEF6385B1BD Received: by mail-ot1-x333.google.com with SMTP id s9-20020a05683004c900b0066e7414466bso3464873otd.12 for ; Fri, 02 Dec 2022 11:00:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2OOTFxtjuYgkqIxQFhOziwIiikjnpnkSfZtbMZI8hTI=; b=28AHmcu+9a0PyPHbjVTriFtkihSNz5+m7UagiS9dFm99GJFCOzfgHffsFz1U/vP/lI ISc0jQnsEDIcb4xxdrhFgVwNnp5S7giNAV8RfBhqqjNnVebMfvBduOPbPt23gDRSmChz FhTZdZuPxJyvWWQELebwmODiR3dLvz2EHAA5VW4gkoLYSjyOXMgHjiDdpEn4cQs7QGtf QQhYQiQBK/MfI1YlTW166nTiJRqjmFGk9x56S+rcjaWCqUMyUeWvL40ZYFioc3Z3l2nF qO2iMF9a32PhPbP+D5SXkAJYxYApo+Cii7Tqu+MTWI/DBEcvTUu51EiRRfqpeNVUan+b Mi3A== X-Gm-Message-State: ANoB5pn9qjQowj+vl0IwiaoUQwSLg4RScwhSS4J1P9z10KrPYagC6+dh FRK1swBRnUxSNx/hJQCQnJD/q/YG1RwWGak05CA= X-Google-Smtp-Source: AA0mqf7JLlRWHy622KLyWAQVYB6gfEWL+CRcxvK+xWab8eXbnNy9D7LFR01dFjvRz1pJdDE0pxP97g== X-Received: by 2002:a05:6830:1404:b0:66c:5310:6ff8 with SMTP id v4-20020a056830140400b0066c53106ff8mr27746998otp.122.1670007639260; Fri, 02 Dec 2022 11:00:39 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:f215:6472:4682:7ef0:a0a8]) by smtp.gmail.com with ESMTPSA id k60-20020a9d19c2000000b0066ca9001e68sm2218159otk.5.2022.12.02.11.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:00:38 -0800 (PST) To: libc-alpha@sourceware.org, Vineet Gupta , =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: [PATCH 3/6] configure: Remove check if ld is GNU Date: Fri, 2 Dec 2022 16:00:27 -0300 Message-Id: <20221202190030.1671870-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Assume linker has gnu argument input style. Reviewed-by: Carlos O'Donell --- aclocal.m4 | 32 ++--- configure | 158 +++++++++------------- sysdeps/unix/sysv/linux/powerpc/configure | 28 ++-- 3 files changed, 91 insertions(+), 127 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 149b9e5376..88db64a683 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -126,10 +126,6 @@ OBJCOPY=`$CC -print-prog-name=objcopy` AC_SUBST(OBJCOPY) GPROF=`$CC -print-prog-name=gprof` AC_SUBST(GPROF) - -AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu, -[LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)]) -gnu_ld=$libc_cv_prog_ld_gnu ]) dnl Run a static link test with -nostdlib -nostartfiles. @@ -219,25 +215,23 @@ dnl LIBC_LINKER_FEATURE([ld_option], [cc_option], [action-if-true], [action-if-f AC_DEFUN([LIBC_LINKER_FEATURE], [AC_MSG_CHECKING([for linker that supports $1]) libc_linker_feature=no -if test x"$gnu_ld" = x"yes"; then - cat > conftest.c < conftest.c <&AS_MESSAGE_LOG_FD]) - then - if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: $1 ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp + $2 -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&AS_MESSAGE_LOG_FD]) +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp $2 -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: $1 ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then $3 else diff --git a/configure b/configure index 2d3b3946b9..086d6fba7a 100755 --- a/configure +++ b/configure @@ -4155,24 +4155,6 @@ OBJCOPY=`$CC -print-prog-name=objcopy` GPROF=`$CC -print-prog-name=gprof` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $LD is GNU ld" >&5 -$as_echo_n "checking whether $LD is GNU ld... " >&6; } -if ${libc_cv_prog_ld_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Most GNU programs take a -v and spit out some text including -# the word 'GNU'. Some try to read stdin, so give them /dev/null. -if $LD -o conftest -v &1 | grep GNU > /dev/null 2>&1; then - libc_cv_prog_ld_gnu=yes -else - libc_cv_prog_ld_gnu=no -fi -rm -fr contest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_prog_ld_gnu" >&5 -$as_echo "$libc_cv_prog_ld_gnu" >&6; } -gnu_ld=$libc_cv_prog_ld_gnu - # Accept binutils 2.25 or newer. for ac_prog in $AS @@ -6037,30 +6019,28 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z execstack" >&5 $as_echo_n "checking for linker that supports -z execstack... " >&6; } libc_linker_feature=no -if test x"$gnu_ld" = x"yes"; then - 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 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,execstack -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: -z execstack ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,execstack -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: -z execstack ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then libc_cv_z_execstack=yes else @@ -6073,30 +6053,28 @@ $as_echo "$libc_linker_feature" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z start-stop-gc" >&5 $as_echo_n "checking for linker that supports -z start-stop-gc... " >&6; } libc_linker_feature=no -if test x"$gnu_ld" = x"yes"; then - 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 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,start-stop-gc -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: -z start-stop-gc ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,start-stop-gc -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: -z start-stop-gc ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then libc_cv_z_start_stop_gc=yes else @@ -6110,30 +6088,28 @@ have-z-start-stop-gc = $libc_cv_z_start_stop_gc" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports --depaudit" >&5 $as_echo_n "checking for linker that supports --depaudit... " >&6; } libc_linker_feature=no -if test x"$gnu_ld" = x"yes"; then - 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 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,--depaudit,x -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: --depaudit ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,--depaudit,x -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: --depaudit ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then libc_cv_depaudit=yes else @@ -6147,30 +6123,28 @@ have-depaudit = $libc_cv_depaudit" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z pack-relative-relocs" >&5 $as_echo_n "checking for linker that supports -z pack-relative-relocs... " >&6; } libc_linker_feature=no -if test x"$gnu_ld" = x"yes"; then - 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 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,pack-relative-relocs -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: -z pack-relative-relocs ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,pack-relative-relocs -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: -z pack-relative-relocs ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then libc_cv_dt_relr=yes else @@ -6184,30 +6158,28 @@ have-dt-relr = $libc_cv_dt_relr" { $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 - 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 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,--no-dynamic-linker -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: --no-dynamic-linker ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,--no-dynamic-linker -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: --no-dynamic-linker ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then libc_cv_no_dynamic_linker=yes else diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure index 7183573bc0..84a39495f0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/configure +++ b/sysdeps/unix/sysv/linux/powerpc/configure @@ -79,30 +79,28 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports --no-tls-get-addr-optimize" >&5 $as_echo_n "checking for linker that supports --no-tls-get-addr-optimize... " >&6; } libc_linker_feature=no -if test x"$gnu_ld" = x"yes"; then - 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 ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,--no-tls-get-addr-optimize -nostdlib \ - -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ - | grep "warning: --no-tls-get-addr-optimize ignored" > /dev/null 2>&1; then - true - else - libc_linker_feature=yes - fi +then + if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,--no-tls-get-addr-optimize -nostdlib \ + -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \ + | grep "warning: --no-tls-get-addr-optimize ignored" > /dev/null 2>&1; then + true + else + libc_linker_feature=yes fi - rm -f conftest* fi +rm -f conftest* if test $libc_linker_feature = yes; then libc_cv_tls_get_addr_optimize=yes else From patchwork Fri Dec 2 19:00:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61385 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 999EE384F489 for ; Fri, 2 Dec 2022 19:01:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 999EE384F489 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670007675; bh=w3lLDPtW8cX+kXeXMqUUglECzqFRXQB0Cl5wyMaMsLI=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EwN2oxlsXKkj8CszuZkT2Bx7lWD+77s5cSEuR2fsVneqyk4xQl9gdjXoAH9V+HvEW hlEPDQi8g2lArWeIbvdB5+3rfw66yIPLSFWLkWD0kKpZIsdCDNip9KzKw9zl3bbrjh R68SR7RphY6n8cybkQcN8uzluUp4ceaU+7a0oG54= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by sourceware.org (Postfix) with ESMTPS id 0553D3855174 for ; Fri, 2 Dec 2022 19:00:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0553D3855174 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-142b72a728fso6537821fac.9 for ; Fri, 02 Dec 2022 11:00:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w3lLDPtW8cX+kXeXMqUUglECzqFRXQB0Cl5wyMaMsLI=; b=FY4xM9uq09F83zfn8fK4ddah0YyX12f1wiTec94JFm3nxv8mPqch1qaKa1juqEGHqs AqUdlHqW0YgpT7HRufVIyvdCyZl/omQPSIeB1DPV5wr1G+qJsm/oG36sqcZiOeyFRFWu eQ1VwTpwK4Blbcat/yfNOvlbiAl2FqTEKPqQOR+fsJ3HAj4rgi4bxKwirb6AP5HFixgw aKdblqR+lyOfq/3BFlTLGyGUQWrFb1ufl0J8y0N/lpl8Wp/E8GLwzSN6t7oT1fJED5Wx 6K+XwVRnc3flI9KidHyyUBu0WryZZ6CXV6HJjO31sLrmoa1P/Nwd0q/aY3QeklCmTaa8 7JXA== X-Gm-Message-State: ANoB5plUleBRiQy+ouLjoZ/5RgDWGfElNfG7MRyfy29CKqa3agiG+mu4 vt5XclsgPjG36395JhsAg1bNs5eLFs914551IMc= X-Google-Smtp-Source: AA0mqf4NZm0+22zgIVQYa0qvf9sdpilwv3VkLkeDNxcY+xB8UoIenfA4pAypTm/dVCIGGUasyAb+kg== X-Received: by 2002:a05:6870:47a0:b0:13b:6648:8a46 with SMTP id c32-20020a05687047a000b0013b66488a46mr33725858oaq.86.1670007641073; Fri, 02 Dec 2022 11:00:41 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:f215:6472:4682:7ef0:a0a8]) by smtp.gmail.com with ESMTPSA id k60-20020a9d19c2000000b0066ca9001e68sm2218159otk.5.2022.12.02.11.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:00:40 -0800 (PST) To: libc-alpha@sourceware.org, Vineet Gupta , =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: [PATCH 4/6] configure: Remove AS check Date: Fri, 2 Dec 2022 16:00:28 -0300 Message-Id: <20221202190030.1671870-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The assembler is not issued directly, but rather always through CC wrapper. The binutils version check if done with LD instead. Reviewed-by: Carlos O'Donell --- aclocal.m4 | 1 - configure | 66 ------------------------------------ configure.ac | 5 --- scripts/build-many-glibcs.py | 1 - sysdeps/x86/configure | 4 +-- sysdeps/x86/configure.ac | 2 +- 6 files changed, 3 insertions(+), 76 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 88db64a683..7ab8ac023b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -118,7 +118,6 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -AS=`$CC -print-prog-name=as` LD=`$CC -print-prog-name=$LDNAME` AR=`$CC -print-prog-name=ar` AC_SUBST(AR) diff --git a/configure b/configure index 086d6fba7a..62c2581cb0 100755 --- a/configure +++ b/configure @@ -654,7 +654,6 @@ MAKEINFO MSGFMT MAKE LD -AS GPROF OBJCOPY AR @@ -4146,7 +4145,6 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -AS=`$CC -print-prog-name=as` LD=`$CC -print-prog-name=$LDNAME` AR=`$CC -print-prog-name=ar` @@ -4157,70 +4155,6 @@ GPROF=`$CC -print-prog-name=gprof` # 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. -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_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # 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_AS="$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 -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AS" && break -done - -if test -z "$AS"; then - ac_verc_fail=yes -else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $AS" >&5 -$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[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;; - - 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 - AS=: critic_missing="$critic_missing as" -fi - - libc_cv_with_lld=no case $($LD --version) in "GNU gold"*) diff --git a/configure.ac b/configure.ac index 5709c7a0cf..022b8f68bc 100644 --- a/configure.ac +++ b/configure.ac @@ -572,11 +572,6 @@ AC_PROG_LN_S LIBC_PROG_BINUTILS # Accept binutils 2.25 or newer. -AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\)], - [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*], - AS=: critic_missing="$critic_missing as") - libc_cv_with_lld=no case $($LD --version) in "GNU gold"*) diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 5af6f369ae..9292a0d3ff 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -1522,7 +1522,6 @@ class GlibcPolicyDefault(object): 'CC=%s' % glibc.tool_name('gcc'), 'CXX=%s' % glibc.tool_name('g++'), 'AR=%s' % glibc.tool_name('ar'), - 'AS=%s' % glibc.tool_name('as'), 'LD=%s' % glibc.tool_name('ld'), 'NM=%s' % glibc.tool_name('nm'), 'OBJCOPY=%s' % glibc.tool_name('objcopy'), diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure index a9c8c2ef67..f80fedd9dd 100644 --- a/sysdeps/x86/configure +++ b/sysdeps/x86/configure @@ -33,8 +33,8 @@ $as_echo "$libc_cv_x86_cet_available" >&6; } fi if test $enable_cet != no; then # Check if assembler supports CET. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS supports CET" >&5 -$as_echo_n "checking whether $AS supports CET... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports CET" >&5 +$as_echo_n "checking whether compiler supports CET... " >&6; } if ${libc_cv_x86_cet_as+:} false; then : $as_echo_n "(cached) " >&6 else diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac index edd43a2551..ac55dc674a 100644 --- a/sysdeps/x86/configure.ac +++ b/sysdeps/x86/configure.ac @@ -22,7 +22,7 @@ EOF fi if test $enable_cet != no; then # Check if assembler supports CET. - AC_CACHE_CHECK(whether $AS supports CET, + AC_CACHE_CHECK(whether compiler supports CET, libc_cv_x86_cet_as, [dnl cat > conftest.s < X-Patchwork-Id: 61386 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C30E73852C72 for ; Fri, 2 Dec 2022 19:01:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C30E73852C72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670007707; bh=fhD4IN1S7Tx4ckxYCdp3Pmc0rSvpZmhXN6VvXA30Hh0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=r1MzT6Eb79+WzDDEwokIare7JtsjC3BTjRYLASkHuOiH21xcvyI4eQQvvHX+hSha1 xR3aiOLO93E/z/d0A5ZRIPHm7vex6+GomyVqw37mgl1nlIXaKxr7z8X61HPK0c874/ 0b0zqzvOi7k43SAtk3+TKtXj1vH+fVE1UPoCKqaQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x234.google.com (mail-oi1-x234.google.com [IPv6:2607:f8b0:4864:20::234]) by sourceware.org (Postfix) with ESMTPS id D377E3854558 for ; Fri, 2 Dec 2022 19:00:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D377E3854558 Received: by mail-oi1-x234.google.com with SMTP id t62so6211361oib.12 for ; Fri, 02 Dec 2022 11:00:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fhD4IN1S7Tx4ckxYCdp3Pmc0rSvpZmhXN6VvXA30Hh0=; b=r2oHMd6eNity+kQBBmoE7BkYzpKMax/g3rH14c2foFEjwrZVomsUzmq7X92IDbAacd 0JdWVuNnboUSOOczZ4yMn3gA+U4+9wz8ZF1rEU93RlrBPeqiFtfAr5UmAeezBbx7Cpl+ kD5b+3oL+l1rqG2gbPYvx3IlCAUXENqRdWwWHOU42D9Yp8fEzue9ed3/fi1B3i3+Tzvq 0cNcUaHlY3plzyXHYKvc+VEdTzeF5IydMZqcfq9V01v5yjdDdk6Sn4sZdZZaiDFZBVZQ iZEOx4MEZh1jzIUtAm9/JJuKm6XcVesiqM2glANoOcQXJM1/A8GulMO+8ZLGywE3c0bY P2iw== X-Gm-Message-State: ANoB5pndVRjqNb1WZrIKp1VcDb6S3TxE+97fwlDR6bzCK3yOs3PMgQ7J aXql3sg1rHncOkckkxZRwkmDVteg0ZR4pYjOKOQ= X-Google-Smtp-Source: AA0mqf7BAz6ULOQJEH/JIpTaImOPlriAjDn8yBQuff0xuxUJn0fO7FE9nHcYhVRaXDSseqKJ3OVQig== X-Received: by 2002:a05:6808:14d4:b0:35a:a4f:a95d with SMTP id f20-20020a05680814d400b0035a0a4fa95dmr24750958oiw.86.1670007642775; Fri, 02 Dec 2022 11:00:42 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:f215:6472:4682:7ef0:a0a8]) by smtp.gmail.com with ESMTPSA id k60-20020a9d19c2000000b0066ca9001e68sm2218159otk.5.2022.12.02.11.00.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:00:42 -0800 (PST) To: libc-alpha@sourceware.org, Vineet Gupta , =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: [PATCH 5/6] configure: Allow user override LD, AR, OBJCOPY, and GPROF Date: Fri, 2 Dec 2022 16:00:29 -0300 Message-Id: <20221202190030.1671870-6-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" The only way to override LD, AR, OBJCOPY, and GPROF is through --with-binutils (setting the environments variables on configure is overridden by LIBC_PROG_BINUTILS). --- aclocal.m4 | 16 ++++++++++++---- configure | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 7ab8ac023b..cbe3c4698a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -118,12 +118,20 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -LD=`$CC -print-prog-name=$LDNAME` -AR=`$CC -print-prog-name=ar` +if test -z "$LD"; then + LD=`$CC -print-prog-name=$LDNAME` +fi +if test -z "$AR"; then + AR=`$CC -print-prog-name=ar` +fi AC_SUBST(AR) -OBJCOPY=`$CC -print-prog-name=objcopy` +if test -z "$OBJCOPY"; then + OBJCOPY=`$CC -print-prog-name=objcopy` +fi AC_SUBST(OBJCOPY) -GPROF=`$CC -print-prog-name=gprof` +if test -z "$GPROF"; then + GPROF=`$CC -print-prog-name=gprof` +fi AC_SUBST(GPROF) ]) diff --git a/configure b/configure index 62c2581cb0..8f91bb6e11 100755 --- a/configure +++ b/configure @@ -4145,12 +4145,20 @@ case "$CC" in *fuse-ld=lld*) LDNAME=ld.lld;; *) LDNAME=ld;; esac -LD=`$CC -print-prog-name=$LDNAME` -AR=`$CC -print-prog-name=ar` +if test -z "$LD"; then + LD=`$CC -print-prog-name=$LDNAME` +fi +if test -z "$AR"; then + AR=`$CC -print-prog-name=ar` +fi -OBJCOPY=`$CC -print-prog-name=objcopy` +if test -z "$OBJCOPY"; then + OBJCOPY=`$CC -print-prog-name=objcopy` +fi -GPROF=`$CC -print-prog-name=gprof` +if test -z "$GPROF"; then + GPROF=`$CC -print-prog-name=gprof` +fi From patchwork Fri Dec 2 19:00:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 61388 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 96EAD3842405 for ; Fri, 2 Dec 2022 19:01:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 96EAD3842405 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670007718; bh=48icfG4Ge157mw9dFx2buQCJ7ikmYPdv1R674/o0Y3Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EdRdr1DuTDRthlgMeaiPtL6B6LYSSEMkaQO/9z0hvh/NHbBpnClzwT6Dr7sD0oQw2 nVwruZTM2aP0Yb+kkeb2Zp9YZArNEbqAXEwds3lcNnMXQuW++Hg8YnLcKShGVbwASQ BnnR+6BcUuS0Hbmjskia43ymKmQ8S22kBXGLT1OM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) by sourceware.org (Postfix) with ESMTPS id A5B8B385B1AD for ; Fri, 2 Dec 2022 19:00:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A5B8B385B1AD Received: by mail-oi1-x235.google.com with SMTP id q186so6219927oia.9 for ; Fri, 02 Dec 2022 11:00:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=48icfG4Ge157mw9dFx2buQCJ7ikmYPdv1R674/o0Y3Q=; b=LLZeh+Iw4IwV5f0CgiVEtxJ4nv7h5ORyegGs2lzZS1s0a63flFuBeng9vrtkjoDolM /HCIq4NlZStLC3BfVkj14zSH/+C2+Zd8QFFI3sVhHmgmxcxjyiTC8VWoMPjN5JpcLdM2 1w5p6BYHRI8hvQhZDuCF10G6vo7H7Lr8ckjhqjwjMFN0JIT/1+78KDWuCarP64YBjuS6 goMDgUvAK1T5K+XW09gQ+pQOhUyi9F7qrwoVplE0nsJmoeDAxQRJFHEqxoyblepVQJAZ pCliEYlpVGOt5mkhR1aF//8KDEE6SUv+TisGAXcXCYlWcpihQ//TFXxbAUS6QGAj17Op 9d0Q== X-Gm-Message-State: ANoB5pnr9XZgQni9GKxbAAxcToTrTRxkJY/dUF1vmMhwxpZZ0k7TKCIJ 4Dn88jW7bNzFEOJ0TeDTSITRIrsyv1dEXlKqkzE= X-Google-Smtp-Source: AA0mqf56n1htapUlWx+VdJRDMpRPJ2uleR2arEZT3JA6+I0nUKgkcZm98+tgi9KCaTtHjP8vVIhoRA== X-Received: by 2002:a54:470f:0:b0:35b:ca56:d94a with SMTP id k15-20020a54470f000000b0035bca56d94amr8183993oik.141.1670007644602; Fri, 02 Dec 2022 11:00:44 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c1:f215:6472:4682:7ef0:a0a8]) by smtp.gmail.com with ESMTPSA id k60-20020a9d19c2000000b0066ca9001e68sm2218159otk.5.2022.12.02.11.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 11:00:44 -0800 (PST) To: libc-alpha@sourceware.org, Vineet Gupta , =?utf-8?q?Ludovic_Court=C3=A8s?= Subject: [PATCH 6/6] configure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILS Date: Fri, 2 Dec 2022 16:00:30 -0300 Message-Id: <20221202190030.1671870-7-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" It allows to be overriden on configure tie the tools with the cross compiler used. --- aclocal.m4 | 12 +++ configure | 295 +++------------------------------------------------ configure.ac | 4 - 3 files changed, 27 insertions(+), 284 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index cbe3c4698a..c7fea8a722 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -133,6 +133,18 @@ if test -z "$GPROF"; then GPROF=`$CC -print-prog-name=gprof` fi AC_SUBST(GPROF) +if test -z "$READELF"; then + GPROF=`$CC -print-prog-name=readelf` +fi +AC_SUBST(READELF) +if test -z "$OBJDUMP"; then + GPROF=`$CC -print-prog-name=objdump` +fi +AC_SUBST(OBJDUMP) +if test -z "$NM"; then + GPROF=`$CC -print-prog-name=nm` +fi +AC_SUBST(NM) ]) dnl Run a static link test with -nostdlib -nostartfiles. diff --git a/configure b/configure index 8f91bb6e11..5967e5bf67 100755 --- a/configure +++ b/configure @@ -646,7 +646,6 @@ libc_cv_with_fp PYTHON PYTHON_PROG AUTOCONF -NM BISON AWK SED @@ -654,6 +653,9 @@ MAKEINFO MSGFMT MAKE LD +NM +OBJDUMP +READELF GPROF OBJCOPY AR @@ -683,8 +685,6 @@ sysheaders ac_ct_CXX CXXFLAGS CXX -OBJDUMP -READELF CPP cross_compiling BUILD_CC @@ -2870,190 +2870,6 @@ 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 - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" - $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 -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump" - $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="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 - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - # We need the C++ compiler only for testing. ac_ext=cpp @@ -4160,6 +3976,18 @@ if test -z "$GPROF"; then GPROF=`$CC -print-prog-name=gprof` fi +if test -z "$READELF"; then + GPROF=`$CC -print-prog-name=readelf` +fi + +if test -z "$OBJDUMP"; then + GPROF=`$CC -print-prog-name=objdump` +fi + +if test -z "$NM"; then + GPROF=`$CC -print-prog-name=nm` +fi + # Accept binutils 2.25 or newer. @@ -4781,99 +4609,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 -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 - NM=$ac_ct_NM - fi -else - NM="$ac_cv_prog_NM" -fi - - if test "x$maintainer" = "xyes"; then for ac_prog in autoconf do diff --git a/configure.ac b/configure.ac index 022b8f68bc..011844a3d4 100644 --- a/configure.ac +++ b/configure.ac @@ -51,8 +51,6 @@ if test $host != $build; then fi AC_SUBST(cross_compiling) AC_PROG_CPP -AC_CHECK_TOOL(READELF, readelf, false) -AC_CHECK_TOOL(OBJDUMP, objdump, false) # We need the C++ compiler only for testing. AC_PROG_CXX @@ -632,8 +630,6 @@ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[ AS_IF([test $libc_cv_compiler_ok != yes], [critic_missing="$critic_missing compiler"]) -AC_CHECK_TOOL(NM, nm, false) - if test "x$maintainer" = "xyes"; then AC_CHECK_PROGS(AUTOCONF, autoconf, no) case "x$AUTOCONF" in