-# Copyright 2009-2013 Free Software Foundation, Inc.
+# Copyright 2009-2016 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
if [istarget "s390*-*-*"] {
set march1 "-m64"
set march2 "-m31"
+} elseif { [istarget "aarch64*-*-*"] } {
+ set march1 ""
+ set march2 ""
} else {
set march1 "-m64"
set march2 "-m32"
}
if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \
- [list debug nowarnings additional_flags=${march1}]] } {
+ [list debug additional_flags=${march1}]] } {
return -1
}
+set options [list debug]
+
+if [istarget "aarch64*-*-*"] {
+ if {[info exists ARM_CC_FOR_TARGET]} {
+ lappend options "compiler=${ARM_CC_FOR_TARGET}"
+ } else {
+ unsupported "ARM compiler is not known"
+ return -1
+ }
+} else {
+ lappend options "additional_flags=${march2}"
+}
+
if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" \
- [list debug nowarnings additional_flags=${march2}]] } {
+ $options]} {
return -1
}
# Check we do have two inferiors loaded.
gdb_test "info inferiors" \
- "Executable.*${exec2}.*${exec1}.*"
+ "Executable.*${exec1}.*${exec2}.*"