diff --git a/Misc/NEWS.d/next/Build/2020-08-25-19-16-17.bpo-40223.lyyg3t.rst b/Misc/NEWS.d/next/Build/2020-08-25-19-16-17.bpo-40223.lyyg3t.rst new file mode 100644 index 000000000000000..350a9b5da264522 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2020-08-25-19-16-17.bpo-40223.lyyg3t.rst @@ -0,0 +1 @@ +The segmentation fault caused by ICC compiler versions 19.0 and above is fixed by adding the -fwarp flag. \ No newline at end of file diff --git a/configure b/configure index d3e8149bec08bf8..9d345ff49cc106f 100755 --- a/configure +++ b/configure @@ -7572,6 +7572,16 @@ case "$CC" in ;; esac +# -fwrapv for new icc versions +case "$CC" in +*icc*) + icc_version=`icc -dumpversion` + if test ${icc_version} '>' 18.9; then + CFLAGS_NODIST="$CFLAGS_NODIST -fwrapv" + fi + ;; +esac + if test "$assertions" = 'true'; then : else diff --git a/configure.ac b/configure.ac index 6bc8499f7ffe62a..ae6c8ef46b88edd 100644 --- a/configure.ac +++ b/configure.ac @@ -1991,6 +1991,16 @@ case "$CC" in ;; esac +# -fwrapv for new icc versions +case "$CC" in +*icc*) + icc_version=`icc -dumpversion` + if test ${icc_version} '>' 18.9; then + CFLAGS_NODIST="$CFLAGS_NODIST -fwrapv" + fi + ;; +esac + if test "$assertions" = 'true'; then : else