Skip to content

[3.12] gh-110820: Make sure processor specific defines are correct for Universal 2 build on macOS (gh-112828) #112864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Include/pymacconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@

#if defined(__APPLE__)

# undef ALIGNOF_MAX_ALIGN_T
# undef SIZEOF_LONG
# undef SIZEOF_LONG_DOUBLE
# undef SIZEOF_PTHREAD_T
# undef SIZEOF_SIZE_T
# undef SIZEOF_TIME_T
Expand All @@ -23,6 +25,7 @@
# undef DOUBLE_IS_BIG_ENDIAN_IEEE754
# undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
# undef HAVE_GCC_ASM_FOR_X87
# undef HAVE_GCC_ASM_FOR_X64

# undef VA_LIST_IS_ARRAY
# if defined(__LP64__) && defined(__x86_64__)
Expand Down Expand Up @@ -80,8 +83,14 @@
#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754
#endif /* __BIG_ENDIAN */

#ifdef __i386__
#if defined(__i386__) || defined(__x86_64__)
# define HAVE_GCC_ASM_FOR_X87
# define ALIGNOF_MAX_ALIGN_T 16
# define HAVE_GCC_ASM_FOR_X64 1
# define SIZEOF_LONG_DOUBLE 16
#else
# define ALIGNOF_MAX_ALIGN_T 8
# define SIZEOF_LONG_DOUBLE 8
#endif


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Make sure the preprocessor definitions for ``ALIGNOF_MAX_ALIGN_T``,
``SIZEOF_LONG_DOUBLE`` and ``HAVE_GCC_ASM_FOR_X64`` are correct for
Universal 2 builds on macOS.