diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c8709b7565b..460e6b9abc3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2016-10-24 Jan Kratochvil + + * gdb.base/morestack.exp: Try to build it using -fuse-ld=gold first. + 2016-10-20 Jan Kratochvil * 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 12f5d2801bb..fb9bbf312f9 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 }