From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id D72563858D33 for ; Thu, 16 Nov 2023 23:39:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D72563858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D72563858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700177951; cv=none; b=vLhFLea5aUkzEzg8+G2wSh+nR/xKEscN55MYGLpOPodgWkZpBS8dYiDBAviR3tAQOkl/GR1ZQEweCn8GD+BhT/A4qrAh+0oV69AW9+AT5gk60bLcpakpdqU213Z728rVIKdT8SgcJCToGaBYZ5uCJBUbczB1/515jhU3uHauWpw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700177951; c=relaxed/simple; bh=9xElZmZLnZqfE9pNTmQvDRiNLcSaXXIIDPiF4vbTqhU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=beY13eKdPQT/FLjqTgGvQzfZ8XOqcOCyAyNOnIok1OAjQ6hlGlfcOSoA/NLQfOKuvpwGnrxuTIqPGX/3ZNMjZxyFgyKawhYKbznr8gfxy5vAo0BW6XCz+5m/Gj+Xas90cjmQmUxa3UQo4JvvCnEhB7amjzhJTUegtk1JEJ/x3FY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c59a4dd14cso17571601fa.2 for ; Thu, 16 Nov 2023 15:39:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700177948; x=1700782748; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X8Ibadp0lqbf+3zbg2VsYmygI/7vtjvvjRU3RROiUa4=; b=d5VTuF37HugD2tDimUFhQKI+ok++slV4BelYKzjCcOkFGxRFNbiWtQmVSw9F6kl+V7 Dn0fU8/x9v6o4KK9s3Emh8/Th1LYm++y5drAS6qLrnqcyF89Y1RFR7XvDEOvbPV2+Z+L QDjh0q2lXKC2oDpumkdwHHMhGHshWVotITzmufcf5t4gBZ6Fd5TJ4Acl/x23i20rXRzx JZAc1nYop+remBBxIYlqhC2BI3UnZnx7Kq1tjz6Sopx/rGuV6lkpA9H0AoFbqsejbt/W 6QZ9BmlsspjtazsYIvxsoljxaKTvvfyb0CqM7UOsyEHxzQqfXgIyYIKtfCW8GNPp5MQE ubpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700177948; x=1700782748; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X8Ibadp0lqbf+3zbg2VsYmygI/7vtjvvjRU3RROiUa4=; b=WPTmvXxUu+5AZK+9LDtj2awv6P2+NZBr9bjJNeRce1iQO29xpxIfEHUaPmb3fYhNuY 1jIx0rQGT16V3iAQregBRIfCMgk3lnAVciQICBBlGqTiuAUEjOGdo7blL7SdwMpt8Y5f ttBR8xqwkiNJ46mXRTqtnTD0Ydl5qIobs77T7L+BKRYCo5CnBHBYMlmrmOWYF8DOcrJC hYbh4JFF/UxFTuQCfqFLUchpCK3ossjctdIdG8D7SZQafL7Oi2j1SLthYpS34O44dpSE 7jjCGZpsSo7D7EAmmC8JA/lG/9NKuT/DLzD8QsMgZ5qHZaWO6kWvEOucbrghGrLZTkoy j1UA== X-Gm-Message-State: AOJu0Yz7AWdc3s1c+hZ/0IxGtyMIOCqsJDeX0S9iwXuUd0g8WW8fI20E s30dPh+08/XIzxTRuLHTM9NOX+mjB7PWQnClh54= X-Google-Smtp-Source: AGHT+IHYazZsecsPnKiwqCgjslFvBaoguwAf1f7s8sCncdkh7Ip7Ht9BL87phrKkdH3xmuxm7j1RatYAyTw4hKkrhqA= X-Received: by 2002:a2e:b4a5:0:b0:2c5:5926:de15 with SMTP id q5-20020a2eb4a5000000b002c55926de15mr7546709ljm.4.1700177947525; Thu, 16 Nov 2023 15:39:07 -0800 (PST) MIME-Version: 1.0 References: <5442951.0nkzZMK5EY@nimes> <5078775.gJyxqlhIka@nimes> In-Reply-To: <5078775.gJyxqlhIka@nimes> From: David Edelsohn Date: Thu, 16 Nov 2023 18:38:55 -0500 Message-ID: Subject: Re: building GNU gettext on AIX To: Bruno Haible Cc: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= , GCC Patches , bug-gettext@gnu.org Content-Type: multipart/alternative; boundary="0000000000009e0894060a4d86ea" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000009e0894060a4d86ea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 16, 2023 at 5:47=E2=80=AFPM Bruno Haible wrot= e: > Hi David, > > > the default, distributed libintl library will not allow GCC to be built > > with NLS enabled. > > The problem is this configure test from gettext.m4 > > checking for GNU gettext in libintl... no > > It should say > > checking for GNU gettext in libintl... yes > > I reproduce it with simple hello-world package, outside GCC. > > It tests whether a program that uses gettext() can be linked with > -lintl -liconv > But now, on AIX, it needs to test whether such a program can be linked wi= th > -lintl -liconv -lpthread > > > Were you suggesting that --enable-threads=3Disoc would work now or that= it > > would require further changes for a future release? > > It requires a change, effectively to do as if HAVE_PTHREAD_API is undefin= ed > if --enable-threads=3Disoc was provided. > > I can prepare a new gettext release that has both issues fixed: > - gettext.m4 that fixes the configure test and sets the variable LIBINTL > to "-Lsome/libdir -lintl -liconv -lpthread", > - mbrtowc.o and setlocale*.o that use mtx_* locks instead of pthread_* > mutexes when requested. > > But you then need to make up your mind w.r.t. what I wrote in the earlier > mail. > > * GCC can pass --enable-threads=3Disoc, to avoid the libpthread depende= ncy > on AIX =E2=89=A5 7.2. > I have reached out to the AIX Open Source Tools team for their perspective. Normally GCC and other FOSS packages have not based their support for OS versions on official vendor support lifecycles, within reason. In fact, many users have appreciated longer duration support. > > * Or GCC can (continue to?) use the variable LIBINTL. This will work on > AIX 7.1 as well but the programs will then be linked against > libpthread. > One additional library. > $ ldd gcc > /opt/freeware/bin/gcc needs: > /usr/lib/libc.a(shr.o) > /opt/freeware/lib/libiconv.a(libiconv.so.2) > /usr/lib/libc.a(_shr.o) > /unix > /usr/lib/libcrypt.a(shr.o) > /opt/freeware/lib/libgcc_s.a(shr.o) > libpthread.a will be added to this list. > My builds of GCC only rely on AIX libc. All other libraries are statically linked. > > ibm-clang links against libpthread.a as well: > $ ldd /opt/IBM/openxlC/17.1.1/bin/.ibm-clang.orig > /opt/IBM/openxlC/17.1.1/bin/.ibm-clang.orig needs: > /usr/lib/libpthreads.a(shr_xpg5_64.o) > /usr/opt/zlibNX/lib/libz.a(libz.so.1) > /usr/lib/libcurses.a(shr42_64.o) > /usr/lib/libiconv.a(shr4_64.o) > /usr/lib/libc++.a(shr_64.o) > /usr/lib/libc++abi.a(libc++abi.so.1) > /usr/lib/libc.a(shr_64.o) > /usr/lib/libpthreads.a(_shr_xpg5_64.o) > /usr/lib/libc++.a(libc++.so.1) > /usr/lib/libunwind.a(libunwind.so.1) > /usr/lib/libc.a(_shr_64.o) > /unix > /usr/lib/libcrypt.a(shr_64.o) > I have asked the IBM Clang team why ibm-clang depends on libpthreads. One option is to add -lpthreads to the link line, even if the tools are not built thread-safe. Only the intl support would invoke the extraneous overhead. The downside is that other pthreads dependencies could sneak in. Thanks, David > > Bruno > > > > --0000000000009e0894060a4d86ea--