mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36618: Don't add -fmax-type-align flag to old clang (GH-12811)
This commit is contained in:
parent
1e8295402b
commit
a304b136ad
3 changed files with 16 additions and 6 deletions
9
configure
vendored
9
configure
vendored
|
@ -6889,9 +6889,14 @@ then
|
|||
# instead: slower but don't trigger a SIGSEGV if the memory is not aligned
|
||||
# on 16 bytes.
|
||||
#
|
||||
# Sadly, the flag must be expected to CFLAGS and not just CFLAGS_NODIST,
|
||||
# Sadly, the flag must be added to CFLAGS and not just CFLAGS_NODIST,
|
||||
# since third party C extensions can have the same issue.
|
||||
CFLAGS="$CFLAGS -fmax-type-align=8"
|
||||
#
|
||||
# Check if -fmax-type-align flag is supported (it's not supported by old
|
||||
# clang versions):
|
||||
if "$CC" -v --help 2>/dev/null |grep -- -fmax-type-align > /dev/null; then
|
||||
CFLAGS="$CFLAGS -fmax-type-align=8"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue