OSDN Git Service

* objs-gcc.sh: Set up the GDB testsuite even if the gdb installed
[pf3gnuchains/gcc-fork.git] / contrib / regression / objs-gcc.sh
index 0e37ee8..9099850 100755 (executable)
@@ -15,7 +15,7 @@
 
 #  You should have received a copy of the GNU General Public License
 #  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 # INPUT:
 # btest <target> <source> <prefix> <state> <build>
@@ -113,13 +113,15 @@ else
   make install || exit 1
 fi
 
-mkdir -p $PREFIX/share/gdb-testsuite || exit 1
-cd $SOURCE/gdb/testsuite || exit 1
-find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1
-# selftest.exp requires keeping old sources around, which is impractical
-rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp
-# these tests seem to be broken and randomly failing
-rm -r $PREFIX/share/gdb-testsuite/gdb.mi
+if [ -x $PREFIX/bin/$TARGET-gdb -o -x $PREFIX/bin/gdb ] ; then
+  mkdir -p $PREFIX/share/gdb-testsuite || exit 1
+  cd $SOURCE/gdb/testsuite || exit 1
+  find . -print | cpio -pdmu $PREFIX/share/gdb-testsuite || exit 1
+  # selftest.exp requires keeping old sources around, which is impractical
+  rm $PREFIX/share/gdb-testsuite/gdb.base/selftest.exp
+  # these tests seem to be broken and randomly failing
+  rm -r $PREFIX/share/gdb-testsuite/gdb.mi
+fi
 
 echo pass > $RESULT
 exit 0