public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: newlib@sourceware.org
Subject: [PATCH 5/7] newlib: libc: install CRT0 straight out of subdir
Date: Sun, 23 Jan 2022 01:04:27 -0500	[thread overview]
Message-ID: <20220123060429.16293-6-vapier@gentoo.org> (raw)
In-Reply-To: <20220123060429.16293-1-vapier@gentoo.org>

There's no need to have a sys/ subdir just to copy the sys/$arch/crt0.o
up to sys/crt0.o, and then have libc/ copy sys/crt0.o up again.  Just
have libc/ refer to sys/$arch/crt0.o directly and drop the intermediate
makefile entirely.
---
 newlib/libc/Makefile.am     |  10 +-
 newlib/libc/Makefile.in     |  14 +-
 newlib/libc/configure       |   5 +-
 newlib/libc/configure.ac    |   4 +-
 newlib/libc/sys/Makefile.am |  16 --
 newlib/libc/sys/Makefile.in | 452 ------------------------------------
 6 files changed, 10 insertions(+), 491 deletions(-)
 delete mode 100644 newlib/libc/sys/Makefile.am
 delete mode 100644 newlib/libc/sys/Makefile.in

diff --git a/newlib/libc/Makefile.am b/newlib/libc/Makefile.am
index a57c501b9d46..7807291ba3ad 100644
--- a/newlib/libc/Makefile.am
+++ b/newlib/libc/Makefile.am
@@ -38,7 +38,7 @@ endif
 
 # The order of SUBDIRS is important for the integrated documentation.
 # Do not change the order without considering the doc impact.
-SUBDIRS = argz stdlib ctype search $(STDIO_SUBDIR) $(STDIO64_SUBDIR) string $(SIGNAL_SUBDIR) sys time locale reent \
+SUBDIRS = argz stdlib ctype search $(STDIO_SUBDIR) $(STDIO64_SUBDIR) string $(SIGNAL_SUBDIR) time locale reent \
 	errno misc $(UNIX_SUBDIR) $(POSIX_SUBDIR) $(SYSCALLS_SUBDIR) $(NEWLIB_ICONV_DIRS) \
 	$(XDR_SUBDIR) ssp
 if HAVE_SYS_DIR
@@ -124,12 +124,6 @@ endif # USE_LIBTOOL
 
 $(SUBLIBS): ; @true
 
-crt0.o: sys/crt0.o
-	rm -f $@
-	ln sys/crt0.o $@ >/dev/null 2>/dev/null || cp sys/crt0.o $@
-
-sys/crt0.o: ; @true
-
 # This is a list of the stmp-def files in each subdirectory which
 # builds .def files.  We don't list subdirectories which don't build
 # .def files; if the list of subdirectories changes, we must change
@@ -242,7 +236,7 @@ install-man: man
 .PHONY: force
 force:
 
-CLEANFILES = $(CRT0) \
+CLEANFILES = \
 	sigset.texi stmp-sigset \
 	stdio64.texi stmp-stdio64 targetdep.tex stmp-targetdep \
 	tmp-sigset.texi tmp-iconvset.texi \
diff --git a/newlib/libc/configure.ac b/newlib/libc/configure.ac
index 290e259299af..8ca783d84a85 100644
--- a/newlib/libc/configure.ac
+++ b/newlib/libc/configure.ac
@@ -60,7 +60,7 @@ fi
 
 CRT0=
 if test "x${have_crt0}" = "xyes"; then
-  CRT0=crt0.o
+  CRT0=sys/${sys_dir}/crt0.o
 fi
 AC_SUBST(CRT0)
 
@@ -293,5 +293,5 @@ AC_SUBST(LIBC_MACHINE_LIB)
 AC_SUBST(machine_dir)
 AC_SUBST(shared_machine_dir)
 
-AC_CONFIG_FILES([Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile ssp/Makefile sys/Makefile xdr/Makefile])
+AC_CONFIG_FILES([Makefile argz/Makefile ctype/Makefile errno/Makefile locale/Makefile misc/Makefile reent/Makefile search/Makefile stdio/Makefile stdio64/Makefile stdlib/Makefile string/Makefile time/Makefile posix/Makefile signal/Makefile syscalls/Makefile unix/Makefile iconv/Makefile iconv/ces/Makefile iconv/ccs/Makefile iconv/ccs/binary/Makefile iconv/lib/Makefile ssp/Makefile xdr/Makefile])
 AC_OUTPUT
-- 
2.34.1


  parent reply	other threads:[~2022-01-23  6:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-23  6:04 [PATCH 0/7] newlib: reduce number of configure scripts Mike Frysinger
2022-01-23  6:04 ` [PATCH 1/7] newlib: libm: merge machine/ trampoline up a level Mike Frysinger
2022-01-26 15:58   ` Jon Turney
2022-01-27  2:46     ` Mike Frysinger
2022-01-27 15:28       ` Jon Turney
2022-01-28  0:37         ` Mike Frysinger
2022-01-28 14:28           ` Jon Turney
2022-01-29  4:56             ` Mike Frysinger
2022-01-23  6:04 ` [PATCH 2/7] newlib: libm: merge machine/ configure scripts " Mike Frysinger
2022-01-23  6:04 ` [PATCH 3/7] newlib: libc: merge machine/ trampoline " Mike Frysinger
2022-01-23  6:04 ` [PATCH 4/7] newlib: libc: merge sys/ " Mike Frysinger
2022-01-23  6:04 ` Mike Frysinger [this message]
2022-01-23  6:04 ` [PATCH 6/7] newlib: libc: merge most sys/ configure scripts " Mike Frysinger
2022-01-31 16:08   ` Richard Earnshaw
2022-02-01  4:49     ` arm-eabi fails in libc/sys/arm/: No rule to make target 'lib_a-trap.o', needed by 'lib.a' Mike Frysinger
2022-02-03 16:49       ` Richard Earnshaw
2022-02-04  1:44         ` Mike Frysinger
2022-01-23  6:04 ` [PATCH 7/7] newlib: libc: merge machine/ configure scripts up a level Mike Frysinger
2022-01-25 13:58 ` [PATCH 0/7] newlib: reduce number of configure scripts 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=20220123060429.16293-6-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).