public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Ian Taylor <iant@golang.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Patch RFA: Top-level configure patch: disable go on systems where it doesn't work
Date: Thu, 23 Oct 2014 15:41:00 -0000	[thread overview]
Message-ID: <54492125.7090408@redhat.com> (raw)
In-Reply-To: <CAOyqgcXsQCtKs7tP7zw+RjqoWJY0VM-JNe4NVCeLYttXTdCLHg@mail.gmail.com>

On 10/23/2014 04:31 PM, Ian Taylor wrote:
> 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.

AFAICS no target in the top level disables go yet, so we
could IMO do the config-lang.in mechanism without moving any of
the existing target checks for other languages.  It'd be a small
change that way.

As bonus, I think you wouldn't need approval for further changes
to the set of go supported systems (though that may not
change often).

My .02c.

> That change sounds fine to me.

Thanks,
Pedro Alves

  reply	other threads:[~2014-10-23 15:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23  6:30 Ian Taylor
2014-10-23 15:31 ` Pedro Alves
2014-10-23 15:35   ` Ian Taylor
2014-10-23 15:41     ` Pedro Alves [this message]
2014-10-23 18:27       ` Ian Taylor
2014-10-23 18:17 ` Jeff Law
2014-10-27 15:07 ` Jan-Benedict Glaw
2014-10-27 15:20   ` Ian Taylor
2014-10-27 16:03     ` Jan-Benedict Glaw
2014-10-27 16:57       ` Ian Taylor
2014-10-30 14:15         ` [PATCH] config-list.mk: Build Go only for supported targets (was: Patch RFA: Top-level configure patch: disable go on systems where it doesn't work) Jan-Benedict Glaw
2014-10-30 15:20           ` Ian Taylor
2014-10-30 19:43             ` Jan-Benedict Glaw
2014-10-31  0:44               ` Ian Taylor
2014-10-31 11:07                 ` Jan-Benedict Glaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54492125.7090408@redhat.com \
    --to=palves@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iant@golang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).