Re: [RFC] Adding Python as a possible language and it's usage

2018-07-30 Thread Andreas Schwab
On Jul 30 2018, Joseph Myers wrote: > Python has been used for some glibc tests for some time. Using it for tests is ok, since they are not part of the bootstrap cycle. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-30 Thread Joseph Myers
On Sat, 28 Jul 2018, Ramana Radhakrishnan wrote: > > Obviously if you're bootstrapping core packages and their build > > dependencies, use in glibc is more or less equivalent to use in GCC. (But > > if build dependencies include those involved in testing, you already have > > python as one for gl

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-30 Thread Joseph Myers
On Fri, 27 Jul 2018, Paul Smith wrote: > If Perl is already in the bootstrap set and the awk scripts are hard to > maintain then why can't the awk scripts be rewritten in Perl instead of > Python? That would avoid adding more prerequisites and surely Perl is > sufficiently expressive that it can

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-28 Thread David Malcolm
On Sat, 2018-07-28 at 10:55 +0100, Ramana Radhakrishnan wrote: > On Fri, Jul 27, 2018 at 3:38 PM, Joseph Myers m> wrote: > > On Fri, 27 Jul 2018, Michael Matz wrote: > > > > > Using any python scripts as part of generally building GCC (i.e. > > > where the > > > generated files aren't prepackaged

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-28 Thread Ramana Radhakrishnan
On Fri, Jul 27, 2018 at 3:38 PM, Joseph Myers wrote: > On Fri, 27 Jul 2018, Michael Matz wrote: > >> 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 t

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread Matthias Klose
On 27.07.2018 16:31, Michael Matz wrote: > Hi, > > On Fri, 27 Jul 2018, Michael Matz wrote: > >> 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 th

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread konsolebox
Just another user here. I'm not a fan of Python and I don't want it added as a dependency to my favorite compiler. If I would build a minimal system with a toolchain, I wouldn't want Python to be a mandatory component, so please don't. Thanks. P.S. I don't mind Perl. It's a legacy tool next to Aw

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread Paul Smith
On Fri, 2018-07-27 at 14:53 +, Michael Matz wrote: > perl is currently included in the bootstrap set. There's no reason > why python couldn't be included as well, If Perl is already in the bootstrap set and the awk scripts are hard to maintain then why can't the awk scripts be rewritten in Pe

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread Michael Matz
Hi, On Fri, 27 Jul 2018, Joseph Myers wrote: > I would have expected most concerns to be about builds on non-GNU hosts - > not about builds on GNU/Linux where Python is generally already available > (and differences in Python versions should definitely *not* affect the > generated output, so t

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread Joseph Myers
On Fri, 27 Jul 2018, Michael Matz wrote: > 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) thi

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread Michael Matz
Hi, On Fri, 27 Jul 2018, Michael Matz wrote: > 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

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-27 Thread Michael Matz
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 (

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-23 Thread Joseph Myers
On Wed, 18 Jul 2018, David Malcolm wrote: > Python 3.3 reintroduced the 'u' prefix for unicode string literals (PEP > 414), which makes it much easier to write scripts that work with both > 2.* and 3.*. Python 3.3 is almost 6 years old. I can't see u'' as of any relevance to .opt parsing. Both

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-23 Thread Joseph Myers
On Tue, 17 Jul 2018, Martin Liška wrote: > I've recently touched AWK option generate machinery and it's quite > unpleasant to make any adjustments. My question is simple: can we > starting using a scripting language like Python and replace usage of the > AWK scripts? It's probably question for

RE: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Konovalov, Vadim
> From: Matthias Klose > To: Konovalov, Vadim; Segher Boessenkool; > On 20.07.2018 20:53, Konovalov, Vadim wrote: > > Sometimes those are not behind, those could have no python for other > > reasons - > > maybe those are too forward? They just don't have python yet? > > > >>> it is straightforw

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Matthias Klose
On 20.07.2018 20:53, Konovalov, Vadim wrote: >> From: Segher Boessenkool >> On Fri, Jul 20, 2018 at 12:54:36PM -0400, Paul Koning wrote: > Fully agree with that. Coming up with a new scripts written in python2 > really > makes no sense. Then python cannot be a build requireme

RE: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Konovalov, Vadim
> From: Segher Boessenkool > On Fri, Jul 20, 2018 at 12:54:36PM -0400, Paul Koning wrote: > > >> Fully agree with that. Coming up with a new scripts written in python2 > > >> really > > >> makes no sense. > > > > > > Then python cannot be a build requirement for GCC, since some of our > > > prima

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Segher Boessenkool
On Fri, Jul 20, 2018 at 12:54:36PM -0400, Paul Koning wrote: > > > > On Jul 20, 2018, at 12:37 PM, Segher Boessenkool > > wrote: > > > > On Fri, Jul 20, 2018 at 11:49:05AM +0200, Martin Liška wrote: > >> Fully agree with that. Coming up with a new scripts written in python2 > >> really > >> m

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Paul Koning
> On Jul 20, 2018, at 12:37 PM, Segher Boessenkool > wrote: > > On Fri, Jul 20, 2018 at 11:49:05AM +0200, Martin Liška wrote: >> Fully agree with that. Coming up with a new scripts written in python2 really >> makes no sense. > > Then python cannot be a build requirement for GCC, since some

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Segher Boessenkool
On Fri, Jul 20, 2018 at 11:49:05AM +0200, Martin Liška wrote: > Fully agree with that. Coming up with a new scripts written in python2 really > makes no sense. Then python cannot be a build requirement for GCC, since some of our primary targets do not ship python3. Segher

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Martin Liška
On 07/18/2018 08:03 PM, Matthias Klose wrote: > On 18.07.2018 19:29, Paul Koning wrote: >> >> >>> On Jul 18, 2018, at 1:22 PM, Boris Kolpackov >>> wrote: >>> >>> Paul Koning writes: >>> > On Jul 18, 2018, at 11:13 AM, Boris Kolpackov > wrote: > > I wonder what will be the expec

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Martin Liška
On 07/19/2018 10:20 PM, Karsten Merker wrote: > David Malcolm wrote: >> On Tue, 2018-07-17 at 14:49 +0200, Martin Liška wrote: >>> I've recently touched AWK option generate machinery and it's >>> quite unpleasant to make any adjustments. My question is >>> simple: can we starting using a scripting

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Martin Liška
On 07/19/2018 04:47 PM, Jeff Law wrote: > On 07/18/2018 03:28 PM, Segher Boessenkool wrote: >> On Wed, Jul 18, 2018 at 11:51:36AM +0200, Richard Biener wrote: >>> We already conditionally require Perl for building for some targets so I >>> wonder >>> if using perl would be better ... >> >> At leas

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Matthias Klose
On 19.07.2018 22:20, Karsten Merker wrote: > David Malcolm wrote: >> On Tue, 2018-07-17 at 14:49 +0200, Martin Liška wrote: >>> I've recently touched AWK option generate machinery and it's >>> quite unpleasant to make any adjustments. My question is >>> simple: can we starting using a scripting la

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-20 Thread Martin Liška
On 07/18/2018 04:29 PM, Matthias Klose wrote: > On 18.07.2018 14:49, Joel Sherrill wrote: >> On Wed, Jul 18, 2018, 7:15 AM Jonathan Wakely wrote: >> >>> On Wed, 18 Jul 2018 at 13:06, Eric S. Raymond wrote: Jonathan Wakely : > On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: >>

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Michael Clark
On 20/07/2018, at 4:12 AM, Richard Earnshaw (lists) mailto:richard.earns...@arm.com>> wrote: > On 19/07/18 12:30, Florian Weimer wrote: >> * Segher Boessenkool: >> >>> What would the advantage of using Python be? I haven't heard any yet. >>> Awk may be a bit clunky but at least it is easily r

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Karsten Merker
David Malcolm wrote: >On Tue, 2018-07-17 at 14:49 +0200, Martin Liška wrote: >> I've recently touched AWK option generate machinery and it's >> quite unpleasant to make any adjustments. My question is >> simple: can we starting using a scripting language like Python >> and replace usage of the AWK

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Richard Earnshaw (lists)
On 19/07/18 12:30, Florian Weimer wrote: > * Segher Boessenkool: > >> What would the advantage of using Python be? I haven't heard any yet. >> Awk may be a bit clunky but at least it is easily readable for anyone. > > I'm not an experienced awk programmer, but I don't think plain awk > supports

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Eric Gallager
On 7/19/18, Jeff Law wrote: > On 07/18/2018 03:28 PM, Segher Boessenkool wrote: >> On Wed, Jul 18, 2018 at 11:51:36AM +0200, Richard Biener wrote: >>> We already conditionally require Perl for building for some targets so I >>> wonder >>> if using perl would be better ... >> >> At least perl is GP

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Jeff Law
On 07/18/2018 03:28 PM, Segher Boessenkool wrote: > On Wed, Jul 18, 2018 at 11:51:36AM +0200, Richard Biener wrote: >> We already conditionally require Perl for building for some targets so I >> wonder >> if using perl would be better ... > > At least perl is GPL (Python is not). > > > What wou

RE: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Konovalov, Vadim
Boris Kolpackov wrote: > From: Paul Koning > > I wonder what will be the expected way to obtain a suitable version of > > Python if one is not available on the build machine? With awk I can > > build it from source pretty much anywhere. Is building newer versions > > of Python on older targets

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-19 Thread Florian Weimer
* Segher Boessenkool: > What would the advantage of using Python be? I haven't heard any yet. > Awk may be a bit clunky but at least it is easily readable for anyone. I'm not an experienced awk programmer, but I don't think plain awk supports arrays of arrays, so there's really no good way to em

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Segher Boessenkool
On Wed, Jul 18, 2018 at 11:51:36AM +0200, Richard Biener wrote: > We already conditionally require Perl for building for some targets so I > wonder > if using perl would be better ... At least perl is GPL (Python is not). What would the advantage of using Python be? I haven't heard any yet. Aw

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Eric S. Raymond
Jonathan Wakely : > I don't see any mention of avoiding dict comprehensions (not supported > until 2.7, so unusable on RHEL6/CentOS6 and SLES 11). That is correct. The HOWTO introduction does say that its techniques won't guarantee 2.6 compatibility. That would have been a great deal more difficu

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Matthias Klose
On 18.07.2018 19:29, Paul Koning wrote: > > >> On Jul 18, 2018, at 1:22 PM, Boris Kolpackov wrote: >> >> Paul Koning writes: >> On Jul 18, 2018, at 11:13 AM, Boris Kolpackov wrote: I wonder what will be the expected way to obtain a suitable version of Python if one is

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Paul Koning
> On Jul 18, 2018, at 1:22 PM, Boris Kolpackov wrote: > > Paul Koning writes: > >>> On Jul 18, 2018, at 11:13 AM, Boris Kolpackov >>> wrote: >>> >>> I wonder what will be the expected way to obtain a suitable version of >>> Python if one is not available on the build machine? With awk I c

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Boris Kolpackov
Paul Koning writes: > > On Jul 18, 2018, at 11:13 AM, Boris Kolpackov > > wrote: > > > > I wonder what will be the expected way to obtain a suitable version of > > Python if one is not available on the build machine? With awk I can > > build it from source pretty much anywhere. Is building newe

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Paul Koning
> On Jul 18, 2018, at 11:13 AM, Boris Kolpackov wrote: > > On Tue, 2018-07-17 at 14:49 +0200, Martin Liška wrote: > >> My question is simple: can we starting using a scripting language like >> Python and replace usage of the AWK scripts? > > I wonder what will be the expected way to obtain a

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread doark
On Tue, 17 Jul 2018 20:23:36 -0400 David Malcolm wrote: > On Tue, 2018-07-17 at 16:37 -0400, David Niklas wrote: > > > Hi. > > > > > > I've recently touched AWK option generate machinery and it's quite > > > unpleasant to make any adjustments. My question is simple: can we > > > starting using a

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Boris Kolpackov
On Tue, 2018-07-17 at 14:49 +0200, Martin Liška wrote: > My question is simple: can we starting using a scripting language like > Python and replace usage of the AWK scripts? I wonder what will be the expected way to obtain a suitable version of Python if one is not available on the build machine

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Janne Blomqvist
On Wed, Jul 18, 2018 at 5:29 PM, Matthias Klose wrote: > On 18.07.2018 14:49, Joel Sherrill wrote: > > On Wed, Jul 18, 2018, 7:15 AM Jonathan Wakely > wrote: > > > >> On Wed, 18 Jul 2018 at 13:06, Eric S. Raymond wrote: > >>> > >>> Jonathan Wakely : > On Wed, 18 Jul 2018 at 11:56, David Mal

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Matthias Klose
On 18.07.2018 14:49, Joel Sherrill wrote: > On Wed, Jul 18, 2018, 7:15 AM Jonathan Wakely wrote: > >> On Wed, 18 Jul 2018 at 13:06, Eric S. Raymond wrote: >>> >>> Jonathan Wakely : On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: > Python 2.6 onwards is broadly compatible with Python 3

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Joel Sherrill
On Wed, Jul 18, 2018, 7:15 AM Jonathan Wakely wrote: > On Wed, 18 Jul 2018 at 13:06, Eric S. Raymond wrote: > > > > Jonathan Wakely : > > > On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: > > > > Python 2.6 onwards is broadly compatible with Python 3.*. and is > about > > > > to be 10 years ol

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Jonathan Wakely
On Wed, 18 Jul 2018 at 13:06, Eric S. Raymond wrote: > > Jonathan Wakely : > > On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: > > > Python 2.6 onwards is broadly compatible with Python 3.*. and is about > > > to be 10 years old. (IIRC it was the system python implementation in > > > RHEL 6). >

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Eric S. Raymond
Jonathan Wakely : > On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: > > Python 2.6 onwards is broadly compatible with Python 3.*. and is about > > to be 10 years old. (IIRC it was the system python implementation in > > RHEL 6). > > It is indeed. Without some regular testing with Python 2.6 it

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Jonathan Wakely
On Wed, 18 Jul 2018 at 11:56, David Malcolm wrote: > Python 2.6 onwards is broadly compatible with Python 3.*. and is about > to be 10 years old. (IIRC it was the system python implementation in > RHEL 6). It is indeed. Without some regular testing with Python 2.6 it could be easy to introduce co

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Jakub Jelinek
On Wed, Jul 18, 2018 at 06:56:31AM -0400, David Malcolm wrote: > > alternatively we could handle the generated files like those we still > > need flex for: We can't, because unlike the flex output, the option handling is heavily target specific and storing in the tarball a collection of per-target

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread David Malcolm
On Wed, 2018-07-18 at 11:51 +0200, Richard Biener wrote: > On Tue, Jul 17, 2018 at 2:49 PM Martin Liška wrote: > > > > Hi. > > > > I've recently touched AWK option generate machinery and it's quite > > unpleasant > > to make any adjustments. My question is simple: can we starting > > using a scr

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Richard Earnshaw (lists)
On 18/07/18 10:51, Richard Biener wrote: > On Tue, Jul 17, 2018 at 2:49 PM Martin Liška wrote: >> >> Hi. >> >> I've recently touched AWK option generate machinery and it's quite unpleasant >> to make any adjustments. My question is simple: can we starting using a >> scripting >> language like Pyt

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-18 Thread Richard Biener
On Tue, Jul 17, 2018 at 2:49 PM Martin Liška wrote: > > Hi. > > I've recently touched AWK option generate machinery and it's quite unpleasant > to make any adjustments. My question is simple: can we starting using a > scripting > language like Python and replace usage of the AWK scripts? It's pro

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread David Malcolm
On Tue, 2018-07-17 at 14:49 +0200, Martin Liška wrote: > Hi. > > I've recently touched AWK option generate machinery and it's quite > unpleasant > to make any adjustments. My question is simple: can we starting using > a scripting > language like Python and replace usage of the AWK scripts? It's >

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread Paul Koning
> On Jul 17, 2018, at 8:23 PM, David Malcolm wrote: > >>> Hi. >>> >>> I've recently touched AWK option generate machinery and it's quite >>> unpleasant to make any adjustments. My question is simple: can we >>> starting using a scripting language like Python and replace usage >>> of >>> the A

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread David Malcolm
On Tue, 2018-07-17 at 16:37 -0400, David Niklas wrote: > > Hi. > > > > I've recently touched AWK option generate machinery and it's quite > > unpleasant to make any adjustments. My question is simple: can we > > starting using a scripting language like Python and replace usage > > of > > the AWK s

Re: [RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread David Malcolm
On Tue, 2018-07-17 at 19:13 +0200, Basile Starynkevitch wrote: > Hello All, > > > In https://gcc.gnu.org/ml/gcc/2018-07/msg00233.html Martin Liška > wrote: > > > I've recently touched AWK option generate machinery and it's quite > > unpleasant > > to make any adjustments. My question is simple:

RE: [RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread David Niklas
> Hi. > > I've recently touched AWK option generate machinery and it's quite > unpleasant to make any adjustments. My question is simple: can we > starting using a scripting language like Python and replace usage of > the AWK scripts? It's probably question for Steering committee, but I > would li

[RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread Basile Starynkevitch
Hello All, In https://gcc.gnu.org/ml/gcc/2018-07/msg00233.html  Martin Liška wrote: I've recently touched AWK option generate machinery and it's quite unpleasant to make any adjustments. My question is simple: can we starting using a scripting language like Python and replace usage of the AWK

[RFC] Adding Python as a possible language and it's usage

2018-07-17 Thread Martin Liška
Hi. I've recently touched AWK option generate machinery and it's quite unpleasant to make any adjustments. My question is simple: can we starting using a scripting language like Python and replace usage of the AWK scripts? It's probably question for Steering committee, but I would like to see fe