$(compile.S) $(PICFLAG) $(SSP_DISABLE_FLAGS)
endif
-#ifeq ($(TARGET_ARCH),nios)
-#CRTS_COMPAT := $(top_builddir)lib/crt0.o
-#$(CRTS_COMPAT):
-# ln -fs crt1.o $(top_builddir)lib/crt0.o
-#else
CRTS_COMPAT :=
-#endif
startfiles = $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC)
- $(crt-y): $(startfiles)
+ startfiles: $(startfiles)
$(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC): | headers
- $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) $(LINK_FLAT_CRTS) $(SHARED_START_FILES) $(SHARED_END_FILES) : | $(top_builddir)lib
+ $(CRTS) $(CTOR_TARGETS) $(CRTS_COMPAT) $(CRTRELOC) \
+ $(LINK_FLAT_CRTS) $(SHARED_START_FILES) $(SHARED_END_FILES): | $(top_builddir)lib
$(top_builddir)lib/$(NONSHARED_LIBNAME): $(libc-nonshared-y)
$(Q)$(RM) $@
endif
endif
-ifeq ($(TARGET_ARCH),sh64)
- CPU_CFLAGS-$(ARCH_LITTLE_ENDIAN):=-ml
- CPU_CFLAGS-$(ARCH_BIG_ENDIAN):=-mb
- CPU_CFLAGS-$(CONFIG_SH5)+=-m5-32media
-endif
-
ifeq ($(TARGET_ARCH),h8300)
- SYMBOL_PREFIX=_
- CPU_LDFLAGS-$(CONFIG_H8300H)+= -Wl,-ms8300h
- CPU_LDFLAGS-$(CONFIG_H8S) += -Wl,-ms8300s
+ CPU_LDFLAGS-$(CONFIG_H8300H)+= -Wl,-mh8300h_linux
+ CPU_LDFLAGS-$(CONFIG_H8S) += -Wl,-mh8300s_linux
CPU_CFLAGS-$(CONFIG_H8300H) += -mh -mint32
CPU_CFLAGS-$(CONFIG_H8S) += -ms -mint32
endif
register int __a4 __asm__ ("a4") = __a4tmp;
#define ASM_ARGS_4 ASM_ARGS_3, "r" (__a4)
#define LOAD_ARGS_5(a1, a2, a3, a4, a5) \
- int _v1tmp = (int) (a5); \
+ int __v1tmp = (int) (a5); \
LOAD_ARGS_4 (a1, a2, a3, a4) \
- register int _v1 __asm__ ("v1") = _v1tmp;
- #define ASM_ARGS_5 ASM_ARGS_4, "r" (_v1)
+ register int __v1 __asm__ ("v1") = __v1tmp;
+ #define ASM_ARGS_5 ASM_ARGS_4, "r" (__v1)
#define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6) \
- int _v2tmp = (int) (a6); \
+ int __v2tmp = (int) (a6); \
LOAD_ARGS_5 (a1, a2, a3, a4, a5) \
- register int _v2 __asm__ ("v2") = _v2tmp;
- #define ASM_ARGS_6 ASM_ARGS_5, "r" (_v2)
+ register int __v2 __asm__ ("v2") = __v2tmp;
+ #define ASM_ARGS_6 ASM_ARGS_5, "r" (__v2)
+#ifndef __thumb__
#define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7) \
- int _v3tmp = (int) (a7); \
+ int __v3tmp = (int) (a7); \
LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6) \
- register int _v3 __asm__ ("v3") = _v3tmp;
- #define ASM_ARGS_7 ASM_ARGS_6, "r" (_v3)
+ register int __v3 __asm__ ("v3") = __v3tmp;
+ #define ASM_ARGS_7 ASM_ARGS_6, "r" (__v3)
-
+#endif
-
#endif /* __ASSEMBLER__ */
#endif /* _BITS_SYSCALLS_H */
@ do the system call
@ get flags
mov r0, r2
+#ifdef RESET_PID
+ mov ip, r2
+#endif
@ new sp is already in r1
- @ load remaining arguments off the stack
- stmfd sp!, {r4}
- ldr r2, [sp, #4]
- ldr r3, [sp, #8]
- ldr r4, [sp, #12]
- DO_CALL (clone)
- movs a1, a1
- IT(t, ne)
- ldmnefd sp!, {r4}
+ push {r4, r7}
+ cfi_adjust_cfa_offset (8)
+ cfi_rel_offset (r4, 0)
+ cfi_rel_offset (r7, 4)
+ ldr r2, [sp, #8]
+ ldr r3, [sp, #12]
+ ldr r4, [sp, #16]
+ ldr r7, =SYS_ify(clone)
+ swi 0x0
+ cfi_endproc
+ cmp r0, #0
+ beq 1f
+ pop {r4, r7}
blt __error
- #if defined(__USE_BX__)
- bxne lr
- #else
- movne pc, lr
- #endif
+ IT(t, ne)
+ BXC(ne, lr)
+ cfi_startproc
+.fnend
+PSEUDO_END (__clone)
+
+1:
+ .fnstart
+ .cantunwind
+#ifdef RESET_PID
+ tst ip, #CLONE_THREAD
+ bne 3f
+ GET_TLS (lr)
+ mov r1, r0
+ tst ip, #CLONE_VM
+ ldr r7, =SYS_ify(getpid)
+ ite ne
+ movne r0, #-1
+ swieq 0x0
+ NEGOFF_ADJ_BASE (r1, TID_OFFSET)
+ str r0, NEGOFF_OFF1 (r1, TID_OFFSET)
+ str r0, NEGOFF_OFF2 (r1, PID_OFFSET, TID_OFFSET)
+3:
+#endif
@ pick the function arg and call address off the stack and execute
ldr r0, [sp, #4]
mov lr, pc
RET_hello := 42
RET_tiny := 42
--# missing internal headers, disable these
- TESTS_DISABLED := tst-atomic tst-atomic-long
-GLIBC_TESTS_DISABLED := tst-atomic_glibc tst-atomic-long_glibc
-
+ atomic_headers := -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
+ -I$(top_srcdir)libc/sysdeps/linux \
+ -I$(top_builddir)include
+
-CFLAGS_tst-atomic = $(atomic_headers)
-CFLAGS_tst-atomic-long = $(atomic_headers)
++CFLAGS_tst-atomic = $(atomic_headers) -fPIC
++CFLAGS_tst-atomic-long = $(atomic_headers) -fPIC