]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/testsuite/gas/i386/ilp32/cfi/ilp32.exp
Properly check x32 support
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / i386 / ilp32 / cfi / ilp32.exp
CommitLineData
351f65ca
L
1#
2# x86-64 ILP32 tests
3#
e7722035 4proc gas_x32_check { } {
351f65ca
L
5 global NM
6 global NMFLAGS
7
8 set status [gas_host_run "$NM $NMFLAGS --help" ""]
e7722035 9 return [regexp "targets:.*elf32-x86-64" [lindex $status 1]];
351f65ca
L
10}
11
e7722035 12if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_x32_check] && [is_elf_format]] then {
351f65ca
L
13
14 global ASFLAGS
15 set old_ASFLAGS "$ASFLAGS"
570561f7 16 set ASFLAGS "$ASFLAGS --x32"
351f65ca
L
17
18 foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.d]] {
19 if { [runtest_file_p $runtests $test] } {
20 run_dump_test [file rootname $test]
21 }
22 }
23
24 set ASFLAGS "$old_ASFLAGS"
25}