From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id CA74C3858D20 for ; Thu, 16 Nov 2023 23:13:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA74C3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CA74C3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.151 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700176407; cv=none; b=je6gT0e+mx2/o4bfdNnERo/qb+qqHq0EBMij1VkoElmLYuHvYS0e03zMobC0IVONl8WzQVxY4SBLUESluraH+PBA7Ccm1ZQgjRUglVtD9ESkJit4hpH9Hlnsv3mF6zz+3wMDTU0i+qqFVlXxUEw6VPTgJR556KiVKlHKSa5qU/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700176407; c=relaxed/simple; bh=aYh6CB7kKgim+3eJUwdhcLhKsCjDGyuqiIooByTZfAo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RZbFgLYe3sL7RjBiDw3mwG9CEUVSyw5R9G8HlgmDcV183WP895IdoNbmJ4DWwqF6842hvUcb0YooN5wBCvNBRQrLNAcJfTpITT+HbyJT4pqRrWKDt3JyFyubZ1cR0j48IBcwGiuqk784lltPR8PpLhoL1r8Jag94+GvA5pSypgE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4SWbS23gRQz9sqn; Fri, 17 Nov 2023 00:13:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1700176402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+X9bvyOm0aMpGO5pvtkDCBjKXNk4/oCceOeOKJJL1Ak=; b=JlGcTmMQ+bWU2rnlZrA6/+aLQYeyODOkyFfcwFjx3VB6DIbDVDOae4E61PT/kvFqzJ4zB/ 2KkHotDH3FK1ZNHIXwcBUYkseLO+ReAVVWRAnslq048YCIl6z1FMuEgOQVbg4IZiEveAD6 GELWEMNR1vR4pkOo1i+zMrnLBueEpKruLlTNOQYlWx1ZUYlb7vgii9FVurfryi6l4/Pjib ImxFyN2WFfdI8dTdLP8arzdHCTdewxR/RZAYaEKZvoMeCgFs7kQSSgLe7CQQiWMY+eXK5s +Fb0FbDGyY0KDBdxYszmKh42gLKWKmPbvRCykBNiER/1fomTQbQnVMrU+CnuJQ== References: <5442951.0nkzZMK5EY@nimes> <5078775.gJyxqlhIka@nimes> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Bruno Haible Cc: David Edelsohn , GCC Patches , bug-gettext@gnu.org Subject: Re: building GNU gettext on AIX Date: Fri, 17 Nov 2023 00:10:11 +0100 In-reply-to: <5078775.gJyxqlhIka@nimes> Message-ID: <86o7ft70mn.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 4SWbS23gRQz9sqn X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,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: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Bruno Haible writes: > 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. Hmm, would that option work everywhere, though? Or would we have to wire up configury to detect which flag to use? If so, what would it look like. > * Or GCC can (continue to?) use the variable LIBINTL. This will work on If you mean the one generated by gettext.m4/uninstalled-config.sh, it is utilized today: LIBS =3D @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE= ) \ $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) (from gcc/Makefile.in) > AIX 7.1 as well but the programs will then be linked against libpthre= ad. > 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. > > 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) David, I'll leave that decision up to you. > Bruno =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZVaiEF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosSTW7IA/jvzSBEmq5IRfY5WTx/l+VkP17lcZWxF+s91 QSVcOulGAQDk4TYteqf5hxkqbkKhkiEd7zZ4T4+qKwP+W2OnofGaCQ== =+wAG -----END PGP SIGNATURE----- --=-=-=--