Hi Hal

Traced down the double -g -O2 to a bug in the autoconf core.
According to
http://sources.redhat.com/automake/automake.html#Flag-Variables-Ordering
CFLAGS should never be modified by the configure. The intent is that
this variable should allow the user to override any decision made by
the automatic configure flows. 

The bug is that a test made by the core is actually modifying the variable.

I tested the patch on :
2.6.12.3-smp SuSE Linux 9.3 (i586)

Signed-off-by:  Eitan Zahavi <[EMAIL PROTECTED]>

Index: osm/include/configure.in
===================================================================
--- osm/include/configure.in    (revision 3098)
+++ osm/include/configure.in    (working copy)
@@ -34,5 +34,11 @@ AC_CACHE_CHECK(whether ld accepts --vers
 
 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
 
+# we have to revive the env CFALGS as some how they are being overwritten...
+# see http://sources.redhat.com/automake/automake.html#Flag-Variables-Ordering
+# for why they should NEVER be modified by the configure to allow for user 
+# overrides.
+CFLAGS=$ac_env_CFLAGS_value
+
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
Index: osm/libvendor/configure.in
===================================================================
--- osm/libvendor/configure.in  (revision 3098)
+++ osm/libvendor/configure.in  (working copy)
@@ -69,5 +69,11 @@ AC_ARG_ENABLE(debug,
 esac],[debug=false])
 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
 
+# we have to revive the env CFALGS as some how they are being overwritten...
+# see http://sources.redhat.com/automake/automake.html#Flag-Variables-Ordering
+# for why they should NEVER be modified by the configure to allow for user 
+# overrides.
+CFLAGS=$ac_env_CFLAGS_value
+
 AC_CONFIG_FILES([Makefile libosmvendor.spec])
 AC_OUTPUT
Index: osm/complib/configure.in
===================================================================
--- osm/complib/configure.in    (revision 3098)
+++ osm/complib/configure.in    (working copy)
@@ -51,5 +51,12 @@ AC_ARG_ENABLE(debug,
 esac],[debug=false])
 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
 
+# we have to revive the env CFALGS as some how they are being overwritten...
+# see http://sources.redhat.com/automake/automake.html#Flag-Variables-Ordering
+# for why they should NEVER be modified by the configure to allow for user 
+# overrides.
+CFLAGS=$ac_env_CFLAGS_value
+
+
 AC_CONFIG_FILES([Makefile libosmcomp.spec])
 AC_OUTPUT
Index: osm/osmtest/configure.in
===================================================================
--- osm/osmtest/configure.in    (revision 3098)
+++ osm/osmtest/configure.in    (working copy)
@@ -61,5 +61,11 @@ AC_ARG_ENABLE(debug,
 esac],[debug=false])
 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
 
+# we have to revive the env CFALGS as some how they are being overwritten...
+# see http://sources.redhat.com/automake/automake.html#Flag-Variables-Ordering
+# for why they should NEVER be modified by the configure to allow for user 
+# overrides.
+CFLAGS=$ac_env_CFLAGS_value
+
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
Index: osm/opensm/configure.in
===================================================================
--- osm/opensm/configure.in     (revision 3098)
+++ osm/opensm/configure.in     (working copy)
@@ -61,5 +61,11 @@ AC_ARG_ENABLE(debug,
 esac],[debug=false])
 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
 
+# we have to revive the env CFALGS as some how they are being overwritten...
+# see http://sources.redhat.com/automake/automake.html#Flag-Variables-Ordering
+# for why they should NEVER be modified by the configure to allow for user 
+# overrides.
+CFLAGS=$ac_env_CFLAGS_value
+
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT

_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to