apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r421812 - /apr/apr/trunk/build/apr_hints.m4
Date Fri, 14 Jul 2006 06:12:02 GMT
Author: jerenkrantz
Date: Thu Jul 13 23:12:01 2006
New Revision: 421812

URL: http://svn.apache.org/viewvc?rev=421812&view=rev
Log:
Help protect the user from bad gcc optimizations on mingw.

Modified:
    apr/apr/trunk/build/apr_hints.m4

Modified: apr/apr/trunk/build/apr_hints.m4
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apr_hints.m4?rev=421812&r1=421811&r2=421812&view=diff
==============================================================================
--- apr/apr/trunk/build/apr_hints.m4 (original)
+++ apr/apr/trunk/build/apr_hints.m4 Thu Jul 13 23:12:01 2006
@@ -423,6 +423,17 @@
 	APR_ADDTO(CPPFLAGS, [-DCYGWIN])
 	;;
     *mingw*)
+	dnl gcc (3.4.2 at least) seems to mis-optimize at levels greater than
+	dnl -O0 producing link-time errors.  The user can override by
+	dnl explicitly passing a CFLAGS value to configure.
+	dnl 
+	dnl Example error messages:
+	dnl undefined reference to 'libmsvcrt_a_iname'
+	dnl undefined reference to '_nm___pctype'
+	if test "$ac_test_CFLAGS" != set; then
+		APR_REMOVEFROM(CFLAGS,-O2)
+		APR_ADDTO(CFLAGS,-O0)
+	fi
 	APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console])
 	APR_SETIFNULL(apr_lock_method, [win32])
 	APR_SETIFNULL(have_unicode_fs, [1])



Mime
View raw message