This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcc-in-cxx] Fix top-level configury


I committed this patch to the gcc-in-cxx branch.  This fixes the
top-level configury to not think the c++ is missing because it was
explicitly enabled.  It also comments out some code which added
-fkeep-inlin-functions to stage 1.  When building with C++ this breaks
the inline functions which are provided by <gmp.h>, as they wind up
getting included in many .o files leading to duplicate definition
errors at link time.

Ian


2009-01-30  Ian Lance Taylor  <iant@google.com>

	* configure.ac: Don't add c++ to missing_languages.  Don't use
	-fkeep-inline-functions.
	* configure: Rebuild.


Index: configure.ac
===================================================================
--- configure.ac	(revision 143118)
+++ configure.ac	(working copy)
@@ -1484,7 +1484,7 @@ if test -d ${srcdir}/gcc; then
   done
 
   new_enable_languages=,c,c++,
-  missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
+  missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ -e s/,c++,/,/ `
   potential_languages=,c,c++,
 
   for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
@@ -2873,24 +2873,24 @@ case $build in
 esac
 
 # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
-if test "$GCC" = yes; then
-  saved_CFLAGS="$CFLAGS"
-
-  # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
-  CFLAGS="$CFLAGS -fkeep-inline-functions"
-  AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
-  AC_TRY_COMPILE([
-#if (__GNUC__ < 3) \
-    || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
-			  || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
-#error http://gcc.gnu.org/PR29382
-#endif
-    ],,
-    [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
-    [AC_MSG_RESULT([no])])
-
-  CFLAGS="$saved_CFLAGS"
-fi
+#if test "$GCC" = yes; then
+#  saved_CFLAGS="$CFLAGS"
+#
+#  # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
+#  CFLAGS="$CFLAGS -fkeep-inline-functions"
+#  AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
+#  AC_TRY_COMPILE([
+##if (__GNUC__ < 3) \
+#    || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
+#			  || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
+##error http://gcc.gnu.org/PR29382
+##endif
+#    ],,
+#    [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
+#    [AC_MSG_RESULT([no])])
+#
+#  CFLAGS="$saved_CFLAGS"
+#fi
 
 AC_SUBST(stage1_cflags)
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]