summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/Makefile
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-17 10:37:05 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-17 10:37:05 +0000
commit647e66a67cd3fad6d37bb9fe5f76b1e5d8e93c96 (patch)
tree058efcdb93f6e9717c5d04b973ef6de55eb75487 /libc/sysdeps/linux/arm/Makefile
parentb5abf98bfd9b5296b9aad1fe998e9f020b8a856f (diff)
Now works on StrongArm (using crt0.S) and arm7tdmi/uClinux with
the arm-pic-elf compiler (using crt0pic.S). -Erik
Diffstat (limited to 'libc/sysdeps/linux/arm/Makefile')
-rw-r--r--libc/sysdeps/linux/arm/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile
index c6505c93c..4b23adae7 100644
--- a/libc/sysdeps/linux/arm/Makefile
+++ b/libc/sysdeps/linux/arm/Makefile
@@ -25,7 +25,14 @@ include $(TOPDIR)Rules.mak
LIBC=$(TOPDIR)libc.a
ASFLAGS=$(CFLAGS)
-CRT0=crt0.S
+TARGET_MACHINE_TYPE=$(shell $(CC) -dumpmachine)
+
+ifeq ($(TARGET_MACHINE_TYPE),arm-pic-elf)
+ CRT0=crt0pic.S
+else
+ CRT0=crt0.S
+endif
+
CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
SSRC=longjmp.S setjmp.S
@@ -43,7 +50,7 @@ $(LIBC): ar-target
ar-target: $(OBJS) $(CRT0_OBJ)
$(AR) $(ARFLAGS) $(LIBC) $(OBJS)
- cp $(CRT0_OBJ) $(TOPDIR)$(CRT0_OBJ)
+ cp $(CRT0_OBJ) $(TOPDIR)crt0.o
$(CRT0_OBJ): %.o : %.S
$(CC) $(CFLAGS) -c $< -o $@