aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-03-18 16:22:02 +0100
committerTom de Vries <tdevries@suse.de>2025-03-18 16:22:02 +0100
commit29b2c50ece6d39ca1ad535961da48eb1ec874c9e (patch)
tree131c3784741c01e110608497a28db6d0b5e78628 /gdb/testsuite/lib
parent6eb9dab4c99725c1de4bccfeb99e766e7ee657a4 (diff)
downloadbinutils-29b2c50ece6d39ca1ad535961da48eb1ec874c9e.zip
binutils-29b2c50ece6d39ca1ad535961da48eb1ec874c9e.tar.gz
binutils-29b2c50ece6d39ca1ad535961da48eb1ec874c9e.tar.bz2
[gdb/testsuite] Fix gdb.base/enum_cond.exp on arm-linux
On arm-linux, I run into: ... gdb compile failed, ld: warning: enum_cond.o uses variable-size enums yet \ the output is to use 32-bit enums; use of enum values across objects may fail UNTESTED: gdb.base/enum_cond.exp: failed to compile ... Fix this by using -nostdlib. Tested on arm-linux and x86_64-linux. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 481f9ec..3349da7 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -11072,5 +11072,17 @@ proc section_get {exec section} {
return $retval
}
+# Return 1 if the compiler supports __builtin_trap, else return 0.
+
+gdb_caching_proc have_builtin_trap {} {
+
+ return [gdb_can_simple_compile builtin_trap {
+ int main() {
+ __builtin_trap ();
+ return 0;
+ }
+ } executable]
+}
+
# Always load compatibility stuff.
load_lib future.exp