[uClibc-cvs] uClibc/libc/sysdeps/linux/cris Makefile,1.4,1.5 crt0.c,1.2,1.3
Erik Andersen
andersen at codepoet.org
Thu Jan 23 17:30:15 UTC 2003
Update of /var/cvs/uClibc/libc/sysdeps/linux/cris
In directory winder:/tmp/cvs-serv7398
Modified Files:
Makefile crt0.c
Log Message:
Hopefully this will work as expected. I have no way to
test but this should be correct.
Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/cris/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile 31 Oct 2002 18:19:55 -0000 1.4
+++ Makefile 23 Jan 2003 17:30:11 -0000 1.5
@@ -16,8 +16,8 @@
include $(TOPDIR)Rules.mak
ASFLAGS=$(CFLAGS)
-CRT0=crt0.c
-CRT0_OBJ=$(patsubst %.c,%.o, $(CRT0))
+CRT0_SRC = crt0.c
+CRT0_OBJ = crt0.o crt1.o
SSRC= setjmp.S __longjmp.S clone.S sysdep.S syscall.S
ifeq ($(UNIFIED_SYSCALL),y)
@@ -39,8 +39,8 @@
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
cp $(CRT0_OBJ) $(TOPDIR)libc/$(CRT0_OBJ)
-$(CRT0_OBJ): %.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
+$(CRT0_OBJ): $(CRT0_SRC)
+ $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(SOBJS): %.o : %.S
@@ -52,7 +52,6 @@
$(STRIPTOOL) -x -R .note -R .comment $*.o
headers:
- @(TOPDIR=$(TOPDIR) CC=$(CC) /bin/sh $(TOPDIR)/extra/scripts/gen_bits_syscall_h.sh > bits/syscall.h )
clean:
rm -f *.[oa] *~ core
Index: crt0.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/cris/crt0.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- crt0.c 23 Sep 2002 12:21:14 -0000 1.2
+++ crt0.c 23 Jan 2003 17:30:12 -0000 1.3
@@ -23,8 +23,15 @@
__asm__ volatile("jump start1");
}
-void __uClibc_main(int argc, char **argv, char **envp)
+#include <features.h>
+
+extern void __uClibc_main(int argc, char **argv, char **envp)
+ __attribute__ ((__noreturn__));
+extern void __uClibc_start_main(int argc, char **argv, char **envp,
+ void (*app_init)(void), void (*app_fini)(void))
__attribute__ ((__noreturn__));
+extern void weak_function _init(void);
+extern void weak_function _fini(void);
static void
start1 (int argc, char **argv)
@@ -45,6 +52,10 @@
*/
--environ;
+#if defined L_crt0 || ! defined __UCLIBC_CTOR_DTOR__
/* Leave control to the libc */
__uClibc_main(argc, argv, environ);
+#else
+ __uClibc_start_main(argc, argv, environ, _init, _fini);
+#endif
}
More information about the uClibc-cvs
mailing list