From patchwork Tue Mar 22 17:11:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam James X-Patchwork-Id: 52227 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 3D00D3947C25 for ; Tue, 22 Mar 2022 17:12:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D00D3947C25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1647969122; bh=+jt9R09DVjIxPEiSvGiI3iFA9L5THPWoTT/dNZ/tbJU=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jUhNlfkUhX10qszw+oted6SNdM6Wn6pGdGX2Y/PB4blHqCJUnvnMYVmcJ2vXU5RdN jiL/ooP1AWcEydb9PCFD7mca2/v+i7FMyj1h31GFR2uC8Z1WKhaQR5Hed1breu0j1K fc6Qf0sh2ufu1prQQdiPMqATedcFosmsckR4wczQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 3EF193945C3D for ; Tue, 22 Mar 2022 17:11:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3EF193945C3D To: libc-alpha@sourceware.org Subject: [PATCH v2] configure.ac: fix bashisms in configure.ac Date: Tue, 22 Mar 2022 17:11:17 +0000 Message-Id: <20220322171117.1945898-1-sam@gentoo.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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-Patchwork-Original-From: Sam James via Libc-alpha From: Sam James Reply-To: Sam James Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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 --- 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"