From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] newlib: merge iconvdata into top-level Makefile
Date: Sat, 22 Jan 2022 01:04:58 -0500 [thread overview]
Message-ID: <20220122060458.7539-1-vapier@gentoo.org> (raw)
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
next reply other threads:[~2022-01-22 6:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 6:04 Mike Frysinger [this message]
2022-01-24 16:45 ` Corinna Vinschen
2022-01-25 0:57 ` Mike Frysinger
2022-01-25 12:27 ` Corinna Vinschen
2022-01-25 21:19 ` Mike Frysinger
2022-01-26 12:32 ` Corinna Vinschen
2022-01-27 2:49 ` Mike Frysinger
2022-01-27 2:50 ` [PATCH v2] " Mike Frysinger
2022-01-27 14:50 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220122060458.7539-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).