- # Test if gnatlink is supported
- set status [remote_exec host "$gnatlink --version"]
- if {[lindex $status 0] == -1} {
- unsupported "gnatlink foo"
- return -1
- }
- # Finally, link.
- if {[istarget "*-*-mingw*"]
- || [istarget *-*-cygwin*]
- || [istarget *-*-pe*]
- || [istarget arm*-*-symbianelf*]} {
- # Do not need anything.
- set linkarg ""
- } elseif {[istarget *-*-freebsd*] || [istarget *-*-openbsd*]} {
- set linkarg "-Wl,-rpath,$outdir"
- } else {
- set linkarg "-Wl,-rpath,\\\$ORIGIN"
- }
- set status [remote_exec host "$gnatlink foo $linkarg -Wl,-lsome_package"]
- if {[lindex $status 0] == 0} {
- pass "gnatlink foo"
- } else {
- fail "gnatlink foo"
- return -1
- }
+set options [list debug]
+foreach option [concat $gnatbind_options $gnatlink_options] {
+ lappend options [concat "additional_flags=" $option]
+}
+
+# Create executable.
+if {[gdb_compile_ada $srcfile $binfile executable $options] != ""} {
+ return -1