commit 3b02f6f7e8ed2945ec611b256702c8640ba0bc58
parent 402824c0e18ecf535742ce8eacbd6876857c457d
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 18 Jan 2020 19:45:10 +0100
libc: Fix libc generation
Lorder was wrong after the patch that added new object
extensions. Also, sub directories had wrong rules to
write the list of objects.
Diffstat:
6 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/scripts/lorder b/scripts/lorder
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-trap 'r=$?;rm -f $$sym?ef; exit $r' EXIT HUP INT QUIT TERM
+trap 'rm -f $$sym?ef' EXIT HUP INT QUIT TERM
case $# in
0)
@@ -13,7 +13,7 @@ rm -f $$sym?ef
(echo $1:
${NM:-nm} -g "$@") | sed -n '
- /\.o:$/ {
+ /:$/ {
s/://
h
s/.*/& &/
diff --git a/src/libc/assert/Makefile b/src/libc/assert/Makefile
@@ -7,7 +7,10 @@ OBJS =\
__assert.$O\
assert.$O\
-all: $(OBJS)
+all: $(LIBC)
+
+$(LIBCLST): $(OBJS)
+ $(MKLST)
dep: inc-dep
diff --git a/src/libc/locale/Makefile b/src/libc/locale/Makefile
@@ -7,10 +7,10 @@ OBJS =\
localeconv.$O\
setlocale.$O\
-all: $(OBJS)
+all: $(LIBC)
-$(LIBC): $(OBJS)
- $(MKLIB)
+$(LIBCLST): $(OBJS)
+ $(MKLST)
dep: inc-dep
diff --git a/src/libc/stdio/Makefile b/src/libc/stdio/Makefile
@@ -44,10 +44,10 @@ OBJS =\
vprintf.$O\
_allocbuf.$O\
-all: $(OBJS)
+all: $(LIBC)
-$(LIBC): $(OBJS)
- $(MKLIB)
+$(LIBCLST): $(OBJS)
+ $(MKLST)
dep: inc-dep
diff --git a/src/libc/stdlib/Makefile b/src/libc/stdlib/Makefile
@@ -26,10 +26,10 @@ OBJS =\
strtoul.$O\
strtoull.$O\
-all: $(OBJS)
+all: $(LIBC)
-$(LIBC): $(OBJS)
- $(MKLIB)
+$(LIBCLST): $(OBJS)
+ $(MKLST)
dep: inc-dep
diff --git a/src/libc/string/Makefile b/src/libc/string/Makefile
@@ -30,8 +30,8 @@ OBJS = \
all: $(LIBC)
-$(LIBC): $(OBJS)
- $(MKLIB)
+$(LIBCLST): $(OBJS)
+ $(MKLST)
dep: inc-dep