The curl configure script wants to take control of the compiler flags for optimization. The actual interactions are more complex, but the gist is that the flags are stripped from CFLAGS, and if --enable-optimize is specified, an approved optimization flag is added. Do not override optimization flags in CFLAGS. Index: m4/curl-compilers.m4 --- m4/curl-compilers.m4.orig +++ m4/curl-compilers.m4 @@ -692,7 +692,7 @@ AC_DEFUN([CURL_SET_COMPILER_OPTIMIZE_OPTS], [ tmp_options="" tmp_CFLAGS="$CFLAGS" tmp_CPPFLAGS="$CPPFLAGS" - honor_optimize_option="yes" + honor_optimize_option="no" # dnl If optimization request setting has not been explicitly specified, dnl it has been derived from the debug setting and initially assumed.