aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-nios2/nios2.exp
blob: c7860a4680015d785af63c67e7a3376f3b5f9611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if { ! [istarget nios2-*-*] } {
    return 
}

foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.d]] {
    run_dump_test [file rootname $test]
}

set test_name "NIOS2 Mixed R1 and R2 objects"
set test mixed1

if ![ld_assemble $as "-march=r1 $srcdir/$subdir/${test}a.s" tmpdir/${test}a.o] {
    fail "Build mixed1a.o"
    return
}

if ![ld_assemble $as "-march=r2 $srcdir/$subdir/${test}b.s" tmpdir/${test}b.o] {
    fail "Build mixed1b.o"
    return
}

if { ![ld_link $ld tmpdir/$test "tmpdir/${test}a.o tmpdir/${test}b.o"] } {
    if [string match "*architecture * is incompatible*" $link_output] {
	pass "$test_name"
    } {
	fail "$test_name"
    }
}