testsuite: Fix cc-with-tweaks.sh being executed in the wrong shell
authorSimon Marchi <simon.marchi@ericsson.com>
Wed, 20 Jun 2018 16:46:28 +0000 (12:46 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Wed, 20 Jun 2018 16:46:28 +0000 (12:46 -0400)
The cc-with-tweaks.sh script needs to be executed with bash.  When
trying to run this:

  make check RUNTESTFLAGS="--target_board=dwarf4-gdb-index" TESTS="gdb.base/return.exp"

I get:

  gdb compile failed, /home/emaisin/src/binutils-gdb/gdb/contrib/cc-with-tweaks.sh: 174: /home/emaisin/src/binutils-gdb/gdb/contrib/cc-with-tweaks.sh: Bad substitution

The reason is that the board files execute cc-with-tweaks.sh using
/bin/sh, which points to dash on my machine.  Remove the /bin/sh part
and let the shebang choose the right interpreter.

gdb/testsuite/ChangeLog:

* boards/cc-with-tweaks.exp: Don't call cc-with-tweaks.sh
through /bin/sh.
* boards/dwarf4-gdb-index.exp: Likewise.
* boards/fission-dwp.exp: Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/boards/cc-with-tweaks.exp
gdb/testsuite/boards/dwarf4-gdb-index.exp
gdb/testsuite/boards/fission-dwp.exp

index df218effb495600fd059d434087ed918ac4dea77..79909ae2de0c45250c7da670890ca78041c7cf6c 100644 (file)
@@ -1,3 +1,10 @@
+2018-06-20  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * boards/cc-with-tweaks.exp: Don't call cc-with-tweaks.sh
+       through /bin/sh.
+       * boards/dwarf4-gdb-index.exp: Likewise.
+       * boards/fission-dwp.exp: Likewise.
+
 2018-06-20  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * gdb.base/float128.exp: Add comment and improved fail message
index 7f9414282f6e98f401b6e863ff8e1a4e9132398f..1758e24254e7231dea45bfbf3939eebac92d6f0f 100644 (file)
@@ -44,8 +44,8 @@ set contrib_dir [file normalize $srcdir/../contrib]
 if ![info exists CC_FOR_TARGET] {
     set CC_FOR_TARGET "$found_gcc"
 }
-set CC_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CC_FOR_TARGET"
+set CC_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CC_FOR_TARGET"
 if ![info exists CXX_FOR_TARGET] {
     set CXX_FOR_TARGET "$found_gxx"
 }
-set CXX_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CXX_FOR_TARGET"
+set CXX_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh $CC_WITH_TWEAKS_FLAGS $CXX_FOR_TARGET"
index 81bffbdd3449dcc7e3a310615bdbbdd595cc831e..6e021419c3c6421192d1626e1358cd8eb30fcea8 100644 (file)
@@ -36,8 +36,8 @@ set contrib_dir [file normalize $srcdir/../contrib]
 if ![info exists CC_FOR_TARGET] {
     set CC_FOR_TARGET "$found_gcc"
 }
-set CC_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh -i $CC_FOR_TARGET"
+set CC_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh -i $CC_FOR_TARGET"
 if ![info exists CXX_FOR_TARGET] {
     set CXX_FOR_TARGET "$found_gxx"
 }
-set CXX_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh -i $CXX_FOR_TARGET"
+set CXX_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh -i $CXX_FOR_TARGET"
index 0414981ffe53a2b95289695b2259ae855211d63c..82a0253dfe8906c5e943320792e63e82476e1954 100644 (file)
@@ -30,11 +30,11 @@ set contrib_dir [file normalize $srcdir/../contrib]
 if ![info exists CC_FOR_TARGET] {
     set CC_FOR_TARGET "$found_gcc"
 }
-set CC_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh -p $CC_FOR_TARGET"
+set CC_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh -p $CC_FOR_TARGET"
 if ![info exists CXX_FOR_TARGET] {
     set CXX_FOR_TARGET "$found_gxx"
 }
-set CXX_FOR_TARGET "/bin/sh $contrib_dir/cc-with-tweaks.sh -p $CXX_FOR_TARGET"
+set CXX_FOR_TARGET "$contrib_dir/cc-with-tweaks.sh -p $CXX_FOR_TARGET"
 
 if ![info exists READELF_FOR_TARGET] {
     set READELF_FOR_TARGET "[transform readelf]"