[uClibc-cvs] uClibc/libc/sysdeps/linux/common Makefile,1.68,1.69

Erik Andersen andersen at codepoet.org
Wed Nov 27 23:34:33 UTC 2002


Update of /var/cvs/uClibc/libc/sysdeps/linux/common
In directory winder:/tmp/cvs-serv365/libc/sysdeps/linux/common

Modified Files:
	Makefile 
Log Message:
Make support for global constructors and global destructors be
configurable, so people who do not need or want ctor/dtor support
can disable it and make their binaries a little bit smaller.
 -Erik


Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/Makefile,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- Makefile	14 Nov 2002 00:55:45 -0000	1.68
+++ Makefile	27 Nov 2002 23:33:59 -0000	1.69
@@ -24,11 +24,6 @@
 TOPDIR=../../../../
 include $(TOPDIR)Rules.mak
 
-SAFECFLAGS=$(WARNINGS) $(CPU_CFLAGS-y) $(OPTIMIZATION) -fno-builtin
-ifeq ($(strip $(DOPIC)),y)
-SAFECFLAGS+=-fPIC
-endif
-
 CSRC=	waitpid.c getdnnm.c gethstnm.c getcwd.c \
 	mkfifo.c setegid.c wait.c getpagesize.c seteuid.c \
 	wait3.c setpgrp.c getdtablesize.c create_module.c ptrace.c \
@@ -44,13 +39,21 @@
 MSRC=syscalls.c
 MOBJ=$(shell ./list_syscalls.sh)
 
+ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
+CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+SAFECFLAGS=$(WARNINGS) $(CPU_CFLAGS-y) $(OPTIMIZATION) -fno-builtin
+ifeq ($(strip $(DOPIC)),y)
+SAFECFLAGS+=-fPIC
+endif
+endif
+
 OBJ=$(COBJS) $(MOBJ)
 
 all: $(STR_SYSCALLS) $(OBJ) $(LIBC)
 
 $(LIBC): ar-target
 
-ar-target: $(OBJ) $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
+ar-target: $(OBJ) $(CTOR_TARGETS)
 	$(AR) $(ARFLAGS) $(LIBC) $(OBJ)
 	(cd $(TOPDIR)lib/; ln -fs crt0.o crt1.o)
 




More information about the uClibc-cvs mailing list