summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/Makefile
diff options
context:
space:
mode:
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: