This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix a few non-dash safe xstormy16 shell scripts.


On Jun 26 2019, Jim Wilson <jimw@sifive.com> wrote:

> Noticed by a customer while looking at a tangentially related problem.  The
> gas testsuite for xstormy16 has two scripts that have a typo on the first
> line, they are missing the !.  They also use shell syntax that doesn't work
> on a system where /bin/sh is dash.

This is all that should be needed:

diff --git a/gas/testsuite/gas/xstormy16/allinsn.sh b/gas/testsuite/gas/xstormy16/allinsn.sh
index 03828f9c919..cae8b47c34b 100644
--- a/gas/testsuite/gas/xstormy16/allinsn.sh
+++ b/gas/testsuite/gas/xstormy16/allinsn.sh
@@ -25,7 +25,7 @@ rm -rf tmpdir
 mkdir tmpdir
 cd tmpdir
 
-function gentest {
+gentest () {
     rm -f a.out
     $BUILD/as-new ${1}.s -o a.out
     echo "#as:" >${1}.d
diff --git a/gas/testsuite/gas/xstormy16/gcc.sh b/gas/testsuite/gas/xstormy16/gcc.sh
index 1eb8972774c..35029c51db8 100644
--- a/gas/testsuite/gas/xstormy16/gcc.sh
+++ b/gas/testsuite/gas/xstormy16/gcc.sh
@@ -24,7 +24,7 @@ rm -rf tmpdir
 mkdir tmpdir
 cd tmpdir
 
-function gentest {
+gentest () {
     rm -f a.out
     $BUILD/as-new ${1}.s -o a.out
     echo "#as:" >${1}.d

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]