summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-04-28 13:07:10 (GMT)
committerGitHub <noreply@github.com>2017-04-28 13:07:10 (GMT)
commit826f83f1d562a7b878499bc3af2267cfdfe5f2f9 (patch)
treed35096a04bd036d1e807309764002f40d4274f9e /configure.ac
parent5a4e3d8f9c37e700402b23fafbfc413e5ca3113d (diff)
downloadcpython-826f83f1d562a7b878499bc3af2267cfdfe5f2f9.zip
cpython-826f83f1d562a7b878499bc3af2267cfdfe5f2f9.tar.gz
cpython-826f83f1d562a7b878499bc3af2267cfdfe5f2f9.tar.bz2
bpo-30104: Only use -fno-strict-aliasing on dtoa.c (#1340)
On clang, only compile dtoa.c with -fno-strict-aliasing, use strict aliasing to compile all other C files.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 5 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index e5b7257..c58322d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1440,6 +1440,7 @@ esac
# tweak OPT based on compiler and platform, only if the user didn't set
# it on the command line
AC_SUBST(OPT)
+AC_SUBST(CFLAGS_ALIASING)
if test "${OPT-unset}" = "unset"
then
case $GCC in
@@ -1469,13 +1470,9 @@ then
then
# Clang also needs -fwrapv
WRAP="-fwrapv"
-
- # bpo-30104: Python/dtoa.c requires to be build with
- # -fno-strict-aliasing to fix compiler issue on the
- # double/ULong[2] union using clang 4.0 and optimization level
- # -O2 or higher
- # https://bugs.llvm.org//show_bug.cgi?id=31928
- ALIASING="-fno-strict-aliasing"
+ # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
+ # see Makefile.pre.in for more information
+ CFLAGS_ALIASING="-fno-strict-aliasing"
fi
case $ac_cv_prog_cc_g in
@@ -1497,7 +1494,7 @@ then
;;
esac
- OPT="$OPT $STRICT_PROTO $ALIASING"
+ OPT="$OPT $STRICT_PROTO"
case $ac_sys_system in
SCO_SV*) OPT="$OPT -m486 -DSCO5"