-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 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
set lib_opts {}
set exec_opts [list debug shlib=$lib_so]
-if [get_compiler_info ${binfile}] {
+if [get_compiler_info] {
return -1
}
# Test statically linked ifunc resolving during inferior start.
# https://bugzilla.redhat.com/show_bug.cgi?id=624967
-if ![target_info exists gdb_stub] {
+# Compile $staticbinfile separately as it may exit on error (ld/12595).
- # Compile $staticbinfile separately as it may exit on error (ld/12595).
-
- if { [gdb_compile ${srcdir}/${subdir}/$libsrc $lib_o object {}] != ""
- || [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o" $staticbinfile executable {debug}] != "" } {
- untested "Could not compile static executable $staticbinfile."
- return -1
- }
+if { [gdb_compile ${srcdir}/${subdir}/$libsrc $lib_o object {}] != ""
+ || [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o" $staticbinfile executable {debug}] != "" } {
+ untested "Could not compile static executable $staticbinfile."
+ return -1
+}
- clean_restart $staticexecutable
+clean_restart $staticexecutable
- gdb_breakpoint "gnu_ifunc"
- gdb_breakpoint "main"
- gdb_run_cmd
- gdb_test "" "Breakpoint \[0-9\]*, main .*" "static gnu_ifunc"
-}
+gdb_breakpoint "gnu_ifunc"
+gdb_breakpoint "main"
+gdb_run_cmd
+gdb_test "" "Breakpoint \[0-9\]*, main .*" "static gnu_ifunc"