From: Bruno Haible <bruno@clisp.org>
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 [thread overview]
Message-ID: <18714757.ferZtxMEmV@omega> (raw)
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 <bruno@clisp.org>
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
}
;;
*)
reply other threads:[~2020-12-29 3:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18714757.ferZtxMEmV@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).