From 6812e6baa7882ed064d274ead8dcd84b556603ce Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 31 Dec 2021 00:45:03 -0800 Subject: [PATCH 1/5] build: port to AIX 7.1 This fixes a porting bug introduced in 2019-08-12T03:29:00Z!bruno@clisp.org. Problem discovered on AIX 7.1. * src/local.mk (LDADD): Add $(LIB_MBRTOWC), since pretty much every command uses quotearg or mbrtowc or whatever. (src_sort_LDADD): Add $(LIBPMULTITHREAD) and $(LIB_PTHREAD_SIGMASK) instead of $(LIBTHREAD). --- NEWS | 3 +++ src/local.mk | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 72453dc4b..b9d36c724 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,9 @@ GNU coreutils NEWS -*- outline -*- for B when A is a directory, possibly inflooping. [bug introduced in coreutils-6.3] + AIX builds no longer fail because some library functions are not found. + [bug introduced in coreutils-8.32] + ** Changes in behavior timeout --foreground --kill-after=... will now exit with status 137 diff --git a/src/local.mk b/src/local.mk index 0c8b65d39..d668bfc30 100644 --- a/src/local.mk +++ b/src/local.mk @@ -90,7 +90,9 @@ remove_ldadd = # must precede $(LIBINTL) in order to ensure we use GNU getopt. # But libcoreutils.a must also follow $(LIBINTL), since libintl uses # replacement functions defined in libcoreutils.a. -LDADD = src/libver.a lib/libcoreutils.a $(LIBINTL) lib/libcoreutils.a +# Similarly for $(LIB_MBRTOWC). +LDADD = src/libver.a lib/libcoreutils.a $(LIBINTL) $(LIB_MBRTOWC) \ + lib/libcoreutils.a # First, list all programs, to make listing per-program libraries easier. # See [ below. @@ -317,8 +319,11 @@ src_uname_LDADD += $(GETHOSTNAME_LIB) # for strsignal src_kill_LDADD += $(LIBTHREAD) -# for pthread -src_sort_LDADD += $(LIB_PTHREAD) +# for pthread-cond, pthread-mutex, pthread-thread +src_sort_LDADD += $(LIBPMULTITHREAD) + +# for pthread_sigmask +src_sort_LDADD += $(LIB_PTHREAD_SIGMASK) # Get the release year from lib/version-etc.c. RELEASE_YEAR = \ -- 2.32.0