]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Improve --with-arch checks
authorAlice Carlotti <alice.carlotti@arm.com>
Wed, 7 Jan 2026 19:47:45 +0000 (19:47 +0000)
committerAlice Carlotti <alice.carlotti@arm.com>
Tue, 10 Feb 2026 16:41:04 +0000 (16:41 +0000)
commitf591c0cb2c7d7fe52be780004ec793cffc82296a
tree8b9f1fc77346489421697d4b411ec4e3649148b3
parent065a6ab3747fe9116643ac6754582bc195847bfc
aarch64: Improve --with-arch checks

- Check for invalid characters before further processing.  Allow only
  alphanumeric characters, "-", "+" and ".".
- Convert "." to "\." before using user input in a sed expression.
- Reject zero-length extension names.
- Quote variables used in echo commands, to avoid unwanted shell
  expansions.

Without these changes, various invalid inputs would be accepted, for
example due to misparsing of "*" and "." characters in regexps and
shell expansions.  Some inputs could also lead to an infinite loop.

gcc/ChangeLog:

* config.gcc: Improve aarch64 --with-arch checks.
gcc/config.gcc