public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] newlib: merge iconvdata into top-level Makefile
@ 2022-01-22  6:04 Mike Frysinger
  2022-01-24 16:45 ` Corinna Vinschen
  2022-01-27  2:50 ` [PATCH v2] " Mike Frysinger
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Frysinger @ 2022-01-22  6:04 UTC (permalink / raw)
  To: newlib

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-27 14:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22  6:04 [PATCH] newlib: merge iconvdata into top-level Makefile Mike Frysinger
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

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).