OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.fortran/] [fortran.exp] - Blame information for rev 735

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 735 jeremybenn
load_lib libgomp-dg.exp
2
 
3
global shlib_ext
4
global ALWAYS_CFLAGS
5
 
6
set shlib_ext [get_shlib_extension]
7
set lang_library_path   "../libgfortran/.libs"
8
set lang_link_flags     "-lgfortran"
9
set lang_test_file_found 0
10
set quadmath_library_path "../libquadmath/.libs"
11
 
12
 
13
# Initialize dg.
14
dg-init
15
 
16
if { $blddir != "" } {
17
    # Look for a static libgfortran first.
18
    if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
19
        set lang_test_file "${lang_library_path}/libgfortran.a"
20
        set lang_test_file_found 1
21
        # We may have a shared only build, so look for a shared libgfortran.
22
    } elseif [file exists "${blddir}/${lang_library_path}/libgfortran.${shlib_ext}"] {
23
        set lang_test_file "${lang_library_path}/libgfortran.${shlib_ext}"
24
        set lang_test_file_found 1
25
    } else {
26
        puts "No libgfortran library found, will not execute fortran tests"
27
    }
28
} elseif [info exists GFORTRAN_UNDER_TEST] {
29
    set lang_test_file_found 1
30
    # Needs to exist for libgomp.exp.
31
    set lang_test_file ""
32
} else {
33
    puts "GFORTRAN_UNDER_TEST not defined, will not execute fortran tests"
34
}
35
 
36
if { $lang_test_file_found } {
37
    # Gather a list of all tests.
38
    set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]]
39
 
40
    if { $blddir != "" } {
41
        if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"]
42
             || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } {
43
            lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/"
44
            # Allow for spec subsitution.
45
            lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/"
46
            set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}"
47
        } else {
48
            set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}"
49
        }
50
    } else {
51
        set ld_library_path "$always_ld_library_path"
52
    }
53
    append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
54
    set_ld_library_path_env_vars
55
 
56
    # Main loop.
57
    gfortran-dg-runtest $tests ""
58
}
59
 
60
# All done.
61
dg-finish

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.