1# Copyright (C) 2003, 2006, 2009, 2010, 2014, 2019 Free Software Foundation, Inc.
2# Copyright (C) 2019 Anthony Green
3
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; see the file COPYING3.  If not see
16# <http://www.gnu.org/licenses/>.
17
18dg-init
19libffi-init
20
21global srcdir subdir
22
23if { [string match $compiler_vendor "microsoft"] } {
24    # -wd4005  macro redefinition
25    # -wd4244  implicit conversion to type of smaller size
26    # -wd4305  truncation to smaller type
27    # -wd4477  printf %lu of uintptr_t
28    # -wd4312  implicit conversion to type of greater size
29    # -wd4311  pointer truncation to unsigned long
30    # -EHsc    C++ Exception Handling (no SEH exceptions)
31    set additional_options "-wd4005 -wd4244 -wd4305 -wd4477 -wd4312 -wd4311 -EHsc";
32} else {
33    set additional_options "";
34}
35
36set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/*.c]]
37
38if { [libffi_feature_test "#if FFI_CLOSURES"] } {
39    run-many-tests $tlist ""
40} else {
41    foreach test $tlist {
42	unsupported "$test"
43    }
44}
45
46set tlist [lsort [glob -nocomplain -- $srcdir/$subdir/*.cc]]
47
48# No C++ for or1k
49if { [istarget "or1k-*-*"] } {
50    foreach test $tlist {
51        unsupported "$test"
52    }
53} else {
54    if { [libffi_feature_test "#if FFI_CLOSURES"] } {
55        run-many-tests $tlist  $additional_options
56    } else {
57        foreach test $tlist {
58	    unsupported "$test"
59        }
60    }
61}
62
63dg-finish
64
65# Local Variables:
66# tcl-indent-level:4
67# End:
68