Commit 950562d2 authored by ento's avatar ento Committed by Jason Madden

Truly disable the effect of -Ofast/-ffast-math

parent a948baef
...@@ -63,7 +63,8 @@ install () { ...@@ -63,7 +63,8 @@ install () {
mkdir -p $SNAKEPIT mkdir -p $SNAKEPIT
mkdir -p $BASE/versions mkdir -p $BASE/versions
update_pyenv $VERSION update_pyenv $VERSION
# -Ofast makes the build take too long and times out Travis. # -Ofast makes the build take too long and times out Travis. It also affects
# process-wide floating-point flags - see: scripts/releases/make-manylinux
CFLAGS="-O1 -pipe -march=native" $BASE/pyenv/plugins/python-build/bin/python-build $VERSION $DESTINATION CFLAGS="-O1 -pipe -march=native" $BASE/pyenv/plugins/python-build/bin/python-build $VERSION $DESTINATION
fi fi
......
...@@ -42,10 +42,16 @@ if [ "$DOCKER_IMAGE" == "quay.io/pypa/manylinux2014_aarch64" -a -n "$GITHUB_ACTI ...@@ -42,10 +42,16 @@ if [ "$DOCKER_IMAGE" == "quay.io/pypa/manylinux2014_aarch64" -a -n "$GITHUB_ACTI
export CFLAGS="-O1 $GEVENT_WARNFLAGS" export CFLAGS="-O1 $GEVENT_WARNFLAGS"
SLOW_ARM=1 SLOW_ARM=1
else else
echo "Compiling with -Ofast" echo "Compiling with -O3"
# Note: -Ofast includes -ffast-math which affects process-wide floating-point flags (e.g. can affect numpy). # Caution against using -Ofast:
# We opt out of -ffast-math explicitly. Other libraries can still trigger it. # -Ofast includes -ffast-math which affects process-wide floating-point flags (e.g. can affect numpy).
export CFLAGS="-Ofast -fno-fast-math $GEVENT_WARNFLAGS" # -fno-fast-math disables *some* features of -ffast-math, but as long as -Ofast is specified,
# it still affects floating-point flags:
# https://github.com/gcc-mirror/gcc/blob/releases/gcc-11.2.0/gcc/config/i386/gnu-user-common.h#L50
#
# We *could* turn on other flags that are included in -Ofast individually, but for gevent's usecase, it's not
# a priority to enable aggressive optimizations at the expense of possibly violating language standards.
export CFLAGS="-O3 $GEVENT_WARNFLAGS"
fi fi
# -lrt: Needed for clock_gettime libc support on this version. # -lrt: Needed for clock_gettime libc support on this version.
# -pthread: Needed for pthread_atfork (cffi). # -pthread: Needed for pthread_atfork (cffi).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment