summaryrefslogtreecommitdiff
path: root/testcase/wscript
blob: f38c12481025a61822c64bdf19bfcdb1a9a64c68 (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
import re
import rtems

def build(bld):
    arch = bld.get_env()['RTEMS_ARCH']

    bld(target = 'x',
        features = 'c cstlib',
        includes = bld.includes,
        defines = bld.defines,
        source = ['1.c', '2.c'])

#   Note: the bsp is compiled in thumb mode
#   The follow cflags is to test arm/thumb reloc code.
#   cflags = '-marm -fno-common -DARM_TEST',
#   cflags = '-mthumb -fno-common -DTHUMB_TEST',
#   cflags = '-marm -mcpu=arm1176jzf-s -fno-common -DARM_TEST',

    if arch == 'arm':
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-mthumb -fno-common -DTHUMB_TEST',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', 'my_main'],
      source = ['1.c', '2.c'])

    elif arch == 'powerpc':
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common -DPPC_TEST',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', 'my_main'],
      source = ['1.c', '2.c'])

    elif arch == 'mips':
#     cflags = '-fno-common -mlong-calls'
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', 'my_main', '-a', 'mips'],
      source = ['1.c', '2.c'])

    elif arch == 'sparc':
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', 'my_main'],
      source = ['1.c', '2.c'])


    elif arch == 'bfin':
#     cflags = '-fno-common -mlong-calls'
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', '_my_main'],
      source = ['1.c', '2.c'])

    elif arch == 'h8300':
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', '_my_main'],
      source = ['1.c', '2.c'])

    elif arch == 'lm32' or arch == 'moxie':
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', 'my_main'],
      source = ['1.c', '2.c'])

    elif arch == 'v850':
#   cflags = '-mlong-calls -fno-common',
      bld(target = 'test.rap',
      features = 'c rap',
      xxxx = 'hello',

      cflags = '-fno-common',

      rtems_linkflags = ['--base', 'rtld.prelink',
                         '--entry', '_my_main'],
      source = ['1.c', '2.c'])

    bld(target = '../test.rap',
				source = ['test.rap'],
				rule = 'cp ${SRC} ${TGT}')