[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] config.sub: go back to backtick substitutions

From: Jacob Bachmeyer
Subject: Re: [PATCH] config.sub: go back to backtick substitutions
Date: Sat, 03 Jul 2021 13:15:44 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090807 MultiZilla/ SeaMonkey/1.1.17 Mnenhy/

Ozkan Sezer wrote:
On 7/3/21, Jacob Bachmeyer <> wrote:
Ozkan Sezer wrote:
The attached patch replaces a handful of POSIX $(xx) with classic `xx`
in config.sub. This is in line with the recent config.guess change i.e.
commit d70c4fa934de:;a=commit;h=d70c4fa934de164178054c3a60aaa0024ed07c91


While doing this, also normalizing the quoting in the `echo FOO | sed
...` would be nice.  Some cases quote the argument to echo and some do
not.  At runtime it probably does not matter because the substituted
values will never contain whitespace, but quoting them all would make
shellcheck more useful.

Also see patch 5 in the recent "v2" series for the marker line to
prevent shellcheck from complaining about backticks.  It must be placed
before the first executable line (the timestamp variable assignment) for
shellcheck to apply it to the entire script.

-- Jacob

Done, as best as I can: Attached patches.

$ make check-sub
cd testsuite && bash
PASS: config.sub checks (864 tests)
PASS: config.sub idempotency checks (801 tests)
PASS: config.sub canonicalise each config.guess testcase (136 tests)

shellcheck barfs with SC1117 in config.guess, but no errors with

I get no errors with either of them when pasting them at as of commit 45e181800a6a27268a9c5d79dcc60492fef9a9a0. Looking up SC1117 shows that you are using a very old shellcheck -- that error was retired due to excessive pedantry. (Which is also how I view the complaints about backticks and expr...)

Off-topic: check-sub fails on my old setup with CentOS-6.10: line 12: shopt: lastpipe: invalid shell option name

That is part of the reason that I did not already write a patch for config.sub: when I last checked, that test script also failed on fencepost! (A server available to GNU maintainers (I now maintain DejaGnu, which uses config.guess) as a reference GNU platform among other uses. Code that does not work there is probably "a bit" bleeding edge for general use.)

If there is interest, I could puzzle out what that script actually does and look into writing a patch to make it more compatible with not-quite-absolute-latest bash, but you seem to be taking care of the major change I would consider useful to config.sub. :-) Thanks.

-- Jacob

reply via email to

[Prev in Thread] Current Thread [Next in Thread]