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]

[PATCH] Add --enable-stage1-languages to toplevel


This patch adds a -enable-stage1-languages switch to the toplevel, which works equally well for the old and new bootstrap mechanisms (but is more useful for the new one). The common case where you would use it is when you are developing big middle-/back-end changes and you want a quick way to determine if a failure is due to a front-end miscompilation or to a bug triggered by the testcase.

If you are interested in one or two additional languages, you can specify them as in --enable-stage1-languages=c++,fortran. In addition, --enable-stage1-languages=all will select for stage1 every front-end that you chose for later stages.

Mark, I would like to get this in 4.2, since it can be useful for people currently developing big changes for 4.3 stage1. The patch is pretty simple, and I tested it by inspecting the Makefile for the two --enable-stage1-languages use cases I reported above.

Ok?

Paolo
2006-08-17  Paolo Bonzini  <bonzini@gnu.org>

	* configure.in: Add --enable-stage1-languages, move AC_SUBST
	for stage1_languages where we process it.
	* configure: Regenerate.

Index: configure.in
===================================================================
--- configure.in	(revision 116207)
+++ configure.in	(working copy)
@@ -1127,7 +1127,6 @@ AC_SUBST(gmpinc)
 
 # By default, C is the only stage 1 language.
 stage1_languages=c
-AC_SUBST(stage1_languages)
 
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
@@ -1307,6 +1306,24 @@ Recognised languages are: ${potential_la
   ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[[^ ]]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
 fi
 
+AC_ARG_ENABLE(stage1-languages,
+[  --enable-stage1-languages[=all]   choose additional languages to build during
+                          stage1.  Mostly useful for compiler development.],
+[case ${enable_stage1_languages} in
+  all) stage1_languages="$enable_languages" ;;
+  "") ;;
+  *) for i in `echo $enable_stage1_languages | sed 's/,/ /' `; do
+echo $i
+       case ,$stage1_languages, in
+         *,$i,*) ;;
+         *) stage1_languages="$stage1_languages,$i" ;;
+       esac
+     done
+  ;;
+esac])
+AC_SUBST(stage1_languages)
+
+
 # Handle --disable-<component> generically.
 for dir in $configdirs $build_configdirs $target_configdirs ; do
   dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`

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