From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 43E4D1F601 for ; Mon, 5 Dec 2022 15:56:44 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="MQRvnIzz"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7A193393BA4D for ; Mon, 5 Dec 2022 15:56:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A193393BA4D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670255803; bh=aK+Y57KAnm8FAyHUPuHgCSu8qDlvTZhG2e9ms2uQVfw=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MQRvnIzz0mHsFq22eZVtltdgcqHApY6afwkzzLoyZQz707RhJ3GLD6ccqqlq6BPiV RG5GY9k+ICKoFd91IUy9Ex5U2yosrSH0m/3z2vMKsS1nKca57WWtIuLqtiyjB1iIFv xmFfpK9BkRNR/A491sGeAPx2kdoZ/02xXWQiOdMY= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 10BA938AA27A for ; Mon, 5 Dec 2022 15:56:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 10BA938AA27A Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-612-iHlopmYHM_iNpNtUyXwbKQ-1; Mon, 05 Dec 2022 10:56:11 -0500 X-MC-Unique: iHlopmYHM_iNpNtUyXwbKQ-1 Received: by mail-io1-f70.google.com with SMTP id h21-20020a05660224d500b006debd7dedccso10029006ioe.9 for ; Mon, 05 Dec 2022 07:56:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aK+Y57KAnm8FAyHUPuHgCSu8qDlvTZhG2e9ms2uQVfw=; b=2QWVdTO+eQ0x3RBNZIL1tHXCGm7TKo/esSkoZJiguDwM3zTDFndBpzDTYvTYGgOb3O OiFIghmW8bGDsm7yB/xx2i+6FPkeziblxHbRlKarJPKvkM66vtiUx+7WDPH9+uVbmHRe GKoS6Yg4rhLe2o1TtUM8ajOFnslFd2u7YxwQs2SEJ6eZXkCoQ/fkfVMhOXiQ8IoZQAtN y4AMs/Ea5ySyX6cdHojt8dvoFM3LPFf98H51nbAKh1O/p3hYMsr3UY3aBASNCWl3vNBc FISPP2BYhEup1GpBi+BjvSBIGSAPZPMl18nda5GBmH8AjTM/NVgs/hPmWutlaoFEFXQo tN3w== X-Gm-Message-State: ANoB5plaJHZG/XAq17i33z/Hk4s6FR2WzeFZquPy8YhTa7eAL7ZqK3i2 WjmaAtdvBGVBAqOj4fCvEHua+w84bD8LEKqbtsx7QXFaAZRz/75RSv0Ft1gKfcw/wXRIC7lcL5t IwsUF3He11sw39sAJ3WEK X-Received: by 2002:a92:c8c3:0:b0:302:a229:3090 with SMTP id c3-20020a92c8c3000000b00302a2293090mr37585990ilq.90.1670255771083; Mon, 05 Dec 2022 07:56:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf45M7uH0U6jF7PdIg2MnZ8EaysDPbIKjh/tI9mgpDbJOzx4HtTiPYh86CN2Obf7CUXSEAiTVw== X-Received: by 2002:a92:c8c3:0:b0:302:a229:3090 with SMTP id c3-20020a92c8c3000000b00302a2293090mr37585974ilq.90.1670255770738; Mon, 05 Dec 2022 07:56:10 -0800 (PST) Received: from [192.168.0.241] (192-0-145-146.cpe.teksavvy.com. [192.0.145.146]) by smtp.gmail.com with ESMTPSA id a14-20020a056e020e0e00b003036d1ee5cbsm384211ilk.41.2022.12.05.07.56.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Dec 2022 07:56:10 -0800 (PST) Message-ID: <23c8edd7-9b02-67c2-aa06-96281ea446c1@redhat.com> Date: Mon, 5 Dec 2022 10:56:09 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 1/6] configure: Move locale tools early To: Adhemerval Zanella , libc-alpha@sourceware.org, Vineet Gupta , =?UTF-8?Q?Ludovic_Court=c3=a8s?= References: <20221202190030.1671870-1-adhemerval.zanella@linaro.org> <20221202190030.1671870-2-adhemerval.zanella@linaro.org> Organization: Red Hat In-Reply-To: <20221202190030.1671870-2-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , From: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 12/2/22 14:00, Adhemerval Zanella via Libc-alpha wrote: > 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. Agreed. LGTM. 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 OK. Regenerate. > --- 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.]) > + > + OK. Moved up. > # 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.]) > - OK. Move up. > # 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.) -- Cheers, Carlos.