summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/alpha/__longjmp.S5
-rw-r--r--libc/sysdeps/linux/alpha/setjmp.S35
-rw-r--r--libc/sysdeps/linux/arm/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/cris/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/cris/setjmp.S3
-rw-r--r--libc/sysdeps/linux/frv/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/h8300/bsd-_setjmp.S4
-rw-r--r--libc/sysdeps/linux/h8300/bsd-setjmp.S4
-rw-r--r--libc/sysdeps/linux/h8300/setjmp.S4
-rw-r--r--libc/sysdeps/linux/hppa/__longjmp.S5
-rw-r--r--libc/sysdeps/linux/i386/__longjmp.S5
-rw-r--r--libc/sysdeps/linux/i386/bsd-_setjmp.S4
-rw-r--r--libc/sysdeps/linux/i386/bsd-setjmp.S4
-rw-r--r--libc/sysdeps/linux/i386/setjmp.S5
-rw-r--r--libc/sysdeps/linux/m68k/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/m68k/bsd-_setjmp.S4
-rw-r--r--libc/sysdeps/linux/m68k/bsd-setjmp.S4
-rw-r--r--libc/sysdeps/linux/m68k/setjmp.S4
-rw-r--r--libc/sysdeps/linux/microblaze/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/microblaze/setjmp.S4
-rw-r--r--libc/sysdeps/linux/nios/__longjmp.S6
-rw-r--r--libc/sysdeps/linux/nios/setjmp.S5
-rw-r--r--libc/sysdeps/linux/nios2/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/nios2/bsd-_setjmp.S4
-rw-r--r--libc/sysdeps/linux/nios2/bsd-setjmp.S4
-rw-r--r--libc/sysdeps/linux/nios2/setjmp.S4
-rw-r--r--libc/sysdeps/linux/powerpc/__longjmp.S4
-rw-r--r--libc/sysdeps/linux/powerpc/setjmp.S4
-rw-r--r--libc/sysdeps/linux/sh/__longjmp.S3
-rw-r--r--libc/sysdeps/linux/sh/setjmp.S4
-rw-r--r--libc/sysdeps/linux/sparc/__longjmp.S6
-rw-r--r--libc/sysdeps/linux/sparc/setjmp.S5
-rw-r--r--libc/sysdeps/linux/v850/__longjmp.S5
-rw-r--r--libc/sysdeps/linux/v850/setjmp.S4
-rw-r--r--libc/sysdeps/linux/x86_64/__longjmp.S5
-rw-r--r--libc/sysdeps/linux/x86_64/bsd-setjmp.S5
-rw-r--r--libc/sysdeps/linux/x86_64/setjmp.S5
37 files changed, 41 insertions, 150 deletions
diff --git a/libc/sysdeps/linux/alpha/__longjmp.S b/libc/sysdeps/linux/alpha/__longjmp.S
index 910ec0781..6871715a7 100644
--- a/libc/sysdeps/linux/alpha/__longjmp.S
+++ b/libc/sysdeps/linux/alpha/__longjmp.S
@@ -16,10 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _SETJMP_H
-#define __ASSEMBLY__
-#include <bits/setjmp.h>
+#include <setjmp-offsets.h>
#define a0 $16
diff --git a/libc/sysdeps/linux/alpha/setjmp.S b/libc/sysdeps/linux/alpha/setjmp.S
index 105cc8292..f037f7ab6 100644
--- a/libc/sysdeps/linux/alpha/setjmp.S
+++ b/libc/sysdeps/linux/alpha/setjmp.S
@@ -16,11 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#define __ASSEMBLY__
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#define a0 $16
@@ -30,10 +26,16 @@ __sigsetjmp:
ldgp $29, 0($27)
$sigsetjmp_local:
- subq $30, 16, $30
- .frame $26, 16, $26, 0
- stq $26, 0($30)
- .mask 0x04000000, -16
+#ifndef __PIC__
+# define FRAME 16
+ subq $30, FRAME, $30
+ .frame $30, FRAME, $26, 0
+ stq $26, 0($30)
+ .mask 0x04000000, -FRAME
+#else
+# define FRAME 0
+ .frame $30, FRAME, $26, 0
+#endif
.prologue 1
stq $9, JB_S0*8(a0)
@@ -43,9 +45,9 @@ $sigsetjmp_local:
stq $13, JB_S4*8(a0)
stq $14, JB_S5*8(a0)
stq $26, JB_PC*8(a0)
- addq $30, 16, $1
- stq $15, JB_FP*8(a0)
+ addq $30, FRAME, $1
stq $1, JB_SP*8(a0)
+ stq $15, JB_FP*8(a0)
stt $f2, JB_F2*8(a0)
stt $f3, JB_F3*8(a0)
stt $f4, JB_F4*8(a0)
@@ -55,12 +57,16 @@ $sigsetjmp_local:
stt $f8, JB_F8*8(a0)
stt $f9, JB_F9*8(a0)
+#ifndef __PIC__
/* Call to C to (potentially) save our signal mask. */
jsr $26, __sigjmp_save
-
ldq $26, 0($30)
addq $30, 16, $30
ret
+#else
+ /* Tailcall to save the signal mask. */
+ br $31, __sigjmp_save !samegp
+#endif
.end __sigsetjmp
@@ -71,7 +77,6 @@ $sigsetjmp_local:
.align 3;
.ent _setjmp , 0;
_setjmp:
- .frame $30 , 0, $26
ldgp $29, 0($27)
mov 0, $17
br $sigsetjmp_local
@@ -81,11 +86,7 @@ _setjmp:
.align 3;
.ent setjmp , 0;
setjmp:
- .frame $30 , 0, $26
ldgp $29, 0($27)
mov 1, $17
br $sigsetjmp_local
.end setjmp
-
-.weak _setjmp
-.weak setjmp
diff --git a/libc/sysdeps/linux/arm/__longjmp.S b/libc/sysdeps/linux/arm/__longjmp.S
index 5faf4ece9..a3cb44c27 100644
--- a/libc/sysdeps/linux/arm/__longjmp.S
+++ b/libc/sysdeps/linux/arm/__longjmp.S
@@ -19,10 +19,6 @@
#include <features.h>
#include <bits/arm_asm.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
.global __longjmp
.type __longjmp,%function
diff --git a/libc/sysdeps/linux/cris/__longjmp.S b/libc/sysdeps/linux/cris/__longjmp.S
index 52a986fd9..8763c27f2 100644
--- a/libc/sysdeps/linux/cris/__longjmp.S
+++ b/libc/sysdeps/linux/cris/__longjmp.S
@@ -17,11 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
#include "sysdep.h"
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
.syntax no_register_prefix
diff --git a/libc/sysdeps/linux/cris/setjmp.S b/libc/sysdeps/linux/cris/setjmp.S
index e7bb6358a..84fcbda46 100644
--- a/libc/sysdeps/linux/cris/setjmp.S
+++ b/libc/sysdeps/linux/cris/setjmp.S
@@ -18,9 +18,6 @@
Boston, MA 02111-1307, USA. */
#include "sysdep.h"
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
.syntax no_register_prefix
diff --git a/libc/sysdeps/linux/frv/__longjmp.S b/libc/sysdeps/linux/frv/__longjmp.S
index c3145c84f..d186ab18e 100644
--- a/libc/sysdeps/linux/frv/__longjmp.S
+++ b/libc/sysdeps/linux/frv/__longjmp.S
@@ -4,10 +4,6 @@
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
# setjmp/longjmp for Frv. The jmpbuf looks like this:
#
# Register jmpbuf offset
diff --git a/libc/sysdeps/linux/h8300/bsd-_setjmp.S b/libc/sysdeps/linux/h8300/bsd-_setjmp.S
index e315058a7..fbe702599 100644
--- a/libc/sysdeps/linux/h8300/bsd-_setjmp.S
+++ b/libc/sysdeps/linux/h8300/bsd-_setjmp.S
@@ -1,8 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. H8/300 version. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#ifdef __H8300S__
.h8300s
diff --git a/libc/sysdeps/linux/h8300/bsd-setjmp.S b/libc/sysdeps/linux/h8300/bsd-setjmp.S
index 9c3535503..74ebb8f9a 100644
--- a/libc/sysdeps/linux/h8300/bsd-setjmp.S
+++ b/libc/sysdeps/linux/h8300/bsd-setjmp.S
@@ -1,8 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'. H8/300 version. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#ifdef __H8300S__
.h8300s
diff --git a/libc/sysdeps/linux/h8300/setjmp.S b/libc/sysdeps/linux/h8300/setjmp.S
index 5e487674b..f2795fa54 100644
--- a/libc/sysdeps/linux/h8300/setjmp.S
+++ b/libc/sysdeps/linux/h8300/setjmp.S
@@ -1,6 +1,4 @@
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#ifdef __H8300S__
.h8300s
diff --git a/libc/sysdeps/linux/hppa/__longjmp.S b/libc/sysdeps/linux/hppa/__longjmp.S
index 750863e95..753471158 100644
--- a/libc/sysdeps/linux/hppa/__longjmp.S
+++ b/libc/sysdeps/linux/hppa/__longjmp.S
@@ -17,11 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
/* __longjmp(jmpbuf, val) */
.text
diff --git a/libc/sysdeps/linux/i386/__longjmp.S b/libc/sysdeps/linux/i386/__longjmp.S
index e2809c06c..cc333ea52 100644
--- a/libc/sysdeps/linux/i386/__longjmp.S
+++ b/libc/sysdeps/linux/i386/__longjmp.S
@@ -17,10 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.global __longjmp
.type __longjmp,%function
diff --git a/libc/sysdeps/linux/i386/bsd-_setjmp.S b/libc/sysdeps/linux/i386/bsd-_setjmp.S
index f3cd6cbf6..e79473263 100644
--- a/libc/sysdeps/linux/i386/bsd-_setjmp.S
+++ b/libc/sysdeps/linux/i386/bsd-_setjmp.S
@@ -21,9 +21,7 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.global _setjmp
.type _setjmp,%function
diff --git a/libc/sysdeps/linux/i386/bsd-setjmp.S b/libc/sysdeps/linux/i386/bsd-setjmp.S
index df46997d9..950b1f487 100644
--- a/libc/sysdeps/linux/i386/bsd-setjmp.S
+++ b/libc/sysdeps/linux/i386/bsd-setjmp.S
@@ -17,10 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
.global setjmp
.type setjmp,%function
setjmp:
diff --git a/libc/sysdeps/linux/i386/setjmp.S b/libc/sysdeps/linux/i386/setjmp.S
index 20a6a0bcf..64b15037c 100644
--- a/libc/sysdeps/linux/i386/setjmp.S
+++ b/libc/sysdeps/linux/i386/setjmp.S
@@ -17,11 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
-
.global __sigsetjmp
.type __sigsetjmp,%function
diff --git a/libc/sysdeps/linux/m68k/__longjmp.S b/libc/sysdeps/linux/m68k/__longjmp.S
index 5db9e4362..f80c087e3 100644
--- a/libc/sysdeps/linux/m68k/__longjmp.S
+++ b/libc/sysdeps/linux/m68k/__longjmp.S
@@ -2,10 +2,8 @@
/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
/* This file is released under the LGPL, any version you like */
-#define _ASM
-#define _SETJMP_H
#include <features.h>
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl __longjmp
.type __longjmp,@function
diff --git a/libc/sysdeps/linux/m68k/bsd-_setjmp.S b/libc/sysdeps/linux/m68k/bsd-_setjmp.S
index 0380c3dee..cc472f70d 100644
--- a/libc/sysdeps/linux/m68k/bsd-_setjmp.S
+++ b/libc/sysdeps/linux/m68k/bsd-_setjmp.S
@@ -2,9 +2,7 @@
/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
/* This file is released under the LGPL, any version you like */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl _setjmp;
.type _setjmp,@function
diff --git a/libc/sysdeps/linux/m68k/bsd-setjmp.S b/libc/sysdeps/linux/m68k/bsd-setjmp.S
index fdd7540a6..b41b4c1fd 100644
--- a/libc/sysdeps/linux/m68k/bsd-setjmp.S
+++ b/libc/sysdeps/linux/m68k/bsd-setjmp.S
@@ -2,9 +2,7 @@
/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
/* This file is released under the LGPL, any version you like */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#include "m68k_pic.S"
.globl setjmp;
diff --git a/libc/sysdeps/linux/m68k/setjmp.S b/libc/sysdeps/linux/m68k/setjmp.S
index 4adda0af5..b5bc6e009 100644
--- a/libc/sysdeps/linux/m68k/setjmp.S
+++ b/libc/sysdeps/linux/m68k/setjmp.S
@@ -2,9 +2,7 @@
/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
/* This file is released under the LGPL, any version you like */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#include "m68k_pic.S"
.globl __sigsetjmp;
diff --git a/libc/sysdeps/linux/microblaze/__longjmp.S b/libc/sysdeps/linux/microblaze/__longjmp.S
index c4423bec5..c7fce3435 100644
--- a/libc/sysdeps/linux/microblaze/__longjmp.S
+++ b/libc/sysdeps/linux/microblaze/__longjmp.S
@@ -12,10 +12,6 @@
* Written by Miles Bader <miles@gnu.org>
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <libc-symbols.h>
.text
diff --git a/libc/sysdeps/linux/microblaze/setjmp.S b/libc/sysdeps/linux/microblaze/setjmp.S
index d01c74555..2e1e0d70a 100644
--- a/libc/sysdeps/linux/microblaze/setjmp.S
+++ b/libc/sysdeps/linux/microblaze/setjmp.S
@@ -29,10 +29,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <libc-symbols.h>
.text
diff --git a/libc/sysdeps/linux/nios/__longjmp.S b/libc/sysdeps/linux/nios/__longjmp.S
index d7d1cdd86..2340ecf19 100644
--- a/libc/sysdeps/linux/nios/__longjmp.S
+++ b/libc/sysdeps/linux/nios/__longjmp.S
@@ -16,11 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-
+#include <jmpbuf-offsets.h>
;----------------------------------------
; Name: __longjmp
diff --git a/libc/sysdeps/linux/nios/setjmp.S b/libc/sysdeps/linux/nios/setjmp.S
index c2851461c..4731bb4ce 100644
--- a/libc/sysdeps/linux/nios/setjmp.S
+++ b/libc/sysdeps/linux/nios/setjmp.S
@@ -16,10 +16,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#include "NM_Macros.S"
;----------------------------------------
diff --git a/libc/sysdeps/linux/nios2/__longjmp.S b/libc/sysdeps/linux/nios2/__longjmp.S
index 4b6508e5d..77697731f 100644
--- a/libc/sysdeps/linux/nios2/__longjmp.S
+++ b/libc/sysdeps/linux/nios2/__longjmp.S
@@ -12,9 +12,7 @@
*/
#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl __longjmp
.type __longjmp,@function
diff --git a/libc/sysdeps/linux/nios2/bsd-_setjmp.S b/libc/sysdeps/linux/nios2/bsd-_setjmp.S
index ed4061cd4..ac101bdff 100644
--- a/libc/sysdeps/linux/nios2/bsd-_setjmp.S
+++ b/libc/sysdeps/linux/nios2/bsd-_setjmp.S
@@ -11,9 +11,7 @@
*
*/
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl _setjmp
.type _setjmp,@function
diff --git a/libc/sysdeps/linux/nios2/bsd-setjmp.S b/libc/sysdeps/linux/nios2/bsd-setjmp.S
index ac99bfe0a..aa2e64fd2 100644
--- a/libc/sysdeps/linux/nios2/bsd-setjmp.S
+++ b/libc/sysdeps/linux/nios2/bsd-setjmp.S
@@ -12,9 +12,7 @@
*/
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl setjmp
.type setjmp,@function
diff --git a/libc/sysdeps/linux/nios2/setjmp.S b/libc/sysdeps/linux/nios2/setjmp.S
index 8acd22044..22b52d143 100644
--- a/libc/sysdeps/linux/nios2/setjmp.S
+++ b/libc/sysdeps/linux/nios2/setjmp.S
@@ -12,9 +12,7 @@
*/
#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.globl __sigsetjmp
.type __sigsetjmp,@function
diff --git a/libc/sysdeps/linux/powerpc/__longjmp.S b/libc/sysdeps/linux/powerpc/__longjmp.S
index 765a87315..846eca59b 100644
--- a/libc/sysdeps/linux/powerpc/__longjmp.S
+++ b/libc/sysdeps/linux/powerpc/__longjmp.S
@@ -21,9 +21,7 @@
#include <features.h>
#include "ppc_asm.h"
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
diff --git a/libc/sysdeps/linux/powerpc/setjmp.S b/libc/sysdeps/linux/powerpc/setjmp.S
index 04b06d689..2c53744c7 100644
--- a/libc/sysdeps/linux/powerpc/setjmp.S
+++ b/libc/sysdeps/linux/powerpc/setjmp.S
@@ -21,9 +21,7 @@
#include <features.h>
#include "ppc_asm.h"
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
#define FP(x...) x
diff --git a/libc/sysdeps/linux/sh/__longjmp.S b/libc/sysdeps/linux/sh/__longjmp.S
index eb569917b..b4f2af889 100644
--- a/libc/sysdeps/linux/sh/__longjmp.S
+++ b/libc/sysdeps/linux/sh/__longjmp.S
@@ -17,9 +17,6 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
#include <features.h>
/* __longjmp(jmpbuf, val) */
diff --git a/libc/sysdeps/linux/sh/setjmp.S b/libc/sysdeps/linux/sh/setjmp.S
index 0a81424e1..31d1a35f1 100644
--- a/libc/sysdeps/linux/sh/setjmp.S
+++ b/libc/sysdeps/linux/sh/setjmp.S
@@ -18,9 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
.text
diff --git a/libc/sysdeps/linux/sparc/__longjmp.S b/libc/sysdeps/linux/sparc/__longjmp.S
index c7d4f0794..46619d125 100644
--- a/libc/sysdeps/linux/sparc/__longjmp.S
+++ b/libc/sysdeps/linux/sparc/__longjmp.S
@@ -16,12 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#include <sys/syscall.h>
+#include <jmpbuf-offsets.h>
-#define _ASM 1
-#define _SETJMP_H
-#include <bits/setjmp.h>
#define ENV(base,reg) [%base + (reg * 4)]
#define ST_FLUSH_WINDOWS 3
#define RW_FP [%fp + 0x48]
diff --git a/libc/sysdeps/linux/sparc/setjmp.S b/libc/sysdeps/linux/sparc/setjmp.S
index 796abc763..7b9e4c8f1 100644
--- a/libc/sysdeps/linux/sparc/setjmp.S
+++ b/libc/sysdeps/linux/sparc/setjmp.S
@@ -16,11 +16,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <sys/syscall.h>
+#include <jmpbuf-offsets.h>
-#define _ASM 1
-#define _SETJMP_H
-#include <bits/setjmp.h>
#define ST_FLUSH_WINDOWS 3
.global _setjmp
diff --git a/libc/sysdeps/linux/v850/__longjmp.S b/libc/sysdeps/linux/v850/__longjmp.S
index fa29e0f78..099609918 100644
--- a/libc/sysdeps/linux/v850/__longjmp.S
+++ b/libc/sysdeps/linux/v850/__longjmp.S
@@ -11,11 +11,6 @@
* Written by Miles Bader <miles@gnu.org>
*/
-#include <features.h>
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <clinkage.h>
.text
diff --git a/libc/sysdeps/linux/v850/setjmp.S b/libc/sysdeps/linux/v850/setjmp.S
index 87a5e3833..8bb3649a3 100644
--- a/libc/sysdeps/linux/v850/setjmp.S
+++ b/libc/sysdeps/linux/v850/setjmp.S
@@ -11,10 +11,6 @@
* Written by Miles Bader <miles@gnu.org>
*/
-#define _SETJMP_H
-#define _ASM
-#include <bits/setjmp.h>
-
#include <clinkage.h>
.text
diff --git a/libc/sysdeps/linux/x86_64/__longjmp.S b/libc/sysdeps/linux/x86_64/__longjmp.S
index db2928bf0..4dc329bec 100644
--- a/libc/sysdeps/linux/x86_64/__longjmp.S
+++ b/libc/sysdeps/linux/x86_64/__longjmp.S
@@ -16,10 +16,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
+#include <jmpbuf-offsets.h>
/* Jump to the position specified by ENV, causing the
setjmp call there to return VAL, or 1 if VAL is 0.
diff --git a/libc/sysdeps/linux/x86_64/bsd-setjmp.S b/libc/sysdeps/linux/x86_64/bsd-setjmp.S
index 889efa6ce..8f68f5c62 100644
--- a/libc/sysdeps/linux/x86_64/bsd-setjmp.S
+++ b/libc/sysdeps/linux/x86_64/bsd-setjmp.S
@@ -17,11 +17,6 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-#include <sysdep.h>
-
.global setjmp
.type setjmp,%function
setjmp:
diff --git a/libc/sysdeps/linux/x86_64/setjmp.S b/libc/sysdeps/linux/x86_64/setjmp.S
index 3a0f30b52..68c3e4df1 100644
--- a/libc/sysdeps/linux/x86_64/setjmp.S
+++ b/libc/sysdeps/linux/x86_64/setjmp.S
@@ -17,10 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define _ASM
-#define _SETJMP_H
-#include <bits/setjmp.h>
-#include <sysdep.h>
+#include <jmpbuf-offsets.h>
.global __sigsetjmp
.type __sigsetjmp,%function