On aarch64-linux, I run into:
...
gdb compile failed, cc1: error: '-fsplit-stack' is not supported by this \
compiler configuration
UNTESTED: gdb.base/morestack.exp: failed to prepare
...
Fix this by requiring -fsplit-stack, such that we have instead:
...
UNSUPPORTED: gdb.base/morestack.exp: require failed: \
expr [have_compile_flag -fsplit-stack]
...
Tested on x86_64-linux and aarch64-linux.
require is_c_compiler_gcc
+require {expr [have_compile_flag -fsplit-stack]}
+
standard_testfile
set opts "additional_flags=-fsplit-stack"
return [gdb_can_simple_compile have_syscall_$name $src object]
}
+# Return 1 if compile flag FLAG is supported.
+
+proc have_compile_flag { flag } {
+ set src { void foo () {} }
+ return [gdb_can_simple_compile have_compile_flag_$flag $src object \
+ additional_flags=$flag]
+}
+
# Always load compatibility stuff.
load_lib future.exp