public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] configure.ac: fix bashism in configure.ac
@ 2022-03-21 23:03 Sam James
  2022-03-22 12:46 ` Adhemerval Zanella
  2022-03-22 17:33 ` [PATCH v3] configure.ac: fix bashisms " Sam James
  0 siblings, 2 replies; 6+ messages in thread
From: Sam James @ 2022-03-21 23:03 UTC (permalink / raw)
  To: 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 <sam@gentoo.org>
---
 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])
-- 
2.35.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-23  1:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 23:03 [PATCH] configure.ac: fix bashism in configure.ac Sam James
2022-03-22 12:46 ` Adhemerval Zanella
2022-03-22 17:15   ` Sam James
2022-03-22 17:33 ` [PATCH v3] configure.ac: fix bashisms " Sam James
2022-03-22 17:45   ` Adhemerval Zanella
2022-03-23  1:53   ` Mike Frysinger

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).