aboutsummaryrefslogtreecommitdiff
path: root/config/linaro.exp
blob: 8996e4b69249eeefac2657e7d91b2f0e489edc63 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# The master configuration file should be here

set sysroot /opt/linaro/sysroot-linaro_eglibc-2_18-aarch64-linux-gnu
set besysroot /opt/linaro/sysroot-linaro_eglibc-2_18-aarch64_be-linux-gnu

set newlib sysroot-newlib.git~linaro_newlib-branch-aarch64-none-elf/
set benewlib sysroot-newlib.git~linaro_newlib-branch-aarch64_be-none-elf/

global env
if {[info exists env(PREFIX_UNDER_TEST)]} {
    set prefix "$env(PREFIX_UNDER_TEST)"
    set flags ""
    if {[info exists env(FLAGS_UNDER_TEST)]} {
	set flags "$env(FLAGS_UNDER_TEST)"
    }
    if {[info exists env(SYSROOT_UNDER_TEST)]} {
	set flags "${flags} --sysroot=$env(SYSROOT_UNDER_TEST)"
    }

    set GCC_UNDER_TEST "[set prefix]gcc $flags"
    set GXX_UNDER_TEST "[set prefix]g++ $flags"
    set GFORTRAN_UNDER_TEST "[set prefix]gfortran $flags"
    set OBJC_UNDER_TEST "[set prefix]gcc $flags"
    set GOC_UNDER_TEST "[set prefix]goc $flags"
    set GNAT_UNDER_TEST "[set prefix]gnat $flags"
}

if {[info exists env(SYSROOT_UNDER_TEST)]} {
    set native ""
} else {
    set native "native"
}

set myname [get_local_hostname]

case "$myname" in {
    { localhost } {
	set target_list { unix }
    }
}

if { "$tcl_platform(user)" == "buildslave" } {
    set machine_prefix "infra"
} else {
    set machine_prefix "tcwg"
}

case "$target_triplet" in { 
    { "arm-*linux-gnueabi*" } {
	case "$native$myname" in {
	    { tcwgrob* ripple* darkstar* } {
#		set target_list { tcwgchromebook }
#		set target_list { tcwgd01 }
#		set target_list { chrome1-01 }
#		set target_list { "arm-qemu" } 
		set target_list { dragon-01 }
	    }
	    { build-* tcwg-ex40-* d01-* apm-* juno-* amd-* } {
		set target_list [list $machine_prefix-armv8]
	    }
	    { natived01-* nativeapm-* nativejuno-* nativeamd-* } {
		set target_list { unix }
	    }
	    default{
		global SIM
		# CPU and sysroot are set through the environment
		set SIM "qemu-arm"
		set target_list { "arm-qemu" } 
            }
	}
    }
    { "arm-*-eabi*" } {
	global SIM
	# CPU and sysroot are set through the environment
	set SIM "qemu-arm"
	set target_list { "arm-qemu" } 
    }
    { "armeb-*-eabi*" } {
	global SIM
	# CPU and sysroot are set through the environment
	set SIM "qemu-armeb"
	set target_list { "arm-qemu" } 
    }
    { "aarch64*-*elf*" } {
	set target_list { "v8model" } 
	set env(FOUNDATION_MODEL) "/linaro/foundation-model/Foundation_v8pkg/Foundation_v8"
    }
    { "aarch64-*linux*" } {
	case "$native$myname" in {
	    { tcwgrob build-* tcwg-ex40-* apm-* juno-* amd-* } {
		set target_list [list $machine_prefix-armv8]
	    }
	    { nativeapm-* nativejuno-* nativeamd-* } {
		set target_list { unix }
	    }
	    default {
		set SIM "qemu-aarch64"
                set target_list { aarch64-qemu }
            }
	}
    }
    { "x86_64-*linux-gnu" "i686-*linux-gnu" } {
	case "$native$myname" in {
	    { build-* } {
		set target_list [list $machine_prefix-build]
	    }
	    { tcwg-ex40-* } {
		set target_list [list $machine_prefix-tcwgex40]
	    }
	    { nativebuild-* nativetcwg-ex40-* } {
		set target_list { unix }
	    }
	}
    }
    { "*linux-gnu*" } {
	case "$myname" in {
	    { build-* } {
		set target_list [list $machine_prefix-buildqemu]
	    }
	    { tcwg-ex40-* } {
		set target_list [list $machine_prefix-tcwgex40qemu]
	    }
	}
    }
    default {
	puts "No target hardware for $target_triplet"
    }
}