aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/morestack.exp6
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c8709b7..460e6b9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.base/morestack.exp: Try to build it using -fuse-ld=gold first.
+
2016-10-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp.
diff --git a/gdb/testsuite/gdb.base/morestack.exp b/gdb/testsuite/gdb.base/morestack.exp
index 12f5d28..fb9bbf3 100644
--- a/gdb/testsuite/gdb.base/morestack.exp
+++ b/gdb/testsuite/gdb.base/morestack.exp
@@ -23,7 +23,11 @@ if {$gcc_compiled == 0} {
standard_testfile
-if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile {additional_flags=-fsplit-stack}] } {
+# -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] } {
return -1
}