This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gccgo] Check for lang_requires_boot_language
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 29 Oct 2010 16:13:59 -0700
- Subject: [gccgo] Check for lang_requires_boot_language
This patch to the top level configure.ac adds a test for whether any
config-lang.in sets lang_requires_boot_language. If an enabled language
sets this shell variable, then the specified language(s) are added as
languages to be built in stage 1.
This patch then removes the special case making c++ a boot language if
Go is enabled, as that case is now handled by the above.
Committed to gccgo branch.
Ian
Index: configure.ac
===================================================================
--- configure.ac (revision 166055)
+++ configure.ac (working copy)
@@ -1865,9 +1865,11 @@ if test -d ${srcdir}/gcc; then
# an apparent bug in bash 1.12 on linux.
${srcdir}/gcc/[[*]]/config-lang.in) ;;
*)
- # From the config-lang.in, get $language, $lang_requires
+ # From the config-lang.in, get $language, $lang_requires, and
+ # $lang_requires_boot_language.
language=
lang_requires=
+ lang_requires_boot_language=
. ${lang_frag}
for other in ${lang_requires} ; do
case ,${enable_languages}, in
@@ -1879,6 +1881,22 @@ if test -d ${srcdir}/gcc; then
;;
esac
done
+ for other in ${lang_requires_boot_language} ; do
+ if test "$other" != "c"; then
+ case ,${enable_stage1_languages}, in
+ *,$other,*) ;;
+ *,all,*) ;;
+ *)
+ case ,${enable_languages}, in
+ *,$language,*)
+ echo " '$other' language required by '$language' in stage 1; enabling" 1>&2
+ enable_stage1_languages="$enable_stage1_languages,${other}"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
;;
esac
done
@@ -1928,16 +1946,6 @@ if test -d ${srcdir}/gcc; then
boot_language=yes
fi
- # FIXME: A general mechanism for specifying the language of a
- # frontend would be nice.
- case ,${enable_languages}, in
- *,go,*)
- if test "$language" = "c++"; then
- boot_language=yes
- fi
- ;;
- esac
-
case ,${enable_languages}, in
*,${language},*)
# Language was explicitly selected; include it.
Index: configure
===================================================================
--- configure (revision 166055)
+++ configure (working copy)
@@ -6763,9 +6763,11 @@ if test -d ${srcdir}/gcc; then
# an apparent bug in bash 1.12 on linux.
${srcdir}/gcc/[*]/config-lang.in) ;;
*)
- # From the config-lang.in, get $language, $lang_requires
+ # From the config-lang.in, get $language, $lang_requires, and
+ # $lang_requires_boot_language.
language=
lang_requires=
+ lang_requires_boot_language=
. ${lang_frag}
for other in ${lang_requires} ; do
case ,${enable_languages}, in
@@ -6777,6 +6779,22 @@ if test -d ${srcdir}/gcc; then
;;
esac
done
+ for other in ${lang_requires_boot_language} ; do
+ if test "$other" != "c"; then
+ case ,${enable_stage1_languages}, in
+ *,$other,*) ;;
+ *,all,*) ;;
+ *)
+ case ,${enable_languages}, in
+ *,$language,*)
+ echo " '$other' language required by '$language' in stage 1; enabling" 1>&2
+ enable_stage1_languages="$enable_stage1_languages,${other}"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
;;
esac
done
@@ -6826,16 +6844,6 @@ if test -d ${srcdir}/gcc; then
boot_language=yes
fi
- # FIXME: A general mechanism for specifying the language of a
- # frontend would be nice.
- case ,${enable_languages}, in
- *,go,*)
- if test "$language" = "c++"; then
- boot_language=yes
- fi
- ;;
- esac
-
case ,${enable_languages}, in
*,${language},*)
# Language was explicitly selected; include it.