Thomas Schwinge <tschwi...@baylibre.com> writes:

> Hi Sam!

Hi!
>
> On 2024-12-06T09:34:32+0000, Sam James <s...@gentoo.org> wrote:
>> The script has #!/bin/sh shebang (and hence must have POSIX shell
>> compatibility), but the patch introduces uses of the 'local' keyword
>> which isn't in POSIX.
>>
>> While many shells do have the 'local' keyword, its behaviour isn't
>> portable across those either, which is why it's likely it'll never
>> be added to POSIX :(
>
> Right, but I intentionally picked the form that I thought was supported
> by all reasonable '/bin/sh's: 'local [name]', without any further
> adornement.  For example, per <https://mywiki.wooledge.org/Bashism>:
>
> | 'local' is mandated by the LSB and Debian policy specifications, though 
> only the 'local varname' (not 'local var=value') syntax is specified.
>
> Portable, reliable shell programming is a nice idea, but then, reality
> check...

Yeah, that's fair enough. (I just noticed by chance as I was looking at
my other issue; I didn't hit an actual problem with this at all.)

>
> (Don't ask me how much time I already spent on this simple script, to get
> it into its current form -- and I'd consider myself well-versed in shell
> programming...)
>
> I was inclined to just rewrite it in Python, what do you think?  In my
> opinion, a GCC-build-time Python dependency is not a problem for
> '--target=nvptx-none', as that one's not in the bootstrapping chain?

I think that should be fine and far less error prone. Certainly not a
problem for us and I can't imagine it is for the others.

>
>
> Grüße
>  Thomas

thanks,
sam

Reply via email to