From e454093a142e48d242eb9faf960fd2d5621677e7 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 29 Jan 2003 10:26:25 +0000 Subject: Create stub crti.o and crtn.o files when UCLIBC_CTOR_DTOR is disabled -Erik --- libc/sysdeps/linux/common/Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/common/Makefile') diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile index 513625f1d..495754622 100644 --- a/libc/sysdeps/linux/common/Makefile +++ b/libc/sysdeps/linux/common/Makefile @@ -34,13 +34,11 @@ COBJS=$(patsubst %.c,%.o, $(CSRC)) 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=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) -fno-builtin ifeq ($(strip $(DOPIC)),y) SAFECFLAGS+=-fPIC endif -endif OBJ=$(COBJS) $(MOBJ) @@ -59,6 +57,7 @@ $(COBJS): %.o : %.c $(CC) $(CFLAGS) -c $< -o $@ $(STRIPTOOL) -x -R .note -R .comment $*.o +ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) initfini.S: initfini.c $(CC) $(SAFECFLAGS) -I$(TOPDIR)include -c initfini.c -S -o initfini.S @@ -78,6 +77,14 @@ crtn.o: crtn.S $(TOPDIR)lib/crtn.o: crtn.o mkdir -p $(TOPDIR)lib/ cp crtn.o $(TOPDIR)lib/ +else +crti.o: + mkdir -p $(TOPDIR)lib/ + $(AR) $(ARFLAGS) $(TOPDIR)lib/crti.o +crtn.o: + mkdir -p $(TOPDIR)lib/ + $(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o +endif clean: rm -f *.[oa] *~ core crt[in].* *.S -- cgit v1.2.3