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-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CCA371F4B4 for ; Tue, 29 Dec 2020 03:05:43 +0000 (UTC) Received: from localhost ([::1]:39832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ku5KQ-0007vJ-LN for normalperson@yhbt.net; Mon, 28 Dec 2020 22:05:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku5K8-0007v9-8u for bug-gnulib@gnu.org; Mon, 28 Dec 2020 22:05:24 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.221]:34655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ku5K6-0006gh-1B for bug-gnulib@gnu.org; Mon, 28 Dec 2020 22:05:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1609211119; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:From:Subject:Sender; bh=ToG1O7uTcyBTcA0Pcl4/S8Kpmc0sS478XfGSXu1AqUw=; b=WK1Ab9mhkUZ1FbBlvrRv2B0nzQBZWdDzwBut7aiLIGrI20qFPG2IKp3drw05iwy2A5 T/aPznmiwCqWdUyII3l+Q3ErqZp8TYvHBMvVuESzDWREcAAl49y/6ujoldGm6FhnmGUo 8n3aQhEi3xntvB45wcQ9cUG2Hg63U5OtSLJMHge9xFg0zegtNHy9O9lr6vJIiUxMwcHx pfbYX9gNVIpVD+WIUsOSrb0/6cpqH0NyEZnfgqImoV9WYOoc+wFbr5+mALM97Pg13RuH MFaU5Dd4Rf+LR2AEKys9kfHuSjNSN/tZq180IH4bKIdAZ8M9Dm86flLzeVg0dCucGGVD pt1A== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6f3z/s=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.10.7 DYNA|AUTH) with ESMTPSA id e012d5wBT35INYF (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Tue, 29 Dec 2020 04:05:18 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS Date: Tue, 29 Dec 2020 04:05:17 +0100 Message-ID: <18714757.ferZtxMEmV@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.221; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" The ELF class detection of shared libraries is not working on Solaris 11 OpenIndiana and Solaris 11 OmniOS, leading to executables linked without rpath. The cause is that on these platforms, the 'od' program prints decimal values of bytes as 3-digit integers, padded with zeroes, instead of padded with spaces, like other platforms (including Solaris 10 and Solaris 11.3) do. One possible fix is to use octal output. Another one is to compare the resulting value using 'expr' instead of 'test'. Here I prefer the latter. 2020-12-28 Bruno Haible havelib: Fix for Solaris 11 OpenIndiana and Solaris 11 OmniOS. * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): In acl_is_expected_elfclass, use 'expr', not 'test'. diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 index 28bb3d3..2bcdfdf 100644 --- a/m4/lib-prefix.m4 +++ b/m4/lib-prefix.m4 @@ -1,4 +1,4 @@ -# lib-prefix.m4 serial 18 +# lib-prefix.m4 serial 19 dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -198,20 +198,23 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB], echo } fi + # Use 'expr', not 'test', to compare the values of func_elfclass, because on + # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, + # not 1 or 2. changequote(,)dnl case $HOST_CPU_C_ABI_32BIT in yes) # 32-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null } ;; no) # 64-bit ABI. acl_is_expected_elfclass () { - test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null } ;; *)