From patchwork Mon Mar 21 23:03:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam James X-Patchwork-Id: 1607951 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=OD4TOS0P; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KMqtt3DGmz9s0r for ; Tue, 22 Mar 2022 10:04:22 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2CE393858C54 for ; Mon, 21 Mar 2022 23:04:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2CE393858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1647903859; bh=i/w8B4F5SGjVGkhg42hYxiR4PQ8e6egA6rmX5MFpLpw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=OD4TOS0POqjo1Jv2f4eMQpCZkd6BfNlhmi84G+MqmsUkzkl23y/XspPAUCFHLa7iJ +XhoSrPLMytg4nHhDrD4Go6z6UKirO9u+DzLwu5g5bT+GGFNs1V/ksaPmyx+kamU4s R85wV/93Vor8vJxrO8Yx3iCmF2P8R8XsO016tNhg= 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 490003858C51 for ; Mon, 21 Mar 2022 23:04:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 490003858C51 To: libc-alpha@sourceware.org Subject: [PATCH] configure.ac: fix bashism in configure.ac Date: Mon, 21 Mar 2022 23:03:43 +0000 Message-Id: <20220321230343.2582331-1-sam@gentoo.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.4 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+incoming=patchwork.ozlabs.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 Reviewed-by: Adhemerval Zanella --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 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])