OSDN Git Service

2004-03-15 Nathanael Nerode <neroden@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / configure.in
index 6fa3022..a5ba6e2 100644 (file)
@@ -1070,6 +1070,10 @@ fi
 
 ACX_PROG_GNAT
 
+# By default, C is the only stage 1 langauge.
+stage1_languages=c
+AC_SUBST(stage1_languages)
+
 # Figure out what language subdirectories are present.
 # Look if the user specified --enable-languages="..."; if not, use
 # the environment variable $LANGUAGES if defined. $LANGUAGES might
@@ -1132,10 +1136,11 @@ if test -d ${srcdir}/gcc; then
       ${srcdir}/gcc/[[*]]/config-lang.in) ;;
       *)
         # From the config-lang.in, get $language, $target_libs, 
-        # $lang_dirs, and $build_by_default
+        # $lang_dirs, $boot_language, and $build_by_default
         language=
         target_libs=
         lang_dirs=
+        boot_language=
         build_by_default=
         . ${lang_frag}
         # This is quite sensitive to the ordering of the case statement arms.
@@ -1168,10 +1173,18 @@ if test -d ${srcdir}/gcc; then
         case $add_this_lang in
          no)
             # Remove language-dependent dirs.
-            eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\" ;;
+            eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+           ;;
           *)
            new_enable_languages="$new_enable_languages,$language"
-           missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"` ;;
+           missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
+           case ${boot_language} in
+             yes)
+               # Add to (space-separated) list of stage 1 languages.
+               stage1_languages="${stage1_languages} ${language}"
+               ;;
+           esac
+           ;;
         esac
         ;;
     esac
@@ -2184,4 +2197,37 @@ fi
 MAINT=$MAINTAINER_MODE_TRUE
 AC_SUBST(MAINT)dnl
 
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# Stage specific cflags for build.
+stage1_cflags="-g"
+case $build in
+  vax-*-*)
+    case ${GCC} in
+      yes) stage1_cflags="-g -Wa,-J" ;;
+      *) stage1_cflags="-g -J" ;;
+    esac ;;
+  powerpc-*-darwin*)
+    # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
+    # sources; use -no-cpp-precomp to get to GNU cpp.
+    # Apple's GCC has bugs in designated initializer handling, so disable
+    # that too.
+    stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
+    ;;
+esac
+AC_SUBST(stage1_cflags)
+
+# Enable -Werror in bootstrap stage2 and later.
+# Change the default to "no" on release branches.
+AC_ARG_ENABLE(werror,
+[  --enable-werror         enable -Werror in bootstrap stage2 and later], [],
+[enable_werror=yes])
+case ${enable_error} in
+  yes) WERROR=-Werror ;;
+  *) WERROR= ;;
+esac
+AC_SUBST(WERROR)
+
 AC_OUTPUT(Makefile)