This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFA:] toplevel/configure.in (unsupported_languages): New macro.
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 Jun 2005 23:57:45 +0200
- Subject: [RFA:] toplevel/configure.in (unsupported_languages): New macro.
The CRIS and MMIX config bits serve as an example. There is no
documentation on noconfigdirs, so I'm not adding any for
unsupported_languages either; there is no apparent location for
documentation of the toplevel macros (as opposed to
gcc/doc/sourcebuild.texi for the lang fragments.)
Tested by configuring for cris-axis-elf, cris-axis-aout,
cris-axis-linux-gnu, mmix-knuth-mmixware, i686-pc-cygwin, (native)
i686-pc-linux-gnu and observing the matching informational lib and
lang messages from the configure script.
* configure.in (unsupported_languages): New macro.
<cris-*, crisv32-*, mmix-knuth-mmixware>: Set
unsupported_languages.
<lang_frag loop>: Set add_this_lang=no in the language is in
unsupported_languages.
* configure: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.352
diff -p -c -u -p -r1.352 configure.in
cvs diff: conflicting specifications of output style
--- configure.in 4 Jun 2005 22:30:56 -0000 1.352
+++ configure.in 6 Jun 2005 21:47:12 -0000
@@ -257,6 +257,10 @@ case "${host}" in
configdirs="$configdirs libtermcap" ;;
esac
+# A target can indicate whether a language isn't supported for some reason.
+# Only spaces may be used in this macro; not newlines or tabs.
+unsupported_languages=
+
# Remove more programs from consideration, based on the host or
# target this usually means that a port of the program doesn't
# exist yet.
@@ -481,15 +485,18 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-libgloss ${libgcj} gcc gdb newlib"
;;
cris-*-* | crisv32-*-*)
- libgcj_ex_libffi=`echo ${libgcj} | sed -e 's/target-libffi//'`
+ unsupported_languages="$unsupported_languages java"
case "${target}" in
*-*-aout)
- noconfigdirs="$noconfigdirs ${libgcj}";;
+ unsupported_languages="$unsupported_languages f95"
+ noconfigdirs="$noconfigdirs ${libgcj} target-libgfortran";;
*-*-elf)
- noconfigdirs="$noconfigdirs ${libgcj_ex_libffi}";;
+ unsupported_languages="$unsupported_languages f95"
+ noconfigdirs="$noconfigdirs target-libjava target-boehm-gc target-libgfortran";;
*-*-linux*)
- noconfigdirs="$noconfigdirs ${libgcj_ex_libffi} target-newlib target-libgloss";;
+ noconfigdirs="$noconfigdirs target-libjava target-newlib target-libgloss";;
*)
+ unsupported_languages="$unsupported_languages f95"
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
esac
;;
@@ -640,6 +647,7 @@ case "${target}" in
;;
mmix-*-*)
noconfigdirs="$noconfigdirs ${libgcj} gdb libgloss target-libgfortran"
+ unsupported_languages="$unsupported_languages f95 java"
;;
mn10200-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -1210,7 +1218,14 @@ if test -d ${srcdir}/gcc; then
add_this_lang=no
;;
esac
-
+
+ # Disable a language that is unsupported by the target.
+ case " $unsupported_languages " in
+ *" $language "*)
+ add_this_lang=no
+ ;;
+ esac
+
case $add_this_lang in
no)
# Remove language-dependent dirs.
brgds, H-P