URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
38 |
julius |
global MUDFLAP_FLAGS
|
2 |
|
|
set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}]
|
3 |
|
|
|
4 |
|
|
libmudflap-init c
|
5 |
|
|
dg-init
|
6 |
|
|
|
7 |
|
|
global srcdir subdir
|
8 |
|
|
|
9 |
|
|
foreach flags $MUDFLAP_FLAGS {
|
10 |
|
|
set l1 [libmudflap_target_compile "$srcdir/$subdir/externs-1.c" "externs-1.o" object {additional_flags=-fmudflap}]
|
11 |
|
|
set test "externs-1 compilation ${flags}"
|
12 |
|
|
if [string match "*mudflap cannot track unknown size extern *d*" $l1] { pass $test } { fail $test }
|
13 |
|
|
|
14 |
|
|
set l2 [libmudflap_target_compile "$srcdir/$subdir/externs-2.c" "externs-2.o" object {additional_flags=-fmudflap}]
|
15 |
|
|
set test "externs-2 compilation ${flags}"
|
16 |
|
|
if [string match "" $l2] { pass $test } { fail $test }
|
17 |
|
|
|
18 |
|
|
set l3 [libmudflap_target_compile "externs-1.o externs-2.o" "externs-12.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap}]
|
19 |
|
|
set test "externs-12 linkage ${flags}"
|
20 |
|
|
if [string match "" $l3] { pass $test } { fail $test }
|
21 |
|
|
|
22 |
|
|
set l4 [libmudflap_target_compile "externs-2.o externs-1.o" "externs-21.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap}]
|
23 |
|
|
set test "externs-21 linkage ${flags}"
|
24 |
|
|
if [string match "" $l3] { pass $test } { fail $test }
|
25 |
|
|
|
26 |
|
|
setenv MUDFLAP_OPTIONS "-viol-segv"
|
27 |
|
|
|
28 |
|
|
remote_spawn host "./externs-12.exe"
|
29 |
|
|
set l5 [remote_wait host 10]
|
30 |
|
|
set test "externs-12 execution ${flags}"
|
31 |
|
|
if {[lindex $l5 0] == 0} { pass $test } { fail $test }
|
32 |
|
|
|
33 |
|
|
remote_spawn host "./externs-21.exe"
|
34 |
|
|
set l6 [remote_wait host 10]
|
35 |
|
|
set test "externs-21 execution ${flags}"
|
36 |
|
|
if {[lindex $l6 0] == 0} { pass $test } { fail $test }
|
37 |
|
|
|
38 |
|
|
foreach f [glob -nocomplain "externs-*"] {
|
39 |
|
|
remote_file build delete $f
|
40 |
|
|
}
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
dg-finish
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.