From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 4E29A385840F for ; Tue, 22 Mar 2022 17:31:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4E29A385840F Received: by mail-oi1-x229.google.com with SMTP id s207so20166671oie.11 for ; Tue, 22 Mar 2022 10:31:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=ZkXR0z602vZjYZYKhIpqnesWCNMZ/9dGV2tDtHrdVxs=; b=ZF5H/kh0cvaMMiZyGeQeLksUMQozfCa3s0nZ/JN3p/+E1ICDN7wj6i0I0yyNop0pq9 TpDYmGy6uN8rmYtH4jw1Nm1bPhGmHGXQhN070psiLIy7NtofbKp+EETeFHcWI8n2mgxR uTYqF89nnUq+VkapnNKi/GOrkfwk9sFSSRQ5ds0rUkjLISXHEW7uozuvvwldkLv2GOiU gSeqVVuGQNjhYaJ4Sem58wCs2R69DXq+V9/i3ha98+iwaeqYEpsgZ4R5JlrPdj1fhq/8 Lg8V14xsR0qtEYpqYUMfBG/qkHENdyTRMGRWla/yyT1EyLBz0JLa0B0elyPzrDMKghvO FRbQ== X-Gm-Message-State: AOAM532NP4B22SFM3CFrlImRPlR0jkRXScn0Ot9hLpbqnwF701Mxqadx 9VD8VBt0s8MpUM1vdFmpC9GWmA== X-Google-Smtp-Source: ABdhPJyZXUL7RUr7wFhgGuLr9NOl6XdF5GEzbRmpildA909h7C3cZCRtbl0AYBtdIDBfhOHBwUEmqg== X-Received: by 2002:a05:6808:13d4:b0:2ce:2801:d7bb with SMTP id d20-20020a05680813d400b002ce2801d7bbmr2595431oiw.44.1647970261434; Tue, 22 Mar 2022 10:31:01 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:2d55:3e27:6bd1:b1d4:af84? ([2804:431:c7ca:2d55:3e27:6bd1:b1d4:af84]) by smtp.gmail.com with ESMTPSA id g6-20020a056870a24600b000da0df8b3cesm7565650oai.20.2022.03.22.10.30.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Mar 2022 10:31:00 -0700 (PDT) Message-ID: <6a63f6b5-f637-db9a-908c-232c11100a1d@linaro.org> Date: Tue, 22 Mar 2022 14:30:58 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v2] configure.ac: fix bashisms in configure.ac Content-Language: en-US To: Sam James , libc-alpha@sourceware.org References: <20220322171117.1945898-1-sam@gentoo.org> From: Adhemerval Zanella In-Reply-To: <20220322171117.1945898-1-sam@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Tue, 22 Mar 2022 17:31:08 -0000 On 22/03/2022 14:11, Sam James via Libc-alpha wrote: > configure scripts need to be runnable with a POSIX-compliant /bin/sh. > > On many (but not all!) systems, /bin/sh is provided by Bash, so errors > like this aren't spotted. Notably Debian defaults to /bin/sh provided > by dash which doesn't tolerate such bashisms as '=='. > > This retains compatibility with bash. > > Fixes configure warnings/errors like: > ``` > checking if compiler warns about alias for function with incompatible types... yes > /var/tmp/portage/sys-libs/glibc-2.34-r10/work/glibc-2.34/configure: 4209: test: xyes: unexpected operator > ``` > > Signed-off-by: Sam James I think you need to regenerate the powerpc64le configure as well. > --- > configure | 2 +- > configure.ac | 2 +- > sysdeps/powerpc/powerpc64/le/configure.ac | 2 +- > sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/configure b/configure > index 8e5bee775a..2a3cb49b0b 100755 > --- a/configure > +++ b/configure > @@ -4232,7 +4232,7 @@ 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 > + 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 > diff --git a/configure.ac b/configure.ac > index 87f67d25ec..fa7d3c025b 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -767,7 +767,7 @@ 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 > + if test x"$libc_cv_gcc_incompatible_alias" = xyes; then > AC_MSG_WARN([gcc emits a warning for alias between functions of incompatible types]) > if test x"$multi_arch" = xyes; then > AC_MSG_ERROR([--enable-multi-arch support requires a gcc with gnu-indirect-function support]) > diff --git a/sysdeps/powerpc/powerpc64/le/configure.ac b/sysdeps/powerpc/powerpc64/le/configure.ac > index 9f0423ede2..48d7089b63 100644 > --- a/sysdeps/powerpc/powerpc64/le/configure.ac > +++ b/sysdeps/powerpc/powerpc64/le/configure.ac > @@ -63,7 +63,7 @@ long double x; > [libc_cv_compiler_powerpc64le_ldbl128_mabi=yes], > [libc_cv_compiler_powerpc64le_ldbl128_mabi=no]) > CFLAGS="$save_CFLAGS"]) > -AS_IF([test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"], > +AS_IF([test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" = "no"], > [critic_missing="$critic_missing The compiler must support -mabi=ieeelongdouble and -mlong-double-128 simultaneously."]) > > dnl objcopy (binutils) 2.26 or newer required to support the --update-section > diff --git a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac > index ceb578cc59..257ca6c110 100644 > --- a/sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac > +++ b/sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac > @@ -9,6 +9,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ > [libc_cv_mcpu_power10=yes], > [libc_cv_mcpu_power10=no])]) > LIBC_CONFIG_VAR([mcpu-power10], [$libc_cv_mcpu_power10]) > -AS_IF([[test "$libc_cv_mcpu_power10" == "yes"]],[ > +AS_IF([[test "$libc_cv_mcpu_power10" = "yes"]],[ > AC_DEFINE(USE_PPC64_MCPU_POWER10)]) > CFLAGS="$OLD_CFLAGS"