summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/sh/Makefile')
-rw-r--r--libc/sysdeps/linux/sh/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/sh/Makefile b/libc/sysdeps/linux/sh/Makefile
index 425335f7b..9a4560336 100644
--- a/libc/sysdeps/linux/sh/Makefile
+++ b/libc/sysdeps/linux/sh/Makefile
@@ -24,7 +24,8 @@ CFLAGS+= -I../
SFLAGS= $(CFLAGS) -D__ASSEMBLER__
CRT0_SRC = crt0.S
-CRT0_OBJ = crt0.o crt1.o
+CRT0_OBJ = crt0.o crt1.o gcrt1.o
+CRT0_DEPS=gmon-start.S
SSRC=setjmp.S __longjmp.S vfork.S clone.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
@@ -55,6 +56,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:
clean: