]> git.ipfire.org Git - thirdparty/gcc.git/commit
gcc: quote some expressions in `test x...`
authorSam James <sam@gentoo.org>
Sun, 9 Nov 2025 02:00:52 +0000 (02:00 +0000)
committerSam James <sam@gentoo.org>
Mon, 10 Nov 2025 19:58:45 +0000 (19:58 +0000)
commit8c72f3c1c2bd2aefcb702146e3ea511ad79e44d1
tree57140f53121c038c667b0d5fc1fd340945e0d1c4
parenta7f188ccaf721ab04f569a6c140dd1b1c73ab500
gcc: quote some expressions in `test x...`

$gcc_cv_nm may contain a string with spaces since r16-4178-g6051a849aa1e8e and
r16-5013-gf8bb20167f8127. It was possible for this to happen via strange user
input in the past too. `test x$gcc_cv_nm != x` therefore produces some noise
like:
```
checking assembler for working .subsection -1...
/usr/m68k-unknown-linux-gnu/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/configure: line 26132: test: syntax error: `--plugin' unexpected
```

Quote a bunch of such tests. I've drive-by quoted other such tests where
they're for a program and may have a similar problem, but not all other
such tests (much larger patch and not at least strictly necessary).

gcc/ChangeLog:

* acinclude.m4: Quote "$gcc_cv_nm" and friends.
* configure.ac: Ditto.
* configure: Regenerate.
gcc/acinclude.m4
gcc/configure
gcc/configure.ac