This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch RFA: Top-level configure patch: disable go on systems where it doesn't work
- From: Ian Taylor <iant at golang dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 Oct 2014 08:31:43 -0700
- Subject: Re: Patch RFA: Top-level configure patch: disable go on systems where it doesn't work
- Authentication-results: sourceware.org; auth=none
- References: <CAOyqgcUFmBppk_jDpeO+raujT5P7eNtGrNVH3HbhnSWGRWtbUQ at mail dot gmail dot com> <54491E6E dot 8080407 at redhat dot com>
On Thu, Oct 23, 2014 at 8:27 AM, Pedro Alves <palves@redhat.com> wrote:
>
> I think it'd be better if knowledge specific to subdirs was pushed down to
> the subdirs, rather than being kept in the top level, in the direction
> of how we disable libatomic, libsanitizer, etc. That is, by sourcing
> something in the subdir to get back the info top level needs. With that
> in place, changes to the set of supported hosts/targets/configurations
> no longer needs to be synchronized between the projects that use
> the top-level scripts.
>
> In the specific case of languages, it seems to be we already have such
> a script. E.g.:
>
> # First scan to see if an enabled language requires some other language.
> # We assume that a given config-lang.in will list all the language
> # front ends it requires, even if some are required indirectly.
> for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
> case ${lang_frag} in
>
> Each config-lang.in sets some output variables. For the case of a
> language being unsupported for some reason, we'd declare that
> the lang fragments can specify one more output variable, simply called
> "unsupported", and then in in go's gcc/go/config-lang.in, we'd add:
>
> # Disable the go frontend on systems where it is known to not work.
> case "${target}" in
> *-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
> unsupported=true
> ;;
> esac
>
> Then back in the top level, near where we do:
>
> # Disable languages that need other directories if these aren't available.
> for i in $subdir_requires; do
> test -f "$srcdir/gcc/$i/config-lang.in" && continue
> ...
>
> We'd handle the "unsupported" variable.
My patch was, of course, just building on the existing
unsupported_languages support. You are suggesting that we move that
support from the top level configure script to the language-specific
config-lang.in scripts.
That change sounds fine to me.
Ian