summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-03-03 20:58:42 +0000
committerEric Andersen <andersen@codepoet.org>2003-03-03 20:58:42 +0000
commit67eff66438688fddebe41f77fd252a3b2b135271 (patch)
tree18dbee3e9afe50d27095140198e2aa34df1de061 /libc/sysdeps/linux/i386/Makefile
parent2229d0fa131387b9b8ad16ac88347350a080aeb5 (diff)
Initial effort at adding profiling support.
Diffstat (limited to 'libc/sysdeps/linux/i386/Makefile')
-rw-r--r--libc/sysdeps/linux/i386/Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile
index 9ca790cff..c7e1db947 100644
--- a/libc/sysdeps/linux/i386/Makefile
+++ b/libc/sysdeps/linux/i386/Makefile
@@ -21,10 +21,14 @@ include $(TOPDIR)Rules.mak
ASFLAGS=$(CFLAGS)
CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
+CRT0_OBJ = crt0.o crt1.o gcrt1.o
+CRT0_DEPS=gmon-start.S
SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \
bsd-_setjmp.S syscall.S
+ifeq ($(strip $(UCLIBC_PROFILING)),y)
+SSRC+=mcount.S
+endif
SOBJS=$(patsubst %.S,%.o, $(SSRC))
CSRC=brk.c sigaction.c
@@ -53,6 +57,13 @@ $(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
+ifeq ($(strip $(UCLIBC_PROFILING)),y)
+SAFECFLAGS := $(subst -g,,$(CFLAGS))
+gmon-start.S: ../common/gmon-start.c
+ $(CC) $(SAFECFLAGS) -c $< -S -o $*.S
+gcrt1.o: $(CRT0_DEPS)
+endif
+
headers: