compiler-rt: actually use arch_cFlags and disabling subft3 test on ARMv8
[barrelfish] / lib / compiler-rt / test / Hakefile
1 --------------------------------------------------------------------------
2 -- Copyright (c) 2016, ETH Zurich.
3 -- All rights reserved.
4 --
5 -- This file is distributed under the terms in the attached LICENSE file.
6 -- If you do not find this file, copies can be found by writing to:
7 -- ETH Zurich D-INFK, Universitaetstrasse 4, CH-8092 Zurich. Attn: Systems Group.
8 --
9 -- Hakefile for /lib/compiler-rt/test
10 --
11 --------------------------------------------------------------------------
12
13 let
14   builtins_unittest_files = [
15     "absvdi2_test.c",
16     "absvsi2_test.c",
17     "absvti2_test.c",
18     "adddf3vfp_test.c",
19     "addsf3vfp_test.c",
20     "addtf3_test.c",
21     "addvdi3_test.c",
22     "addvsi3_test.c",
23     "addvti3_test.c",
24     "ashldi3_test.c",
25     "ashlti3_test.c",
26     "ashrdi3_test.c",
27     "ashrti3_test.c",
28     "bswapdi2_test.c",
29     "bswapsi2_test.c",
30     "clzdi2_test.c",
31     "clzsi2_test.c",
32     "clzti2_test.c",
33     "cmpdi2_test.c",
34     "cmpti2_test.c",
35     "comparedf2_test.c",
36     "comparesf2_test.c",
37     "ctzdi2_test.c",
38     "ctzsi2_test.c",
39     "ctzti2_test.c",
40     "divdc3_test.c",
41     "divdf3vfp_test.c",
42     "divdi3_test.c",
43     "divmodsi4_test.c",
44     "divsc3_test.c",
45     "divsf3vfp_test.c",
46     "divsi3_test.c",
47     "divtf3_test.c",
48     "divti3_test.c",
49     "divxc3_test.c",
50     "eqdf2vfp_test.c",
51     "eqsf2vfp_test.c",
52     "eqtf2_test.c",
53     "extebdsfdf2vfp_test.c",
54     "extenddftf2_test.c",
55     "extendsftf2_test.c",
56     "ffsdi2_test.c",
57     "ffsti2_test.c",
58     "fixdfdi_test.c",
59     "fixdfsivfp_test.c",
60     "fixdfti_test.c",
61     "fixsfdi_test.c",
62     "fixsfsivfp_test.c",
63     "fixsfti_test.c",
64     "fixtfdi_test.c",
65     "fixtfsi_test.c",
66     "fixtfti_test.c",
67     "fixunsdfdi_test.c",
68     "fixunsdfsi_test.c",
69     "fixunsdfsivfp_test.c",
70     "fixunsdfti_test.c",
71     "fixunssfdi_test.c",
72     "fixunssfsi_test.c",
73     "fixunssfsivfp_test.c",
74     "fixunssfti_test.c",
75     "fixunstfdi_test.c",
76     "fixunstfsi_test.c",
77     "fixunstfti_test.c",
78     "fixunsxfdi_test.c",
79     "fixunsxfsi_test.c",
80     "fixunsxfti_test.c",
81     "fixxfdi_test.c",
82     "fixxfti_test.c",
83     "floatdidf_test.c",
84     "floatdisf_test.c",
85     "floatditf_test.c",
86     "floatdixf_test.c",
87     "floatsidfvfp_test.c",
88     "floatsisfvfp_test.c",
89     "floatsitf_test.c",
90     "floattidf_test.c",
91     "floattisf_test.c",
92     "floattixf_test.c",
93     "floatundidf_test.c",
94     "floatundisf_test.c",
95     "floatunditf_test.c",
96     "floatundixf_test.c",
97     "floatunsitf_test.c",
98     "floatunssidfvfp_test.c",
99     "floatunssisfvfp_test.c",
100     "floatuntidf_test.c",
101     "floatuntisf_test.c",
102     "floatuntixf_test.c",
103     "gcc_personality_test.c",
104     "gedf2vfp_test.c",
105     "gesf2vfp_test.c",
106     "getf2_test.c",
107     "gtdf2vfp_test.c",
108     "gtsf2vfp_test.c",
109     "gttf2_test.c",
110     "ledf2vfp_test.c",
111     "lesf2vfp_test.c",
112     "letf2_test.c",
113     "lshrdi3_test.c",
114     "lshrti3_test.c",
115     "ltdf2vfp_test.c",
116     "ltsf2vfp_test.c",
117     "lttf2_test.c",
118     "moddi3_test.c",
119     "modsi3_test.c",
120     "modti3_test.c",
121     "muldc3_test.c",
122     "muldf3vfp_test.c",
123     "muldi3_test.c",
124     "mulodi4_test.c",
125     "mulosi4_test.c",
126     "muloti4_test.c",
127     "mulsc3_test.c",
128     "mulsf3vfp_test.c",
129     "multc3_test.c",
130     "multf3_test.c",
131     "multi3_test.c",
132     "mulvdi3_test.c",
133     "mulvsi3_test.c",
134     "mulvti3_test.c",
135     "mulxc3_test.c",
136     "nedf2vfp_test.c",
137     "negdf2vfp_test.c",
138     "negdi2_test.c",
139     "negsf2vfp_test.c",
140     "negti2_test.c",
141     "negvdi2_test.c",
142     "negvsi2_test.c",
143     "negvti2_test.c",
144     "nesf2vfp_test.c",
145     "netf2_test.c",
146     "paritydi2_test.c",
147     "paritysi2_test.c",
148     "parityti2_test.c",
149     "popcountdi2_test.c",
150     "popcountsi2_test.c",
151     "popcountti2_test.c",
152     "powidf2_test.c",
153     "powisf2_test.c",
154     "powitf2_test.c",
155     "powixf2_test.c",
156     "subdf3vfp_test.c",
157     "subsf3vfp_test.c",
158     "subtf3_test.c",
159     "subvdi3_test.c",
160     "subvsi3_test.c",
161     "subvti3_test.c",
162     "truncdfsf2_test.c",
163     "truncdfsf2vfp_test.c",
164     "trunctfdf2_test.c",
165     "trunctfsf2_test.c",
166     "ucmpdi2_test.c",
167     "ucmpti2_test.c",
168     "udivdi3_test.c",
169     "udivmoddi4_test.c",
170     "udivmodsi4_test.c",
171     "udivmodti4_test.c",
172     "udivsi3_test.c",
173     "udivti3_test.c",
174     "umoddi3_test.c",
175     "umodsi3_test.c",
176     "umodti3_test.c",
177     "unorddf2vfp_test.c",
178     "unordsf2vfp_test.c",
179     "unordtf2_test.c" ]
180
181   common_cFlags = [
182     "-Wno-missing-prototypes",
183     "-Wno-missing-declarations",
184     "-Wno-strict-prototypes",
185     "-Wno-old-style-definition",
186     "-Wno-redundant-decls"
187     ]
188
189   arch_cFlags arch = case arch of "x86_64"  -> common_cFlags
190                                   "k1om"    -> common_cFlags
191                                   "x86_32"  -> common_cFlags
192                                   "armv7"   -> common_cFlags ++ [ "-D__ARM_EABI__" ]
193                                   "armv8"   -> common_cFlags
194
195   builtins_unittest_dir = "test/builtins/Unit/"
196
197 in [ build application {
198         target = "compiler-rt/" ++ builtins_unittest_dir ++
199                                    (take ((length f) - 2) f),
200         cFiles = [ f ],
201         addCFlags = arch_cFlags arch,
202         addLibraries = libDeps [
203             "compiler-rt",
204             "m"
205         ],
206         architectures = [
207             arch
208         ],
209         addIncludes = [
210             "/lib/compiler-rt/builtins/"
211         ]
212     } | f <- builtins_unittest_files, arch <- allArchitectures ]