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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [testsuite/] [lib/] [flags.exp] - Blame information for rev 171

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
2
#
3
# Permission to use, copy, modify, and distribute this software
4
# is freely granted, provided that this notice is preserved.
5
#
6
 
7
# flags.exp: overrides the dejagnu versions of libgloss_link_flags,
8
# newlib_link_flags, and newlib_include_flags.
9
 
10
# These versions of the procedures generate link and include flags
11
# by searching for the needed files in the current build and source
12
# directories, rather than in the build and source paths of the
13
# compiler being used.
14
 
15
if {![llength [info procs saved_libgloss_link_flags]]} {
16
    rename libgloss_link_flags saved_libgloss_link_flags
17
}
18
 
19
proc libgloss_link_flags { args } {
20
    global target_cpu
21
    # These values come from the local site.exp.
22
    global srcdir objdir
23
    global multibuildtop
24
 
25
    if {![info exists multibuildtop]} {
26
        return [saved_libgloss_link_flags $args]
27
    }
28
 
29
    verbose "In newlib version of libgloss_link_flags...\n"
30
 
31
    if [isnative] {
32
        return ""
33
    }
34
 
35
    if [is_remote host] {
36
        return ""
37
    }
38
 
39
    set target_build_path "$objdir/$multibuildtop.."
40
 
41
    set gloss_srcdir [lookfor_file ${srcdir} libgloss/$target_cpu]
42
 
43
    if { $gloss_srcdir == "" } {
44
        return ""
45
    }
46
 
47
    if [file exists $target_build_path/libgloss/$target_cpu] {
48
        verbose "libgloss path is $target_build_path/libgloss/$target_cpu" 2
49
        return "-B$target_build_path/libgloss/$target_cpu/ -L$target_build_path/libgloss/$target_cpu -L$gloss_srcdir"
50
    } else {
51
        verbose -log "No libgloss support for this target." 2
52
        return ""
53
    }
54
}
55
 
56
proc newlib_link_flags { args } {
57
    global tool_root_dir
58
    global srcdir objdir
59
 
60
    verbose "In newlib version of newlib_link_flags...\n"
61
 
62
    if [is_remote host] {
63
        return ""
64
    }
65
 
66
    set ld_script_path [lookfor_file ${tool_root_dir} "ld/ldscripts"];
67
    if { $ld_script_path != "" } {
68
        set result "-L[file dirname $ld_script_path]"
69
    } else {
70
        set result ""
71
    }
72
 
73
    return "$result -B$objdir -L$objdir"
74
}
75
 
76
proc newlib_include_flags { args } {
77
    global srcdir objdir
78
 
79
    verbose "In newlib version of newlib_include_flags...\n"
80
 
81
    if [is_remote host] {
82
        return ""
83
    }
84
 
85
    return " -I$objdir/targ-include"
86
}

powered by: WebSVN 2.1.0

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