diff options
author | Benjamin Drung <benjamin.drung@canonical.com> | 2024-11-18 11:38:25 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-11-18 11:38:25 +0100 |
commit | b0cc81e87087bb8a6b12dc1e4fd7f2591927977b (patch) | |
tree | c8d753b1e4c066c636cb50fe43992f84f62a314f /gas/config/tc-frv.c | |
parent | 20d9fb448c375d5f521eaed8cfc0c49a44803bd1 (diff) | |
download | gdb-master.zip gdb-master.tar.gz gdb-master.tar.bz2 |
Specifying the compiler flag `-Wl,--package-metadata=<JSON>` will not
work in case the JSON contains a comma, because compiler drivers eat
commas. Example:
```
$ echo "void main() { }" > test.c
$ gcc '-Wl,--package-metadata={"type":"deb","os":"ubuntu"}' test.c
/usr/bin/ld: cannot find "os":"ubuntu"}: No such file or directory
collect2: error: ld returned 1 exit status
```
The quotation marks in the JSON value do not work well with shell nor
make. Specifying the `--package-metadata` linker flag in a `LDFLAGS`
environment variable might loose its quotation marks when it hits the
final compiler call.
So support percent-encoded and %[string] encoded JSON data in the
`--package-metadata` linker flag. Percent-encoding is used because it is
a standard, simple to implement, and does take too many additional
characters. %[string] encoding is supported for having a more readable
encoding.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32003
Bug-Ubutru: https://bugs.launchpad.net/bugs/2071468
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Diffstat (limited to 'gas/config/tc-frv.c')
0 files changed, 0 insertions, 0 deletions