From patchwork Mon Jun 7 08:52:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1488487 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=iJGfmiQU; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 ozlabs.org (Postfix) with ESMTPS id 4Fz6fV3rgRz9sRN for ; Mon, 7 Jun 2021 18:56:02 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4B2063838016 for ; Mon, 7 Jun 2021 08:56:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B2063838016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623056160; bh=cqvozYiZSgcljVT7HM92SztSSObxvKHoq2U0w3OeZqQ=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=iJGfmiQUsbIUiezWmy/jbJEASE7vOkr4a9V31Zc0tK/Z8QRqZSHpCgIzy5DuKy5Jn UhmeYLhTZRsoR578qgjt8OiTAXq85JpeM+UYTXy0a4zwxifEY0yYeHy3R6vuCaclcV 96Bq++EXLAcU95K2etUN5o6wHcJvdZOdThZnoIgU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dog.elm.relay.mailchannels.net (dog.elm.relay.mailchannels.net [23.83.212.48]) by sourceware.org (Postfix) with ESMTPS id BD130383803D for ; Mon, 7 Jun 2021 08:52:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BD130383803D X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 81832923081; Mon, 7 Jun 2021 08:52:47 +0000 (UTC) Received: from pdx1-sub0-mail-a36.g.dreamhost.com (100-96-17-41.trex.outbound.svc.cluster.local [100.96.17.41]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 0F92E922DDF; Mon, 7 Jun 2021 08:52:47 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a36.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.17.41 (trex/6.3.1); Mon, 07 Jun 2021 08:52:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Grain-Unite: 131908f434500876_1623055967307_2701950161 X-MC-Loop-Signature: 1623055967307:4114156061 X-MC-Ingress-Time: 1623055967307 Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id C407C82BC8; Mon, 7 Jun 2021 08:52:46 +0000 (UTC) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTPSA id 4ADFA7F257; Mon, 7 Jun 2021 08:52:44 +0000 (UTC) X-DH-BACKEND: pdx1-sub0-mail-a36 To: libc-alpha@sourceware.org Subject: [PATCH 4/5] iconvdata: Move gconv-modules configuration to gconv-modules.conf Date: Mon, 7 Jun 2021 14:22:20 +0530 Message-Id: <20210607085221.43612-5-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210607085221.43612-1-siddhesh@sourceware.org> References: <20210607085221.43612-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3492.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Move all gconv-modules configuration files to gconv-modules.conf. That is, the S390 extensions now become gconv-modules-s390.conf. Move both configuration files into gconv-modules.d. Now GCONV_PATH/gconv-modules is read only for backward compatibility for third-party gconv modules directories. Reviewed-by: DJ Delorie --- iconvdata/Makefile | 46 +++++++++++-------- .../{gconv-modules => gconv-modules.conf} | 0 localedata/Makefile | 4 +- sysdeps/s390/Makefile | 16 ++++++- ...{gconv-modules => gconv-modules-s390.conf} | 0 5 files changed, 44 insertions(+), 22 deletions(-) rename iconvdata/{gconv-modules => gconv-modules.conf} (100%) rename sysdeps/s390/{gconv-modules => gconv-modules-s390.conf} (100%) diff --git a/iconvdata/Makefile b/iconvdata/Makefile index 6eeb92f4b3..8925a684eb 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -137,10 +137,13 @@ charmaps = ../localedata/charmaps extra-modules-left := $(modules) include extra-module.mk +gconv-modules = gconv-modules.conf +modpfx = $(objpfx)gconv-modules.d/ extra-objs += $(modules.so) install-others = $(addprefix $(inst_gconvdir)/, $(modules.so)) \ - $(inst_gconvdir)/gconv-modules + $(addprefix $(inst_gconvdir)/gconv-modules.d/, \ + $(gconv-modules)) # We can build the conversion tables for numerous charsets automatically. @@ -182,7 +185,7 @@ generated += $(generated-modules:=.h) $(generated-modules:=.stmp) \ iconv-test.out iconv-rules tst-loading.mtrace \ mtrace-tst-loading.out tst-tables.out iconv-test.xxx ifdef objpfx -generated += gconv-modules +generated += $(addprefix gconv-modules.d/,$(gconv-modules)) endif # Rules to generate the headers. @@ -250,7 +253,8 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h)) $(addprefix $(inst_gconvdir)/, $(modules.so)): \ $(inst_gconvdir)/%: $(objpfx)% $(+force) $(do-install-program) -$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force) +$(addprefix $(inst_gconvdir)/gconv-modules.d/, $(gconv-modules)): \ + $(inst_gconvdir)/gconv-modules.d/%: $(modpfx)% $(+force) $(do-install) ifeq (no,$(cross-compiling)) # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary @@ -303,28 +307,29 @@ $(objpfx)mtrace-tst-loading.out: $(objpfx)tst-loading.out $(common-objpfx)malloc/mtrace $(objpfx)tst-loading.mtrace > $@; \ $(evaluate-test) -$(objpfx)bug-iconv1.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv1.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv2.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv2.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv3.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv3.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv5.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv5.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)tst-loading.out: $(objpfx)gconv-modules \ +$(objpfx)tst-loading.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)tst-iconv4.out: $(objpfx)gconv-modules \ +$(objpfx)tst-iconv4.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)tst-iconv7.out: $(objpfx)gconv-modules \ +$(objpfx)tst-iconv7.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv10.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv12.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv12.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)bug-iconv14.out: $(objpfx)gconv-modules \ +$(objpfx)bug-iconv14.out: $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) -$(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ +$(objpfx)iconv-test.out: run-iconv-test.sh \ + $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) \ $(common-objdir)/iconv/iconv_prog TESTS iconv_modules="$(modules)" \ @@ -332,7 +337,8 @@ $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ '$(run-program-env)' > $@; \ $(evaluate-test) -$(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \ +$(objpfx)tst-tables.out: tst-tables.sh \ + $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) \ $(objpfx)tst-table-from $(objpfx)tst-table-to $(SHELL) $< $(common-objpfx) $(common-objpfx)iconvdata/ \ @@ -345,9 +351,13 @@ do-tests-clean common-mostlyclean: tst-tables-clean tst-tables-clean: -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible -$(objpfx)gconv-modules: gconv-modules - cat $(sysdeps-gconv-modules) $^ > $@ +$(modpfx): + mkdir -p $@ + +$(modpfx)%: % $(modpfx) + cp $< $@ # Test requires BIG5HKSCS. -$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: $(objpfx)gconv-modules \ +$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: \ + $(addprefix $(modpfx), $(gconv-modules)) \ $(addprefix $(objpfx),$(modules.so)) diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules.conf similarity index 100% rename from iconvdata/gconv-modules rename to iconvdata/gconv-modules.conf diff --git a/localedata/Makefile b/localedata/Makefile index 14e04cd3c5..364d7c758d 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -183,7 +183,7 @@ install-others := $(addprefix $(inst_i18ndir)/, \ $(locales)) endif -tests: $(objdir)/iconvdata/gconv-modules +tests: $(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf tests-static += tst-langinfo-newlocale-static tst-langinfo-setlocale-static @@ -464,5 +464,5 @@ $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out bug-setlocale1-ENV-only = LOCPATH=$(objpfx) LC_CTYPE=de_DE.UTF-8 bug-setlocale1-static-ENV-only = $(bug-setlocale1-ENV-only) -$(objdir)/iconvdata/gconv-modules: +$(objdir)/iconvdata/gconv-modules.d/gconv-modules.conf: $(MAKE) -C ../iconvdata subdir=iconvdata $@ diff --git a/sysdeps/s390/Makefile b/sysdeps/s390/Makefile index a8c49c928f..ade8663218 100644 --- a/sysdeps/s390/Makefile +++ b/sysdeps/s390/Makefile @@ -21,13 +21,25 @@ lib := iconvdata include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left)) extra-objs += $(addsuffix .so, $(s390x-iconv-modules)) -install-others += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) +install-others += $(patsubst %, $(inst_gconvdir)/%.so, \ + $(s390x-iconv-modules)) \ + $(inst_gconvdir)/gconv-modules.d/gconv-modules-s390.conf $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) : \ $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force) $(do-install-program) -sysdeps-gconv-modules = ../sysdeps/s390/gconv-modules +ifdef objpfx +generated += gconv-modules.d/gconv-modules-s390.conf +endif + +$(inst_gconvdir)/gconv-modules.d/gconv-modules-s390.conf: \ + $(modpfx)gconv-modules-s390.conf $(+force) + $(do-install) + +$(modpfx)gconv-modules-s390.conf: ../sysdeps/s390/gconv-modules-s390.conf \ + $(modpfx) + cp $< $@ endif ifeq ($(subdir),elf) diff --git a/sysdeps/s390/gconv-modules b/sysdeps/s390/gconv-modules-s390.conf similarity index 100% rename from sysdeps/s390/gconv-modules rename to sysdeps/s390/gconv-modules-s390.conf