This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Adding Python as a possible language and it's usage
- From: Michael Matz <matz at suse dot de>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Fri, 27 Jul 2018 14:19:45 +0000 (UTC)
- Subject: Re: [RFC] Adding Python as a possible language and it's usage
- References: <a9d62363-4a0f-88f6-2346-4dcb3bebfaa5@suse.cz>
Hi,
On Tue, 17 Jul 2018, Martin Liška wrote:
> 1) gcc/optc-save-gen.awk is full of copy&pasted code, due to lack of flags type classes multiple
> global variables are created (var_opt_char, var_opt_string, ...)
>
> 2) similar happens in gcc/opth-gen.awk
>
> 3) we do very many regex matches (mainly in gcc/opt-functions.awk), I believe
> we should come up with a structured option format that will make parsing and
> processing much simpler.
>
> 4) we can come up with new sanity checks of options:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81397
>
> 5) there are various targets that generate *.opt files, one example is ARM:
> gcc/config/arm/parsecpu.awk
>
> where transforms:
> ./gcc/config/arm/arm-cpus.in
>
> I guess having a well-defined structured format for *.opt files will make
> it easier to write generated opt files?
>
> I'm attaching a prototype that can transform optionlist into options-save.c
> that can be compiled and works.
>
> I'm looking forward to a feedback.
Using any python scripts as part of generally building GCC (i.e. where the
generated files aren't prepackaged) will introduce a python dependency for
distro packages. And for those distros that bootstrap a core cycle of
packages (e.g. *SUSE) this will include python (and all its dependencies)
into that bootstrap cycle.
That will be terrible.
Ciao,
Michael.