From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 2BAA53858D33 for ; Fri, 17 Nov 2023 08:33:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BAA53858D33 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 2BAA53858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700210030; cv=none; b=Pybl0Jz5r/32rPXUvVVs701tVIr+//HnF8MmVhe27Im4hn/Vw13S14UwzhfuqVdnitqepwpsl89x/cVrBNLI3bEXjTCR1rgwmpMp7oqBaLxokzHWksVtf+0akEwlzaE1dAs6q4MFZaW9Q47/POkXo+bDxmuP1cuUSHjHTBW0bHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700210030; c=relaxed/simple; bh=+J5fU6/3ylyqNF17o+IgiAdeWHz9aE1tT2kL9Wgrel4=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=pKYufxupFESbOyyR44OuLUhgoFWVBhqcZ2BN9JpzkMvn6/bO9AYy2Gyja2z8k3UN6gVqpvQ51rzy6IIIrzQOngiOScbRcOchCcYwgrnabElVprvj7o+C2zGUS6v2LJryoFjWTA83H03+8EUHZtZqYSMixUMfjfXea42hHLJHDsE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-5098e423ba2so2441128e87.2 for ; Fri, 17 Nov 2023 00:33:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700210026; x=1700814826; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=aDTl9JqbJZwUp3WmbbGpkkFyrEmlDpwgrSoUcKUxNiY=; b=ijL5Qpd2CAGqDfU0n30tvHAoduUKOpWgpyvJlcJYPwkD4E8hzbWyx+Eydi9wBqJx9i 1582RkUxZcvm185OGE5A+DDEzVVT/YaVEG/f7RioY8rI/usjHgQfmViiBDuD9SVE8egq nwSt+AjYRIxuhcejinq6jdPu4WQCT7HJGHgZP+mtf6HDIQhenrm8P3qY6YyoI5N4S6Wb xBfnjk/PVRRqdaMPr1RtWOwEFdgdj+DijSXG6Zf+Tz60GbIqVD1Mq/Ng10gTBFhQEftB BMeZEURnyRQzgkZJnCw2v/zSXTf6JX0ZRcofY+RwG8gfiCczPnsTGeV4D81tVoqd4P5D T7IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700210026; x=1700814826; h=content-transfer-encoding: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=aDTl9JqbJZwUp3WmbbGpkkFyrEmlDpwgrSoUcKUxNiY=; b=uZGtQFfRMC+EUukzJSJulEjNJRvs5KZWI7jCahpB5cqGLzlZzZxVZDHiT8nsu82XA8 lf9Q0+HdM8xPVD0yFm6osB604N3N6s0L+nrnTjGJT8dPCHtTTkcwq0Amz/PShk5sqAVq 2bbB0ysNEJ0P3YR8oPvI1pJZQIFB0giH1uEajBYbwZwzux1p0QQN+AUE1XAM0L5Ekm1I TyvJJMv0LsQqwMpO9ki/6wrWQCYsBc/BALT8HECIWqhtQydR7Ywobe20PWvqZxnC0dVP C4RKqyis0vvKpkELDHTSEDnAn9Kaa4a5yZFI+rVAtAqL2LnGnCWg8e7IMlU1hvtd8w1Q Slyg== X-Gm-Message-State: AOJu0Yw1XioXI/V7S24960quyrkOJNB7OCJU2cVCkp7oDBRO8Lsw7hoi rtDZsjgkdxcj4JffwUmNfsNU/34yU2pkl9y4LgpNZltu X-Google-Smtp-Source: AGHT+IHR9RJGIo/jBZBwPeJKqGdcKFGTs+CezGKEU9J9FcQd+TJE3J9H7lLmu/F843F2GO7Bk1dPN5u4SVbJyGDbYZ8= X-Received: by 2002:a05:6512:ac3:b0:507:a1df:1408 with SMTP id n3-20020a0565120ac300b00507a1df1408mr4380429lfu.55.1700210025634; Fri, 17 Nov 2023 00:33:45 -0800 (PST) MIME-Version: 1.0 References: <5442951.0nkzZMK5EY@nimes> <5078775.gJyxqlhIka@nimes> <86o7ft70mn.fsf@aarsen.me> In-Reply-To: <86o7ft70mn.fsf@aarsen.me> From: Richard Biener Date: Fri, 17 Nov 2023 09:33:33 +0100 Message-ID: Subject: Re: building GNU gettext on AIX To: =?UTF-8?Q?Arsen_Arsenovi=C4=87?= Cc: Bruno Haible , David Edelsohn , GCC Patches , bug-gettext@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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: 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 buil= t > >> 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 tha= t it > >> would require further changes for a future release? > > > > It requires a change, effectively to do as if HAVE_PTHREAD_API is undef= ined > > 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 LIBI= NTL > > 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 earli= er > > mail. > > > > * GCC can pass --enable-threads=3Disoc, to avoid the libpthread depen= dency > > 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. 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) $(LIBBACKTRA= CE) \ > $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) > > (from gcc/Makefile.in) > > > > AIX 7.1 as well but the programs will then be linked against libpth= read. > > 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