This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libstdc++] Un-precious the CC-related variables (was Re: autoconf 2.57 & setting of CC)
- From: Phil Edwards <phil at jaj dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: rsandifo at redhat dot com, libstdc++ at gcc dot gnu dot org, aj at suse dot de, ghazi at caip dot rutgers dot edu
- Date: Mon, 11 Aug 2003 01:56:43 -0400
- Subject: [libstdc++] Un-precious the CC-related variables (was Re: autoconf 2.57 & setting of CC)
Folks are finding that we have to remove the "precious variable" protection
from CC, like I did with CXX et al. This should help with the multilibs
problems until multilibs get moved to the top level, although I don't have
x86_64 or irix systems to verify that.
2003-08-11 Phil Edwards <pme@gcc.gnu.org>
* acinclude.m4 (GLIBCXX_CONFIGURE): Unprecious CC and CFLAGS
when calling AC_PROG_CC.
* aclocal.m4, configure: Regenerate.
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.261
diff -u -3 -p -r1.261 acinclude.m4
--- acinclude.m4 11 Aug 2003 05:26:43 -0000 1.261
+++ acinclude.m4 11 Aug 2003 05:54:22 -0000
@@ -88,8 +88,6 @@ AC_DEFUN(GLIBCXX_CONFIGURE, [
AC_HELP_STRING([--with-newlib],
[assume newlib as a system C library]))
- AC_PROG_CC
-
# We're almost certainly being configured before anything else which uses
# C++, so all of our AC_PROG_* discoveries will be cached. It's vital that
# we not cache the value of CXX that we "discover" here, because it's set
@@ -102,7 +100,7 @@ AC_DEFUN(GLIBCXX_CONFIGURE, [
# wrong (non-multilib-adjusted) value will be used in multilibs. This
# little trick also affects CPPFLAGS, CXXFLAGS, and LDFLAGS. And as a side
# effect, CXXFLAGS is no longer automagically subst'd, so we have to do
- # that ourselves.
+ # that ourselves. Un-preciousing AC_PROG_CC also affects CC and CFLAGS.
#
# -fno-builtin must be present here so that a non-conflicting form of
# std::exit can be guessed by AC_PROG_CXX, and used in later tests.
@@ -112,9 +110,11 @@ AC_DEFUN(GLIBCXX_CONFIGURE, [
m4_define([_AC_ARG_VAR_PRECIOUS],[])
save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-builtin"
+ AC_PROG_CC
AC_PROG_CXX
CXXFLAGS="$save_CXXFLAGS"
m4_rename([glibcxx_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
+ AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
# For directory versioning (e.g., headers) and other variables.