summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-03-06 13:57:31 +0000
committerEric Andersen <andersen@codepoet.org>2003-03-06 13:57:31 +0000
commite9a706a4144834a8e50e8dd371bc796cb4fbc854 (patch)
treef3dd87e8a5b08b7f3d7b14ec97cfe358b1ac2a0c /libc/sysdeps/linux/sh/Makefile
parent6b71d0a8c5ede7396948ed05357def5d00e55cec (diff)
Patch from Stefan Allius to finish off the last required bits
for gmon profiling support for the SuperH target.
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: