[uClibc-cvs] uClibc/libc/sysdeps/linux/arm Makefile,1.38,1.39 crt0.S,1.16,1.17

Erik Andersen andersen at codepoet.org
Thu Dec 12 10:14:49 UTC 2002


Update of /var/cvs/uClibc/libc/sysdeps/linux/arm
In directory winder:/tmp/cvs-serv5260/libc/sysdeps/linux/arm

Modified Files:
	Makefile crt0.S 
Log Message:
Based on discussions with Stefan Allius, change it so that we always
build a crt0.o and a crt1.o.  crt1.o will support ctors and dtors if
such support is enabled.  One more gratuitous toolchain support issue
is thereby removed...
 -Erik


Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/arm/Makefile,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- Makefile	3 Nov 2002 23:18:08 -0000	1.38
+++ Makefile	12 Dec 2002 10:14:15 -0000	1.39
@@ -25,10 +25,8 @@
 include $(TOPDIR)Rules.mak
 ASFLAGS=$(CFLAGS)
 
-TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
-
-CRT0=crt0.S
-CRT0_OBJ=crt0.o
+CRT0_SRC = crt0.S
+CRT0_OBJ = crt0.o crt1.o
 
 SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S bsd-_setjmp.S
 SOBJS=$(patsubst %.S,%.o, $(SSRC))
@@ -45,10 +43,10 @@
 
 ar-target: $(OBJS) $(CRT0_OBJ)
 	$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
-	cp $(CRT0_OBJ) $(TOPDIR)lib/$(CRT0_OBJ)
+	cp $(CRT0_OBJ) $(TOPDIR)lib/
 
-$(CRT0_OBJ): $(CRT0)
-	$(CC) $(CFLAGS) -c $< -o $@
+$(CRT0_OBJ): $(CRT0_SRC)
+	$(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 $(SOBJS): %.o : %.S

Index: crt0.S
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/arm/crt0.S,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- crt0.S	27 Nov 2002 23:33:57 -0000	1.16
+++ crt0.S	12 Dec 2002 10:14:15 -0000	1.17
@@ -80,7 +80,7 @@
 	ldr r2,[sp, #8]
 #endif
 
-#ifdef __UCLIBC_CTOR_DTOR__
+#if defined L_crt1 && defined __UCLIBC_CTOR_DTOR__
 	/* Store the address of _init in r3 as an argument to main() */
 	ldr r3, =_init
 




More information about the uClibc-cvs mailing list