aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-11-09 05:09:49 -0800
committerH.J. Lu <hjl.tools@gmail.com>2017-11-09 05:10:03 -0800
commit8cb5295d3f642af43694ba39bc56c8575380aeb3 (patch)
tree5e8f1ad564128af0daaeb9d54b8b1ce439fab9e4
parent3683b423a4895ecd360fbbe118a027b7c2cf52ec (diff)
downloadglibc-8cb5295d3f642af43694ba39bc56c8575380aeb3.zip
glibc-8cb5295d3f642af43694ba39bc56c8575380aeb3.tar.gz
glibc-8cb5295d3f642af43694ba39bc56c8575380aeb3.tar.bz2
Add jmp_buf-macros.h
Verify that sizes, alignments and field offsets of jmp_buf as well as sigjmp_buf are unchanged regardless how struct __jmp_buf_tag is defined. Since jmp_buf is target specific, jmp_buf-macros.h is added for each Linux target. A new target must provides its own jmp_buf-macros.h. TODO: Hurd needs to provide a jmp_buf-macros.h. Tested with build-many-glibcs.py. * include/setjmp.h [!_ISOMAC]: Include <stddef.h> and <jmp_buf-macros.h>. [!_ISOMAC] (STR_HELPER): New. [!_ISOMAC] (STR): Likewise. [!_ISOMAC] (TEST_SIZE): Likewise. [!_ISOMAC] (TEST_ALIGN): Likewise. [!_ISOMAC] (TEST_OFFSET): Likewise. [!_ISOMAC] Add _Static_assert to check sizes, alignments and field offsets of jmp_buf as well as sigjmp_buf. * sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h: Likewise.
-rw-r--r--ChangeLog42
-rw-r--r--include/setjmp.h34
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h6
26 files changed, 220 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index bc8c473..475945b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,45 @@
+2017-11-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * include/setjmp.h [!_ISOMAC]: Include <stddef.h> and
+ <jmp_buf-macros.h>.
+ [!_ISOMAC] (STR_HELPER): New.
+ [!_ISOMAC] (STR): Likewise.
+ [!_ISOMAC] (TEST_SIZE): Likewise.
+ [!_ISOMAC] (TEST_ALIGN): Likewise.
+ [!_ISOMAC] (TEST_OFFSET): Likewise.
+ [!_ISOMAC] Add _Static_assert to check sizes, alignments and
+ field offsets of jmp_buf as well as sigjmp_buf.
+ * sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h:
+ Likewise.
+ * sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h: Likewise.
+
2017-11-07 Joseph Myers <joseph@codesourcery.com>
* include/float.h
diff --git a/include/setjmp.h b/include/setjmp.h
index c234287..f1b19f5 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -31,6 +31,40 @@ libc_hidden_proto (__sigsetjmp)
# if IS_IN (rtld) && !defined NO_RTLD_HIDDEN
extern __typeof (__sigsetjmp) __sigsetjmp attribute_hidden;
# endif
+
+/* Check jmp_buf sizes, alignments and offsets. */
+# include <stddef.h>
+# include <jmp_buf-macros.h>
+
+# define STR_HELPER(x) #x
+# define STR(x) STR_HELPER(x)
+
+# define TEST_SIZE(type, size) \
+ _Static_assert (sizeof (type) == size, \
+ "size of " #type " != " \
+ STR (size))
+# define TEST_ALIGN(type, align) \
+ _Static_assert (__alignof__ (type) == align , \
+ "align of " #type " != " \
+ STR (align))
+# define TEST_OFFSET(type, member, offset) \
+ _Static_assert (offsetof (type, member) == offset, \
+ "offset of " #member " field of " #type " != " \
+ STR (offset))
+
+/* Check if jmp_buf have the expected sizes. */
+TEST_SIZE (jmp_buf, JMP_BUF_SIZE);
+TEST_SIZE (sigjmp_buf, SIGJMP_BUF_SIZE);
+
+/* Check if jmp_buf have the expected alignments. */
+TEST_ALIGN (jmp_buf, JMP_BUF_ALIGN);
+TEST_ALIGN (sigjmp_buf, SIGJMP_BUF_ALIGN);
+
+/* Check if internal fields in jmp_buf have the expected offsets. */
+TEST_OFFSET (struct __jmp_buf_tag, __mask_was_saved,
+ MASK_WAS_SAVED_OFFSET);
+TEST_OFFSET (struct __jmp_buf_tag, __saved_mask,
+ SAVED_MASK_OFFSET);
#endif
#endif
diff --git a/sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h
new file mode 100644
index 0000000..608a7ad
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/aarch64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 312
+#define SIGJMP_BUF_SIZE 312
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 176
+#define SAVED_MASK_OFFSET 184
diff --git a/sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h
new file mode 100644
index 0000000..b595173
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/alpha/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 272
+#define SIGJMP_BUF_SIZE 272
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 136
+#define SAVED_MASK_OFFSET 144
diff --git a/sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h
new file mode 100644
index 0000000..eb64802
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/arm/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 392
+#define SIGJMP_BUF_SIZE 392
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 256
+#define SAVED_MASK_OFFSET 260
diff --git a/sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h
new file mode 100644
index 0000000..6ede0d6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 304
+#define SIGJMP_BUF_SIZE 304
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 168
+#define SAVED_MASK_OFFSET 172
diff --git a/sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h
new file mode 100644
index 0000000..554bbed
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 156
+#define SIGJMP_BUF_SIZE 156
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 24
+#define SAVED_MASK_OFFSET 28
diff --git a/sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h
new file mode 100644
index 0000000..4178865
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/ia64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 704
+#define SIGJMP_BUF_SIZE 704
+#define JMP_BUF_ALIGN 16
+#define SIGJMP_BUF_ALIGN 16
+#define MASK_WAS_SAVED_OFFSET 560
+#define SAVED_MASK_OFFSET 568
diff --git a/sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h
new file mode 100644
index 0000000..2f62ecb
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 288
+#define SIGJMP_BUF_SIZE 288
+#define JMP_BUF_ALIGN 2
+#define SIGJMP_BUF_ALIGN 2
+#define MASK_WAS_SAVED_OFFSET 156
+#define SAVED_MASK_OFFSET 160
diff --git a/sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h
new file mode 100644
index 0000000..9c435f7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/microblaze/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 216
+#define SIGJMP_BUF_SIZE 216
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 84
+#define SAVED_MASK_OFFSET 88
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h
new file mode 100644
index 0000000..d46d69e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 240
+#define SIGJMP_BUF_SIZE 240
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 104
+#define SAVED_MASK_OFFSET 108
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h
new file mode 100644
index 0000000..ed0f123
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 288
+#define SIGJMP_BUF_SIZE 288
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 152
+#define SAVED_MASK_OFFSET 156
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h
new file mode 100644
index 0000000..38b5b06
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 304
+#define SIGJMP_BUF_SIZE 304
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 168
+#define SAVED_MASK_OFFSET 176
diff --git a/sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h
new file mode 100644
index 0000000..1cb9cab
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/nios2/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 172
+#define SIGJMP_BUF_SIZE 172
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 40
+#define SAVED_MASK_OFFSET 44
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h
new file mode 100644
index 0000000..11b0a8b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 592
+#define SIGJMP_BUF_SIZE 592
+#define JMP_BUF_ALIGN 16
+#define SIGJMP_BUF_ALIGN 16
+#define MASK_WAS_SAVED_OFFSET 448
+#define SAVED_MASK_OFFSET 452
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h
new file mode 100644
index 0000000..d3e0d4e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 656
+#define SIGJMP_BUF_SIZE 656
+#define JMP_BUF_ALIGN 16
+#define SIGJMP_BUF_ALIGN 16
+#define MASK_WAS_SAVED_OFFSET 512
+#define SAVED_MASK_OFFSET 520
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h
new file mode 100644
index 0000000..0f29ff9
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 188
+#define SIGJMP_BUF_SIZE 188
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 56
+#define SAVED_MASK_OFFSET 60
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h
new file mode 100644
index 0000000..4e5f348
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 280
+#define SIGJMP_BUF_SIZE 280
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 144
+#define SAVED_MASK_OFFSET 152
diff --git a/sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h
new file mode 100644
index 0000000..b2bc30d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sh/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 192
+#define SIGJMP_BUF_SIZE 192
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 60
+#define SAVED_MASK_OFFSET 64
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h
new file mode 100644
index 0000000..388533f
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 144
+#define SIGJMP_BUF_SIZE 144
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 12
+#define SAVED_MASK_OFFSET 16
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h
new file mode 100644
index 0000000..e86afd7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 640
+#define SIGJMP_BUF_SIZE 640
+#define JMP_BUF_ALIGN 16
+#define SIGJMP_BUF_ALIGN 16
+#define MASK_WAS_SAVED_OFFSET 496
+#define SAVED_MASK_OFFSET 504
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h
new file mode 100644
index 0000000..eb64802
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 392
+#define SIGJMP_BUF_SIZE 392
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 256
+#define SAVED_MASK_OFFSET 260
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h
new file mode 100644
index 0000000..685f9b8
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 392
+#define SIGJMP_BUF_SIZE 392
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 256
+#define SAVED_MASK_OFFSET 264
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h
new file mode 100644
index 0000000..411e62a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 260
+#define SIGJMP_BUF_SIZE 260
+#define JMP_BUF_ALIGN 4
+#define SIGJMP_BUF_ALIGN 4
+#define MASK_WAS_SAVED_OFFSET 128
+#define SAVED_MASK_OFFSET 132
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h
new file mode 100644
index 0000000..3ae63ab
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/64/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 200
+#define SIGJMP_BUF_SIZE 200
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 64
+#define SAVED_MASK_OFFSET 72
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h
new file mode 100644
index 0000000..2fa8e9e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/jmp_buf-macros.h
@@ -0,0 +1,6 @@
+#define JMP_BUF_SIZE 200
+#define SIGJMP_BUF_SIZE 200
+#define JMP_BUF_ALIGN 8
+#define SIGJMP_BUF_ALIGN 8
+#define MASK_WAS_SAVED_OFFSET 64
+#define SAVED_MASK_OFFSET 68