summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/mips/Makefile.arch5
-rw-r--r--libc/sysdeps/linux/mips/syscall_error.S8
2 files changed, 8 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/mips/Makefile.arch b/libc/sysdeps/linux/mips/Makefile.arch
index e8925e438..8bbc0bc19 100644
--- a/libc/sysdeps/linux/mips/Makefile.arch
+++ b/libc/sysdeps/linux/mips/Makefile.arch
@@ -6,11 +6,11 @@
#
CSRC := \
- __longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \
+ __longjmp.c brk.c setjmp_aux.c mmap.c \
cacheflush.c pread_write.c sysmips.c _test_and_set.c \
readahead.c
-SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S
+SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
CSRC += posix_fadvise.c posix_fadvise64.c
@@ -21,6 +21,7 @@ CSRC += sigaction.c
SSRC += vfork.S clone.S
endif
+ASFLAGS-syscall_error.S += -D_LIBC_REENTRANT
ARCH_HEADERS := sgidefs.h
# regdef.h
diff --git a/libc/sysdeps/linux/mips/syscall_error.S b/libc/sysdeps/linux/mips/syscall_error.S
index 1e348ad4a..51a8efa5a 100644
--- a/libc/sysdeps/linux/mips/syscall_error.S
+++ b/libc/sysdeps/linux/mips/syscall_error.S
@@ -22,7 +22,7 @@
#include <sysdep.h>
#include <bits/errno.h>
-#ifdef __UCLIBC_HAS_THREADS__
+#ifdef _LIBC_REENTRANT
LOCALSZ= 3
FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
@@ -61,12 +61,14 @@ ENTRY(__syscall_error)
j ra
END(__syscall_error)
-#else /* __UCLIBC_HAS_THREADS__ */
+#else /* __LIBC_REENTRANT */
ENTRY(__syscall_error)
#ifdef __PIC__
+ .set noat
SETUP_GPX (AT)
+ .set at
#endif
SETUP_GPX64 (t9, AT)
@@ -79,4 +81,4 @@ ENTRY(__syscall_error)
RESTORE_GP64
j ra
END(__syscall_error)
-#endif /* __UCLIBC_HAS_THREADS__ */
+#endif /* _LIBC_REENTRANT*/