diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2023-11-22 18:11:13 +0100 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2023-11-24 00:20:42 +0100 |
commit | 0ca1e90ae1a3b0ecb4ae90f9b785e618b295a3ff (patch) | |
tree | 1b2a6fd384abf52985faa72e33388bad8350af1e | |
parent | f33a4a7f745f4320cd0571c50fbfc12c4408be0f (diff) | |
download | gcc-0ca1e90ae1a3b0ecb4ae90f9b785e618b295a3ff.zip gcc-0ca1e90ae1a3b0ecb4ae90f9b785e618b295a3ff.tar.gz gcc-0ca1e90ae1a3b0ecb4ae90f9b785e618b295a3ff.tar.bz2 |
contrib/regression/btest-gcc.sh: Handle multiple options.
This is a long-standing bug: passing "-j --add-passes-despite-regression"
or "--add-passes-despite-regression -j" caused the second option to be
treated as TARGET; the first non-option parameter.
* btest-gcc.sh (Option handling): Handle multiple options.
-rwxr-xr-x | contrib/regression/btest-gcc.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh index 1808fcc..22e8f03 100755 --- a/contrib/regression/btest-gcc.sh +++ b/contrib/regression/btest-gcc.sh @@ -29,13 +29,16 @@ dashj='' # -j<n>: # Pass '-j<n>' to make. -case "$1" in - --add-passes-despite-regression) - add_passes_despite_regression=1; shift;; - -j*) - dashj=$1; shift;; - -*) echo "Invalid option: $1"; exit 2;; -esac +while : ; do + case "$1" in + --add-passes-despite-regression) + add_passes_despite_regression=1; shift;; + -j*) + dashj=$1; shift;; + -*) echo "Invalid option: $1"; exit 2;; + *) break;; + esac +done # TARGET is the target triplet. It should be the same one as used in # constructing PREFIX. Or it can be the keyword 'native', indicating |