Message ID | 20230925153247.908901-1-arsen@aarsen.me |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C270385B532 for <patchwork@sourceware.org>; Mon, 25 Sep 2023 15:33:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8C270385B532 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695656010; bh=q0rF3nqpWzM4zAidPRvn5iTLBhlsxoQzqFzk6/ObOno=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=UJAqxmarTaeYoea/iZfVm1xLmI2uh/Wv5R6M9pYfYDDtgGKAp4lruXb1i4TfPImpN wglLptsKvF7Co9o3dH8U1SMy/S07OA8XrOrM/eAmYs/FK8zkAU6yVlLFV+0y99lezr y3Nxin5UZac/2K9g6WU/MYYpWgbU4hf+NfH8kDwg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by sourceware.org (Postfix) with ESMTPS id 924A63858CDA; Mon, 25 Sep 2023 15:33:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 924A63858CDA Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4RvRhq0mRYz9sT8; Mon, 25 Sep 2023 17:32:59 +0200 (CEST) To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH 0/2] Replace intl/ with out-of-tree GNU gettext Date: Mon, 25 Sep 2023 17:13:39 +0200 Message-ID: <20230925153247.908901-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_INFOUSMEBIZ, KAM_SHORT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Gdb-patches?= <gdb-patches@sourceware.org> Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= <arsen@aarsen.me> Cc: Iain Sandoe <iain@sandoe.co.uk>, Bruno Haible <bruno@clisp.org> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Replace intl/ with out-of-tree GNU gettext
|
|
Message
Arsen Arsenović
Sept. 25, 2023, 3:13 p.m. UTC
Afternoon, This patch series replaces the old (early 2000s era, AFAICT) libintl implementation in-tree, which relies on C constructs some compilers (newer clang, hopefully GCC 14) refuse to compile by default with out-of-tree gettext, in a manner similar to GMP et al. During that work I also noticed that the .pot files fail to regenerate with new xgettext, leading to the discovery of a regression, but also a slight simplification that can be made in the .pot file generation: https://savannah.gnu.org/bugs/?64490#comment4 Brunos recommendation is included. Thanks! I've omitted a patch that simply drops the intl/ directory from this patchset, as it was held for moderation on the GCC ML, and I suspect the same would happen here. It can be seen at: https://git.sr.ht/~arsen/binutils-gdb/commit/300747ed91e6652e4e20b876c19b3c86c75ac57f Note that this patch series results in some new symbols in libinproctrace.so: ~/binutils-bld/gdbserver$ nm -g libinproctrace.so | grep libintl 0000000000015090 T libintl_dcgettext 0000000000015080 T libintl_gettext 0000000000019a90 T libintl_set_relocation_prefix This happens because the library gets linked against libintl.a (because it is required by ax.cc, gdbserver/ax.cc:925:(.text+0x2f8): undefined reference to `libintl_gettext'), and so, the default visibility symbols from libintl.a 'leak' through. I am decently sure this was also the case with the in-tree intl implementation, though. Perhaps it'd be good to add a version script to this library, to be more selective about symbols. Tested on x86_64-pc-linux-gnu --with-included-gettext, x86_64-portbld-freebsd13.1, x86_64-darwin21, i686-darwin9 and aarch64-darwin21 (thanks, Iain). Example from FreeBSD: [arsen@fbsd132 ~/binutils-bld/_pfx/bin]$ LANG=sr_RS.UTF-8 ./ld --version ГНУ лд (GNU Binutils) 2.41.50.20230924 Copyright (C) 2023 Free Software Foundation, Inc. Овај програм је слободан софтвер; можете да га расподељујете под одредбама Гнуове опште јавне лиценце издања 3 или (према вашем мишљењу) било ког новијег издања. Овај програм нема никакву гаранцију. [arsen@fbsd132 ~/binutils-bld/_pfx/bin]$ LANG=fr_FR.UTF-8 ./as --version Assembleur GNU (GNU Binutils) 2.41.50.20230924 Copyright © 2023 Free Software Foundation, Inc. Ce logiciel est libre; vous pouvez le redistribuer selon les termes de la version 3 de la licence GNU General Public License ou suivante. Ce programme n'est couvert par AUCUNE garantie. Cet assembleur a été configuré pour la cible « x86_64-unknown-freebsd13.2 ». [arsen@fbsd132 ~/binutils-bld/_pfx/bin]$ LANG=fr_FR.UTF-8 ./gprof --version GNU gprof (GNU Binutils) 2.41.50.20230924 Basé sur BSD gprof, copyright 1983 Regents de l'Université de Californie. Ce logiciel est libre. AUCUNE garantie ne lui est apportée. A similar patch was also sent to the GCC developers for evaluation. We should coordinate to merge them around the same time, so that the same code is merged. Thanks in advance, have a lovely day. Arsen Arsenović (2): *: add modern gettext support *: suppress xgettext 0.22 charset name error .gitignore | 1 + Makefile.def | 72 +- Makefile.in | 1612 +++++++++++----------- bfd/aclocal.m4 | 10 +- bfd/configure | 1980 ++++++++++++++++++++++++++- bfd/configure.ac | 2 +- bfd/po/Make-in | 8 +- binutils/aclocal.m4 | 2 + binutils/configure | 2546 ++++++++++++++++++++++++++--------- binutils/po/Make-in | 5 +- config/gettext-sister.m4 | 35 +- config/gettext.m4 | 357 +++-- config/iconv.m4 | 313 +++-- config/intlmacosx.m4 | 65 + configure | 44 +- configure.ac | 44 +- gas/aclocal.m4 | 6 + gas/configure | 1980 ++++++++++++++++++++++++++- gas/po/Make-in | 5 +- gdb/acinclude.m4 | 3 +- gdb/aclocal.m4 | 5 + gdb/configure | 2739 ++++++++++++++++++++++++++++---------- gdb/configure.ac | 3 +- gdbserver/Makefile.in | 3 +- gdbserver/aclocal.m4 | 6 + gdbserver/configure | 1817 ++++++++++++++++++++++++- gdbsupport/Makefile.am | 1 + gdbsupport/aclocal.m4 | 6 + gdbsupport/configure | 2109 ++++++++++++++++++++++++++--- gold/aclocal.m4 | 8 +- gold/configure | 1977 ++++++++++++++++++++++++++- gold/po/Make-in | 5 +- gprof/aclocal.m4 | 6 + gprof/configure | 1980 ++++++++++++++++++++++++++- gprof/po/Make-in | 5 +- ld/aclocal.m4 | 6 + ld/configure | 1980 ++++++++++++++++++++++++++- ld/po/Make-in | 8 +- libctf/Makefile.am | 2 + libctf/aclocal.m4 | 9 + libctf/configure | 1952 ++++++++++++++++++++++++++- libctf/configure.ac | 2 +- opcodes/aclocal.m4 | 6 + opcodes/configure | 1980 ++++++++++++++++++++++++++- opcodes/configure.ac | 2 +- opcodes/po/Make-in | 5 +- 46 files changed, 22750 insertions(+), 2962 deletions(-) create mode 100644 config/intlmacosx.m4
Comments
On Mon, 25 Sep 2023 17:13:39 +0200 Arsen Arsenović via Gdb-patches <gdb-patches@sourceware.org> wrote: > Arsen Arsenović (2): > *: add modern gettext support > *: suppress xgettext 0.22 charset name error I haven't seen part 1, "add modern gettext support", in either email that I receive from the list(s) or in the public archives. Kevin
Kevin Buettner <kevinb@redhat.com> writes: > On Mon, 25 Sep 2023 17:13:39 +0200 > Arsen Arsenović via Gdb-patches <gdb-patches@sourceware.org> wrote: > >> Arsen Arsenović (2): >> *: add modern gettext support >> *: suppress xgettext 0.22 charset name error > > I haven't seen part 1, "add modern gettext support", in either email that > I receive from the list(s) or in the public archives. Yes, it was held for moderation due to size. It should be visible here: https://inbox.sourceware.org/gdb-patches/20230925153247.908901-2-arsen@aarsen.me/ I'll send a v2 when the conversation under [PATCH 2/2] settles, and trim that patch a bit (remove regenerated files) so that it fits under the size limit. Apologies for the inconvenience. Have a lovely night!