From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH] libgloss: merge wince configure script up a level
Date: Sat, 12 Feb 2022 05:08:18 -0500 [thread overview]
Message-ID: <20220212100818.21044-1-vapier@gentoo.org> (raw)
Move the minor wince-specific logic to a dedicated file & namespace
them so we can merge its configure logic up a level. The makefile
is a bit tricky, but maybe it still works.
---
libgloss/Makefile.am | 4 +
libgloss/Makefile.in | 152 +-
libgloss/aclocal.m4 | 59 +-
libgloss/configure | 108 +-
libgloss/configure.ac | 3 +-
libgloss/wince/Makefile.am | 13 -
libgloss/wince/Makefile.in | 753 ------
libgloss/wince/Makefile.inc | 8 +
libgloss/wince/acinclude.m4 | 5 +
libgloss/wince/aclocal.m4 | 1109 ---------
libgloss/wince/configure | 4369 -----------------------------------
libgloss/wince/configure.ac | 32 -
12 files changed, 283 insertions(+), 6332 deletions(-)
delete mode 100644 libgloss/wince/Makefile.am
delete mode 100644 libgloss/wince/Makefile.in
create mode 100644 libgloss/wince/Makefile.inc
create mode 100644 libgloss/wince/acinclude.m4
delete mode 100644 libgloss/wince/aclocal.m4
delete mode 100755 libgloss/wince/configure
delete mode 100644 libgloss/wince/configure.ac
diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index b180309ca238..5b5a6b47c4f4 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -3,6 +3,7 @@
ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Variables that will accumulate in subdirs.
+bin_PROGRAMS =
check_PROGRAMS =
info_TEXINFOS =
PHONY =
@@ -68,3 +69,6 @@ endif
if CONFIG_LIBNOSYS
include libnosys/Makefile.inc
endif
+if CONFIG_WINCE
+include wince/Makefile.inc
+endif
diff --git a/libgloss/configure.ac b/libgloss/configure.ac
index a47334280348..f9d037066bc3 100644
--- a/libgloss/configure.ac
+++ b/libgloss/configure.ac
@@ -96,7 +96,7 @@ case "${target}" in
AC_CONFIG_SUBDIRS([sparc])
;;
sh*-*-pe | mips*-*-pe | *arm*-wince-pe)
- AC_CONFIG_SUBDIRS([wince])
+ config_wince=true
;;
mips*-*-*)
AC_CONFIG_SUBDIRS([mips])
@@ -244,6 +244,7 @@ esac
AM_CONDITIONAL(CONFIG_BFIN, test x$config_bfin = xtrue)
AM_CONDITIONAL(CONFIG_IQ2000, test x$config_iq2000 = xtrue)
+AM_CONDITIONAL(CONFIG_WINCE, test x$config_wince = xtrue)
dnl For now, don't bother configuring testsuite
dnl
diff --git a/libgloss/wince/Makefile.am b/libgloss/wince/Makefile.am
deleted file mode 100644
index d32e4184c363..000000000000
--- a/libgloss/wince/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-## Process this file with automake to produce Makefile.in.
-
-AUTOMAKE_OPTIONS = foreign
-ACLOCAL_AMFLAGS = -I . -I .. -I ../.. -I ../../config
-
-gdbdir = ${dir ${patsubst %/,%,${dir @srcdir@}}}gdb
-VPATH = $(gdbdir)
-bin_PROGRAMS = stub.exe
-stub_exe_SOURCES = wince-stub.c
-
-tooldir = $(exec_prefix)/$(host_alias)
-AM_CPPFLAGS = -I$(gdbdir)
-LDADD = @LDADD@
diff --git a/libgloss/wince/Makefile.inc b/libgloss/wince/Makefile.inc
new file mode 100644
index 000000000000..1c78894a55a4
--- /dev/null
+++ b/libgloss/wince/Makefile.inc
@@ -0,0 +1,8 @@
+## Process this file with automake to produce Makefile.in.
+
+gdbdir = ${dir ${patsubst %/,%,${dir @srcdir@}}}gdb
+VPATH += $(gdbdir)
+bin_PROGRAMS += %D%/stub.exe
+%C%_stub_exe_SOURCES = wince-stub.c
+%C%_stub_exe_CPPFLAGS = $(AM_CPPFLAGS) -I$(gdbdir)
+%C%_stub_exe_LDADD = -lwinsock $(WINCE_STUB_LIBS)
diff --git a/libgloss/wince/acinclude.m4 b/libgloss/wince/acinclude.m4
new file mode 100644
index 000000000000..047a66a3992a
--- /dev/null
+++ b/libgloss/wince/acinclude.m4
@@ -0,0 +1,5 @@
+WINCE_STUB_LIBS=
+case "${target}" in
+ *arm*-wince-pe) WINCE_STUB_LIBS='-lsslsock' ;;
+esac
+AC_SUBST(WINCE_STUB_LIBS)
diff --git a/libgloss/wince/configure.ac b/libgloss/wince/configure.ac
deleted file mode 100644
index d17b061ff467..000000000000
--- a/libgloss/wince/configure.ac
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-
-AC_INIT(wince-stub, 1.0)
-AC_CANONICAL_SYSTEM
-AC_ARG_PROGRAM
-AM_INIT_AUTOMAKE
-AM_MAINTAINER_MODE
-
-cross_compiling=yes
-program_transform_name=s,^,@target_alias@-,;
-
-: ${CFLAGS='-O2'}
-LIB_AC_PROG_CC
-# CFLAGS="$CFLAGS -Xlinker --defsym -Xlinker _main=_WinMain"
-AC_CHECK_TOOL(LD, ld, ld)
-AC_SUBST(LD)
-AC_PROG_INSTALL
-case "${target}" in
- *arm*-*-*) LDADD='-lwinsock -lsslsock' ;;
- *) LDADD='-lwinsock'
-esac
-AC_SUBST(LDADD)
-LIB_AM_PROG_AS
-#
-# The following is sort of a kludge but we *know* that we need
-# an executable extension and, currently, the sh-pe-gcc compiler
-# doesn't play well with configure, so, set a "cache" entry.
-#
-: ${ac_cv_exeext='.exe'}
-AC_EXEEXT
-
-AC_OUTPUT([Makefile])
--
2.34.1
next reply other threads:[~2022-02-12 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 10:08 Mike Frysinger [this message]
2022-02-16 8:45 ` Corinna Vinschen
2022-02-17 1:28 ` Mike Frysinger
2022-02-17 12:07 ` 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=20220212100818.21044-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).