From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 2A3303858C39 for ; Sat, 22 Jan 2022 06:05:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2A3303858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 163D9343084; Sat, 22 Jan 2022 06:04:59 +0000 (UTC) From: Mike Frysinger To: newlib@sourceware.org Subject: [PATCH] newlib: merge iconvdata into top-level Makefile Date: Sat, 22 Jan 2022 01:04:58 -0500 Message-Id: <20220122060458.7539-1-vapier@gentoo.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2022 06:05:05 -0000 Avoid a recursive make with this tiny subdir to speed things up a bit. --- NB: I can't easily test this because it's only built for i686-pc-linux, and I only have GNU C library toolchains using that tuple. My half attempts at building it *look* like it uses the right flags. newlib/Makefile.am | 7 +- newlib/Makefile.in | 186 +- newlib/configure | 22 +- newlib/configure.ac | 6 +- newlib/iconvdata/Makefile.am | 23 - newlib/iconvdata/Makefile.in | 643 -- newlib/iconvdata/aclocal.m4 | 1178 --- newlib/iconvdata/configure | 14169 -------------------------------- newlib/iconvdata/configure.ac | 22 - newlib/iconvdata/local.mk | 20 + 10 files changed, 201 insertions(+), 16075 deletions(-) delete mode 100644 newlib/iconvdata/Makefile.am delete mode 100644 newlib/iconvdata/Makefile.in delete mode 100644 newlib/iconvdata/aclocal.m4 delete mode 100755 newlib/iconvdata/configure delete mode 100644 newlib/iconvdata/configure.ac create mode 100644 newlib/iconvdata/local.mk diff --git a/newlib/Makefile.am b/newlib/Makefile.am index 6a28215d3620..ee986289a60a 100644 --- a/newlib/Makefile.am +++ b/newlib/Makefile.am @@ -6,6 +6,7 @@ ACLOCAL_AMFLAGS = -I . -I .. -I ../config # Variables that will accumulate in subdirs. PHONY = noinst_DATA = +pkglib_LTLIBRARIES = # Multilib support variables. MULTISRCTOP = @@ -67,8 +68,7 @@ AM_MAKEFLAGS = \ FLAGS_TO_PASS=$(AM_MAKEFLAGS) -SUBDIRS = libc libm \ - . $(EXTRA_DIRS) +SUBDIRS = libc libm . tooldir = $(exec_prefix)/$(host_alias) toollibdir = $(tooldir)/lib$(MULTISUBDIR) @@ -539,5 +539,8 @@ clean-local: if HAVE_DOC include doc/local.mk endif +if HAVE_ICONVDATA +include iconvdata/local.mk +endif .PHONY: $(PHONY) diff --git a/newlib/configure.ac b/newlib/configure.ac index 93dde7feb5f7..13f318922605 100644 --- a/newlib/configure.ac +++ b/newlib/configure.ac @@ -348,14 +348,14 @@ AM_CONDITIONAL(HAVE_DOC, test x$have_multisubdir = xno) # subdirectory withing the build directory. AM_CONDITIONAL(HAVE_MULTISUBDIR, test x$have_multisubdir = xyes) -EXTRA_DIRS= +HAVE_ICONVDATA=false case $host in i[[34567]]86-pc-linux-*) AC_CONFIG_SUBDIRS(iconvdata) - EXTRA_DIRS=iconvdata + HAVE_ICONVDATA=true ;; esac -AC_SUBST(EXTRA_DIRS) +AM_CONDITIONAL([HAVE_ICONVDATA], $HAVE_ICONVDATA) CRT0= CRT0_DIR= diff --git a/newlib/iconvdata/local.mk b/newlib/iconvdata/local.mk new file mode 100644 index 000000000000..31ccbdf278c5 --- /dev/null +++ b/newlib/iconvdata/local.mk @@ -0,0 +1,20 @@ +pkglib_LTLIBRARIES += %D%/EUC-JP.la + +%C%_EUC_JP_la_SOURCES = %D%/dummy.c +if !ELIX_LEVEL_1 +%C%_EUC_JP_la_SOURCES += \ + %D%/euc-jp.c \ + %D%/jis0201.c \ + %D%/jis0208.c \ + %D%/jis0212.c +endif +%C%_EUC_JP_la_DEPENDENCIES = $(%C%_EUC_JP_la_LIBADD) +%C%_EUC_JP_la_CPPFLAGS = \ + -DNDEBUG \ + -I$(srcdir)/iconvdata \ + -I$(srcdir)/libc/sys/linux \ + $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) +%C%_EUC_JP_la_LDFLAGS = -module -no-undefined -Xcompiler -Wl,-rpath-link=. -Xcompiler -nostdlib -L. -lc + +gconvdir = $(pkglibdir) +gconv_DATA = %D%/gconv-modules -- 2.34.1