Issue #11149: recent versions of clang require the -fwrapv flag.
diff --git a/configure.in b/configure.in
index 3e60d8e..1bbb559 100644
--- a/configure.in
+++ b/configure.in
@@ -926,6 +926,12 @@
         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