summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-03-13 23:43:02 +0000
committerEric Andersen <andersen@codepoet.org>2002-03-13 23:43:02 +0000
commit9121e41f4629b82bf628456b10ab211f5c1e33aa (patch)
tree0a2d539b21952992d899925978a55aa110c4e3b6 /libc/sysdeps/linux/common/Makefile
parent94e5ab630be58fa6d008fbfa735492bd6ce2a568 (diff)
Build our own crti.o and crtn.o with a cross arch method that I
can live with much better the what glibc does. -Erik
Diffstat (limited to 'libc/sysdeps/linux/common/Makefile')
-rw-r--r--libc/sysdeps/linux/common/Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 8b23a5fad..009d0740d 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -42,7 +42,7 @@ all: $(STR_SYSCALLS) $(OBJ) $(LIBC)
$(LIBC): ar-target
-ar-target: $(OBJ)
+ar-target: $(OBJ) crti.o crtn.o
$(AR) $(ARFLAGS) $(LIBC) $(OBJ)
$(MOBJ): $(MSRC)
@@ -53,6 +53,20 @@ $(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
+initfini.s: initfini.c
+ $(CC) $(CFLAGS) -c initfini.c -S -o initfini.s
+
+crti.S crtn.S: initfini.s
+ $(TOPDIR)/extra/scripts/initfini.pl
+
+crti.o: crti.S
+ $(CC) $(CFLAGS) -c crti.S -o crti.o
+ cp crti.o $(TOPDIR)lib/
+
+crtn.o: crtn.S
+ $(CC) $(CFLAGS) -c crtn.S -o crtn.o
+ cp crtn.o $(TOPDIR)lib/
+
clean:
- rm -f *.[oa] *~ core
+ rm -f *.[oa] *~ core crti.* crtn.* initfini.s