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 () {
mkdir -p $SNAKEPIT
mkdir -p $BASE/versions
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
fi
......
......@@ -42,10 +42,16 @@ if [ "$DOCKER_IMAGE" == "quay.io/pypa/manylinux2014_aarch64" -a -n "$GITHUB_ACTI
export CFLAGS="-O1 $GEVENT_WARNFLAGS"
SLOW_ARM=1
else
echo "Compiling with -Ofast"
# Note: -Ofast includes -ffast-math which affects process-wide floating-point flags (e.g. can affect numpy).
# We opt out of -ffast-math explicitly. Other libraries can still trigger it.
export CFLAGS="-Ofast -fno-fast-math $GEVENT_WARNFLAGS"
echo "Compiling with -O3"
# Caution against using -Ofast:
# -Ofast includes -ffast-math which affects process-wide floating-point flags (e.g. can affect numpy).
# -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
# -lrt: Needed for clock_gettime libc support on this version.
# -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