gdb-add-index: quote PKGVERSION

In Gentoo, we configure our gdb with `--with-pkgversion=` with
"Gentoo VERSION XXXX" where XXX depends on patching (not that we patch
gdb really these days) or vanilla.

Since 71f193a5c1, this goes wrong, yielding
```
/usr/bin/gdb-add-index: 25: Syntax error: "(" unexpected
```

with lines 25-26 being:
```
PKGVERSION=(Gentoo 9999 vanilla)
VERSION=17.0.50.20250319-git
```

Quote both assignments (PKGVERSION by necessity, VERSION for consistency
or symmetry).

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32325
This commit is contained in:
Sam James
2025-03-19 22:44:10 +00:00
parent d1da7bb43e
commit 3bed686102

View File

@@ -22,8 +22,8 @@ GDB=${GDB:=gdb}
OBJCOPY=${OBJCOPY:=objcopy}
READELF=${READELF:=readelf}
PKGVERSION=@PKGVERSION@
VERSION=@VERSION@
PKGVERSION="@PKGVERSION@"
VERSION="@VERSION@"
myname="${0##*/}"