From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) by sourceware.org (Postfix) with ESMTPS id 178A1385B52A for ; Fri, 17 Nov 2023 08:50:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 178A1385B52A 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 178A1385B52A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:67c:2050:0:465::202 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700211033; cv=none; b=qLqahYOj/4FG9JVhom35uYFnCBFWGVkE+uPtbRsVu7WXoahh4jvzhxTvcrje09XImD641xG6TZDOGaJSXm1HeSPF5qwBmAyp9mraLxPQqt1cs2LtbJUEDK2N3D0fiYkLO/8U2ZSkgpcNsPZ3J7TeAoRRUUSlwaP6d7MJwvhlh4w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700211033; c=relaxed/simple; bh=moQuzO9ADvV/w7z/k5wbjeu8TZ6hfxQOajNGD+wuQIg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=h5CxWpjxIuZ3MYZK046otTtVU2jibWu0HtoRCpEebGqfbS0J99YdUFGNHlUBO777IA6Nicy3pNsd26xNhicsdlNbs5QJr/Nsc2M+FlvTAK3aaSY6bxRo+AvoYNGTTJXRjhGqUdTAxIx3kySs0cI8WUwxtV0O/yxMiE1pZljWQRo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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-202.mailbox.org (Postfix) with ESMTPS id 4SWrFw1hMjz9t2T; Fri, 17 Nov 2023 09:50:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1700211028; 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=W6a95nC0SuIWFWYV9jwWx83Kf2aKE+ASRTqKq4k1+3M=; b=1uAhluVWX2f8MljBbeGX0pDEy/1b/4lZUN+fCFTie+Kv8yYLDl1ChB8UL+1WHILNJjNe59 dTG9YXqr6HG0cW0uNBe4qSZl+IN9uolu3IVLrMulFkyUmq083KSlGLDyBxcYCucFfsWak9 dbxIsRZIDHt/+W3gwS5vBVL8a6VrymTPa2kLnEnDvrXWvdkF8mWg3fhxMwqMiPd+KgHAVM QidtvWmmkfTaSNiNEKIz6yFGvEROCNmqj0DoZSJIX9sn9Kh8CTMkvAN7G3Dt4h74G3TSoy 5yr+Vpb7uS9hh8dllGj8euga+fEO/BGW3caq8Qtdbh0m0sL4RKjt2Iup4z6/+g== References: <5442951.0nkzZMK5EY@nimes> <5078775.gJyxqlhIka@nimes> <86o7ft70mn.fsf@aarsen.me> From: Arsen =?utf-8?Q?Arsenovi=C4=87?= To: Richard Biener Cc: Bruno Haible , David Edelsohn , GCC Patches , bug-gettext@gnu.org Subject: Re: building GNU gettext on AIX Date: Fri, 17 Nov 2023 09:49:40 +0100 In-reply-to: Message-ID: <86bkbs69wt.fsf@aarsen.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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 Richard Biener writes: > On Fri, Nov 17, 2023 at 12:13=E2=80=AFAM Arsen Arsenovi=C4=87 wrote: >> >> >> Bruno Haible writes: >> >> > Hi David, >> > >> >> the default, distributed libintl library will not allow GCC to be bui= lt >> >> 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= with >> > -lintl -liconv -lpthread >> > >> >> Were you suggesting that --enable-threads=3Disoc would work now or th= at it >> >> would require further changes for a future release? >> > >> > It requires a change, effectively to do as if HAVE_PTHREAD_API is unde= fined >> > 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 LIB= INTL >> > 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 earl= ier >> > mail. >> > >> > * GCC can pass --enable-threads=3Disoc, to avoid the libpthread depe= ndency >> > 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. > > I'd highly recommend the in-tree gettext to be built with thread > support _disabled_, > only a static library built and never installed (but linked statically > into the host > binaries). > > So if --disable-threads (or how it is called) does not work you need > to fix _that_. > Likewise if --disable-shared doesn't work correctly on all platforms > you have to fix > that as well. That seems like the best choice to me too (and I'm testing a patch that does that currently). > Richard. > >> >> > * 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) $(LIBBACKTR= ACE) \ >> $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) >> >> (from gcc/Makefile.in) >> >> >> > AIX 7.1 as well but the programs will then be linked against libpt= hread. >> > 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 >> >> >> -- >> Arsen Arsenovi=C4=87 =2D-=20 Arsen Arsenovi=C4=87 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iOYEARYKAI4WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZVcpUl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxAcYXJzZW5AYWFy c2VuLm1lAAoJEFLClDAeosST4gIA/jN5Q0lKDLnxUh4SBxhB8ngOx9N4hvJFzKfP HqTXlhjSAP9K6pRRLlRjYJQ56sD7PZugLBiN2YfiTXaLt6QNAV9WBw== =yJeG -----END PGP SIGNATURE----- --=-=-=--