[PATCH 5/7] newlib: libc: install CRT0 straight out of subdir
Mike Frysinger
vapier@gentoo.org
Sun Jan 23 06:04:27 GMT 2022
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
More information about the Newlib
mailing list