diff --git a/configure b/configure index 9d85e359b1d..de53c09b7e3 100755 --- a/configure +++ b/configure @@ -5504,6 +5504,12 @@ then if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then WRAP="-fwrapv" fi + + # Clang also needs -fwrapv + if test "$CC" = "clang" ; then + WRAP="-fwrapv" + fi + case $ac_cv_prog_cc_g in yes) if test "$Py_DEBUG" = 'true' ; then diff --git a/configure.in b/configure.in index 3e60d8e0165..1bbb559aed3 100644 --- a/configure.in +++ b/configure.in @@ -926,6 +926,12 @@ then if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then WRAP="-fwrapv" fi + + # Clang also needs -fwrapv + if test "$CC" = "clang" ; then + WRAP="-fwrapv" + fi + case $ac_cv_prog_cc_g in yes) if test "$Py_DEBUG" = 'true' ; then