Skip to content

Commit 6537151

Browse files
[3.12] gh-110820: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834)
* gh-110820: Make sure processor specific defines are correct for Universal 2 build on macOS (#112828) A number of processor specific defines are different for x86-64 and arm64, and need to be adjusted in pymacconfig.h. (cherry picked from commit 15a80b1)
1 parent 7e82c62 commit 6537151

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Include/pymacconfig.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
#if defined(__APPLE__)
1212

13+
# undef ALIGNOF_MAX_ALIGN_T
1314
# undef SIZEOF_LONG
15+
# undef SIZEOF_LONG_DOUBLE
1416
# undef SIZEOF_PTHREAD_T
1517
# undef SIZEOF_SIZE_T
1618
# undef SIZEOF_TIME_T
@@ -23,6 +25,7 @@
2325
# undef DOUBLE_IS_BIG_ENDIAN_IEEE754
2426
# undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
2527
# undef HAVE_GCC_ASM_FOR_X87
28+
# undef HAVE_GCC_ASM_FOR_X64
2629

2730
# undef VA_LIST_IS_ARRAY
2831
# if defined(__LP64__) && defined(__x86_64__)
@@ -80,8 +83,14 @@
8083
#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754
8184
#endif /* __BIG_ENDIAN */
8285

83-
#ifdef __i386__
86+
#if defined(__i386__) || defined(__x86_64__)
8487
# define HAVE_GCC_ASM_FOR_X87
88+
# define ALIGNOF_MAX_ALIGN_T 16
89+
# define HAVE_GCC_ASM_FOR_X64 1
90+
# define SIZEOF_LONG_DOUBLE 16
91+
#else
92+
# define ALIGNOF_MAX_ALIGN_T 8
93+
# define SIZEOF_LONG_DOUBLE 8
8594
#endif
8695

8796

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Make sure the preprocessor definitions for ``ALIGNOF_MAX_ALIGN_T``,
2+
``SIZEOF_LONG_DOUBLE`` and ``HAVE_GCC_ASM_FOR_X64`` are correct for
3+
Universal 2 builds on macOS.

0 commit comments

Comments
 (0)