[uClibc-cvs] uClibc/libc/sysdeps/linux/m68k crti.S, NONE, 1.1 crtn.S, NONE, 1.1 Makefile, 1.29, 1.30

Erik Andersen andersen at uclibc.org
Wed Nov 5 03:32:18 UTC 2003


Update of /var/cvs/uClibc/libc/sysdeps/linux/m68k
In directory winder:/tmp/cvs-serv25022

Modified Files:
	Makefile 
Added Files:
	crti.S crtn.S 
Log Message:
Continue the conversion to using per-arch crti.S and crtn.S


--- NEW FILE: crti.S ---
	.file	"initfini.c"
#APP
	
	.section .init
#NO_APP
	.align	2
	.globl	_init
	.type	_init, @function
_init:
	link.w %a6,#0
#APP
	
	.align 2
	
	
	.section .fini
#NO_APP
	.align	2
	.globl	_fini
	.type	_fini, @function
_fini:
	link.w %a6,#0
#APP
	.align 2
	
	
	.ident	"GCC: (GNU) 3.3.2"

--- NEW FILE: crtn.S ---
	.file	"initfini.c"
#APP
	
	.section .init
#NO_APP
	.align	2
	.globl	_init
	.type	_init, @function
#NO_APP
	unlk %a6
	rts
	.size	_init, .-_init
#APP
	
	.section .fini
#NO_APP
	.align	2
	.globl	_fini
	.type	_fini, @function
#NO_APP
	unlk %a6
	rts
	.size	_fini, .-_fini
#APP
	
	.ident	"GCC: (GNU) 3.3.2"

Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/m68k/Makefile,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- Makefile	18 Oct 2003 10:50:51 -0000	1.29
+++ Makefile	5 Nov 2003 03:32:14 -0000	1.30
@@ -29,6 +29,7 @@
 CRT0_SRC = crt0.S
 endif
 CRT0_OBJ = crt0.o crt1.o
+CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
 
 SSRC= __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
 SOBJS=$(patsubst %.S,%.o, $(SSRC))
@@ -44,7 +45,7 @@
 
 $(LIBC): ar-target 
 
-ar-target: $(OBJS) $(CRT0_OBJ)
+ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS)
 	$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
 	cp $(CRT0_OBJ) $(TOPDIR)lib/
 
@@ -60,6 +61,30 @@
 	$(CC) $(CFLAGS) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
+ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
+crti.o: crti.S
+	$(CC) $(SAFECFLAGS) -c crti.S -o crti.o
+
+$(TOPDIR)lib/crti.o: crti.o
+	$(INSTALL) -d $(TOPDIR)lib/
+	cp crti.o $(TOPDIR)lib/
+
+crtn.o: crtn.S
+	$(CC) $(SAFECFLAGS) -c crtn.S -o crtn.o
+
+$(TOPDIR)lib/crtn.o: crtn.o
+	$(INSTALL) -d $(TOPDIR)lib/
+	cp crtn.o $(TOPDIR)lib/
+else
+$(TOPDIR)lib/crti.o:
+	$(INSTALL) -d $(TOPDIR)lib/
+	$(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o
+$(TOPDIR)lib/crtn.o:
+	$(INSTALL) -d $(TOPDIR)lib/
+	$(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
+endif
+
+
 headers:
 ifneq ($(strip $(HAVE_ELF)),y)
 	echo "Working around compiler bug in the m68k-pic-coff toolchain"




More information about the uClibc-cvs mailing list