[gdb/testsuite] Handle missing gold linker in gdb.base/morestack.exp
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / morestack.exp
index fb9bbf312f921f98aa37410ea8f133a1f2ed13fa..95ec9adc62bbf4aef553df614811aad8709fc068 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2016 Free Software Foundation, Inc.
+# Copyright (C) 2011-2020 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,13 +21,17 @@ if {$gcc_compiled == 0} {
     return -1
 }
 
+if { [have_fuse_ld_gold] == 0} {
+    return -1
+}
+
 standard_testfile
 
 # -fuse-ld=gold is used for calling printf code built without -fsplit-stack
 # which could crash otherwise.  See GCC documentation of -fsplit-stack.
 set opts "additional_flags=-fsplit-stack"
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile [list $opts additional_flags=-fuse-ld=gold]] \
-     && [prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile \
+         [list $opts additional_flags=-fuse-ld=gold]] } {
     return -1
 }
 
This page took 0.026558 seconds and 4 git commands to generate.