Commit d1eef904766dbd647de6c240a57dbc98d46e33dd

Anthony Green 2021-07-16T08:29:08

Migrate from travis-ci to github actions.

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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
diff --git a/.ci/ar-lib b/.ci/ar-lib
new file mode 100755
index 0000000..0baa4f6
--- /dev/null
+++ b/.ci/ar-lib
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+  echo "$me: $1" 1>&2
+  exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv in
+	mingw)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+  operation=$2
+  archive=$3
+  at_file_contents=`cat "$1"`
+  eval set x "$at_file_contents"
+  shift
+
+  for member
+  do
+    $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+  done
+}
+
+case $1 in
+  '')
+     func_error "no command.  Try '$0 --help' for more information."
+     ;;
+  -h | --h*)
+    cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "$me, version $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test $# -lt 3; then
+  func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+  if test $# -lt 2; then
+    func_error "you must specify a program, an action and an archive"
+  fi
+  case $1 in
+    -lib | -LIB \
+    | -ltcg | -LTCG \
+    | -machine* | -MACHINE* \
+    | -subsystem* | -SUBSYSTEM* \
+    | -verbose | -VERBOSE \
+    | -wx* | -WX* )
+      AR="$AR $1"
+      shift
+      ;;
+    *)
+      action=$1
+      shift
+      break
+      ;;
+  esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+  case $action in
+    d*) delete=yes  ;;
+    x*) extract=yes ;;
+    t*) list=yes    ;;
+    q*) quick=yes   ;;
+    r*) replace=yes ;;
+    s*) index=yes   ;;
+    S*)             ;; # the index is always updated implicitly
+    c*) create=yes  ;;
+    u*)             ;; # TODO: don't ignore the update modifier
+    v*)             ;; # TODO: don't ignore the verbose modifier
+    *)
+      func_error "unknown action specified"
+      ;;
+  esac
+  action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+  yes,* | ,yes)
+    ;;
+  yesyes*)
+    func_error "more than one action specified"
+    ;;
+  *)
+    func_error "no action specified"
+    ;;
+esac
+
+if test -n "$delete"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  for member
+  do
+    case $1 in
+      @*)
+        func_at_file "${1#@}" -REMOVE "$archive"
+        ;;
+      *)
+        func_file_conv "$1"
+        $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+        ;;
+    esac
+  done
+
+elif test -n "$extract"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  if test $# -gt 0; then
+    for member
+    do
+      case $1 in
+        @*)
+          func_at_file "${1#@}" -EXTRACT "$archive"
+          ;;
+        *)
+          func_file_conv "$1"
+          $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+          ;;
+      esac
+    done
+  else
+    $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+    do
+      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+    done
+  fi
+
+elif test -n "$quick$replace"; then
+  if test ! -f "$orig_archive"; then
+    if test -z "$create"; then
+      echo "$me: creating $orig_archive"
+    fi
+    orig_archive=
+  else
+    orig_archive=$archive
+  fi
+
+  for member
+  do
+    case $1 in
+    @*)
+      func_file_conv "${1#@}"
+      set x "$@" "@$file"
+      ;;
+    *)
+      func_file_conv "$1"
+      set x "$@" "$file"
+      ;;
+    esac
+    shift
+    shift
+  done
+
+  if test -n "$orig_archive"; then
+    $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+  else
+    $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+  fi
+
+elif test -n "$list"; then
+  if test ! -f "$orig_archive"; then
+    func_error "archive not found"
+  fi
+  $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/.ci/bfin-sim.exp b/.ci/bfin-sim.exp
new file mode 100644
index 0000000..b36d9f0
--- /dev/null
+++ b/.ci/bfin-sim.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {bfin-elf}
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# "bfin" is the name of the sim subdir in devo/sim.
+setup_sim bfin
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+
+set_board_info compiler  "[find_gcc]"
+set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
+
+# Configuration settings for testsuites
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,cannot_call_functions 1
+set_board_info gdb,skip_float_tests 1
+set_board_info gdb,can_reverse 1
+set_board_info gdb,use_precord 1
+
+# More time is needed
+set_board_info gcc,timeout 800
+set_board_info gdb,timeout 60
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size  5000
+
diff --git a/.ci/build-cross-in-container.sh b/.ci/build-cross-in-container.sh
new file mode 100755
index 0000000..d2143e3
--- /dev/null
+++ b/.ci/build-cross-in-container.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+set -x
+
+cd /opt
+
+echo $PATH
+export PATH=/usr/local/bin:$PATH
+echo $PATH
+
+export DEJAGNU=$(pwd)/.ci/site.exp
+echo $DEJAGNU
+ls -l $DEJAGNU
+pwd
+find .
+./configure --host=${HOST} || cat */config.log
+make
+make dist
+BOARDSDIR=$(pwd)/.ci make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
diff --git a/.ci/build-in-container.sh b/.ci/build-in-container.sh
new file mode 100755
index 0000000..a4124b0
--- /dev/null
+++ b/.ci/build-in-container.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -x
+
+export QEMU_LD_PREFIX=/usr/${HOST}
+export DEJAGNU=/opt/.ci/site.exp
+cd /opt
+./configure ${HOST+--host=$HOST --disable-shared}
+make
+make dist
+BOARDSDIR=/opt/.ci make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
diff --git a/.ci/build.sh b/.ci/build.sh
new file mode 100755
index 0000000..a638977
--- /dev/null
+++ b/.ci/build.sh
@@ -0,0 +1,143 @@
+#!/bin/bash
+
+set -x
+
+# This is a policy bound API key.  It can only be used with
+# https://github.com/libffi/rlgl-policy.git.
+RLGL_KEY=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI
+
+if [ -z ${QEMU_CPU+x} ]; then
+    export SET_QEMU_CPU=
+else
+    export SET_QEMU_CPU="-e QEMU_CPU=${QEMU_CPU}"
+fi
+
+export DOCKER=docker
+
+function build_cfarm()
+{
+    curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT} | tee build.log
+    echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+    echo $(tail build.log | grep '^==LOGFILE==')
+    echo $(tail build.log | grep '^==LOGFILE==' | cut -b13-)
+    echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+    curl -u ${CFARM_AUTH} "$(tail build.log | grep '^==LOGFILE==' | cut -b13-)" > libffi.log
+
+    ./rlgl l --key=${RLGL_KEY} https://rl.gl
+    ID=$(./rlgl start)
+    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git libffi.log
+    exit $?
+}
+
+function build_linux()
+{
+    ./autogen.sh
+    ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS} || cat */config.log
+    make
+    make dist
+    DEJAGNU=$(pwd)/.ci/site.exp BOARDSDIR=$(pwd)/.ci runtest --version
+    DEJAGNU=$(pwd)/.ci/site.exp BOARDSDIR=$(pwd)/.ci make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
+
+    ./rlgl l --key=${RLGL_KEY} https://rl.gl
+    ID=$(./rlgl start)
+    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
+    exit $?
+}
+
+function build_foreign_linux()
+{
+    ${DOCKER} run --rm -t -v $(pwd):/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.ci/build-in-container.sh
+
+    ./rlgl l --key=${RLGL_KEY} https://rl.gl
+    ID=$(./rlgl start)
+    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
+    exit $?
+}
+
+function build_cross_linux()
+{
+    ${DOCKER} run --rm -t -v $(pwd):/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/cross-ci-build-container:latest bash -c /opt/.ci/build-in-container.sh
+
+    ./rlgl l --key=${RLGL_KEY} https://rl.gl
+    ID=$(./rlgl start)
+    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
+    exit $?
+}
+
+function build_cross()
+{
+    ${DOCKER} pull quay.io/moxielogic/libffi-ci-${HOST}
+    ${DOCKER} run --rm -t -v $(pwd):/opt -e HOST="${HOST}" -e CC="${HOST}-gcc ${GCC_OPTIONS}" -e CXX="${HOST}-g++ ${GCC_OPTIONS}" -e RUNNER_WORKSPACE=/opt -e RUNTESTFLAGS="${RUNTESTFLAGS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/libffi-ci-${HOST} bash -c /opt/.ci/build-cross-in-container.sh
+
+    ./rlgl l --key=${RLGL_KEY} https://rl.gl
+    ID=$(./rlgl start)
+    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
+    exit $?
+}
+
+function build_ios()
+{
+    which python
+# export PYTHON_BIN=/usr/local/bin/python
+    ./generate-darwin-source-and-headers.py --only-ios
+    xcodebuild -showsdks
+    xcodebuild -project libffi.xcodeproj -target "libffi-iOS" -configuration Release -sdk iphoneos11.4
+    exit $?
+}
+
+function build_macosx()
+{
+    which python
+# export PYTHON_BIN=/usr/local/bin/python
+    ./generate-darwin-source-and-headers.py --only-osx
+    xcodebuild -showsdks
+    xcodebuild -project libffi.xcodeproj -target "libffi-Mac" -configuration Release -sdk macosx10.13
+    echo "Finished build"
+    exit $?
+}
+
+case "$HOST" in
+    arm-apple-darwin*)
+	./autogen.sh
+	build_ios
+	;;
+    x86_64-apple-darwin*)
+	./autogen.sh
+	build_macosx
+	;;
+    arm32v7-linux-gnu)
+	./autogen.sh
+        build_foreign_linux arm quay.io/moxielogic/arm32v7-ci-build-container:latest
+	;;
+    mips64el-linux-gnu | sparc64-linux-gnu)
+        build_cfarm
+	;;
+    bfin-elf )
+	./autogen.sh
+	GCC_OPTIONS=-msim build_cross
+	;;
+    m32r-elf )
+	./autogen.sh
+	build_cross
+	;;
+    or1k-elf )
+	./autogen.sh
+	build_cross
+	;;
+    powerpc-eabisim )
+	./autogen.sh
+	build_cross
+	;;
+    m68k-linux-gnu )
+	./autogen.sh
+	GCC_OPTIONS=-mcpu=547x build_cross_linux
+	;;
+    alpha-linux-gnu | sh4-linux-gnu )
+	./autogen.sh
+	build_cross_linux
+	;;
+    *)
+	./autogen.sh
+	build_linux
+	;;
+esac
diff --git a/.ci/compile b/.ci/compile
new file mode 100755
index 0000000..655932a
--- /dev/null
+++ b/.ci/compile
@@ -0,0 +1,351 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2018-03-27.18; # UTC
+
+# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""	$nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv/,$2, in
+	*,$file_conv,*)
+	  ;;
+	mingw/*)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin/*)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine/*)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+	-o)
+	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
+	  eat=1
+	  case $2 in
+	    *.o | *.[oO][bB][jJ])
+	      func_file_conv "$2"
+	      set x "$@" -Fo"$file"
+	      shift
+	      ;;
+	    *)
+	      func_file_conv "$2"
+	      set x "$@" -Fe"$file"
+	      shift
+	      ;;
+	  esac
+	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-I*)
+	  func_file_conv "${1#-I}" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
+	-L*)
+	  func_cl_dashL "${1#-L}"
+	  ;;
+	-static)
+	  shared=false
+	  ;;
+	-warn)
+	  eat=1
+	  ;;
+	-Wl,*)
+	  arg=${1#-Wl,}
+	  save_ifs="$IFS"; IFS=','
+	  for flag in $arg; do
+	    IFS="$save_ifs"
+	    linker_opts="$linker_opts $flag"
+	  done
+	  IFS="$save_ifs"
+	  ;;
+	-Xlinker)
+	  eat=1
+	  linker_opts="$linker_opts $2"
+	  ;;
+	-*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+	  func_file_conv "$1"
+	  set x "$@" -Tp"$file"
+	  shift
+	  ;;
+	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+	  func_file_conv "$1" mingw
+	  set x "$@" "$file"
+	  shift
+	  ;;
+	*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as 'compile cc -o foo foo.c'.
+	# So we strip '-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no '-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # '.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/.ci/install.sh b/.ci/install.sh
new file mode 100755
index 0000000..d3fa0e9
--- /dev/null
+++ b/.ci/install.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+set -x
+
+if [[ $RUNNER_OS != 'Linux' ]]; then
+    brew update --verbose
+    # brew update > brew-update.log 2>&1
+    # fix an issue with libtool on travis by reinstalling it
+    brew uninstall libtool;
+    brew install libtool dejagnu;
+
+    # Download and extract the rlgl client
+    wget -qO - https://rl.gl/cli/rlgl-darwin-amd64.tgz | \
+	tar --strip-components=2 -xvzf - ./rlgl/rlgl;
+
+else
+    # Download and extract the rlgl client
+    case $HOST in
+	aarch64-linux-gnu)
+	    wget -qO - https://rl.gl/cli/rlgl-linux-arm.tgz | \
+		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
+	    ;;
+	ppc64le-linux-gnu)
+	    wget -qO - https://rl.gl/cli/rlgl-linux-ppc64le.tgz | \
+		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
+	    ;;
+	s390x-linux-gnu)
+	    wget -qO - https://rl.gl/cli/rlgl-linux-s390x.tgz | \
+		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
+	    ;;
+	*)
+	    wget -qO - https://rl.gl/cli/rlgl-linux-amd64.tgz | \
+		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
+	    ;;
+    esac
+
+    sudo apt-get clean # clear the cache
+    sudo apt-get update
+    case $HOST in
+	mips64el-linux-gnu | sparc64-linux-gnu)
+        ;;
+	alpha-linux-gnu | arm32v7-linux-gnu | m68k-linux-gnu | sh4-linux-gnu)
+	    sudo apt-get install qemu-user-static
+	    ;;
+	hppa-linux-gnu )
+	    sudo apt-get install -y qemu-user-static g++-5-hppa-linux-gnu
+	    ;;
+	i386-pc-linux-gnu)
+	    sudo apt-get install gcc-multilib g++-multilib;
+	    ;;
+	moxie-elf)
+	    echo 'deb [trusted=yes] https://repos.moxielogic.org:7114/MoxieLogic moxiedev main' | sudo tee -a /etc/apt/sources.list
+	    sudo apt-get clean # clear the cache
+	    sudo apt-get update ## -qq
+	    sudo apt-get update
+	    sudo apt-get install -y --allow-unauthenticated moxielogic-moxie-elf-gcc moxielogic-moxie-elf-gcc-c++ moxielogic-moxie-elf-gcc-libstdc++ moxielogic-moxie-elf-gdb-sim texinfo sharutils texlive dejagnu
+	    ;;
+	x86_64-w64-mingw32)
+	    sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine;
+	    ;;
+	i686-w32-mingw32)
+	    sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 wine;
+	    ;;
+    esac
+    case $HOST in
+	arm32v7-linux-gnu)
+        # don't install host tools
+        ;;
+	*)
+	    sudo apt-get install dejagnu texinfo sharutils
+	    ;;
+    esac
+fi
diff --git a/.ci/m32r-sim.exp b/.ci/m32r-sim.exp
new file mode 100644
index 0000000..c18123f
--- /dev/null
+++ b/.ci/m32r-sim.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {m32r-elf}
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# "m32r" is the name of the sim subdir in devo/sim.
+setup_sim m32r
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+
+set_board_info compiler  "[find_gcc]"
+set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
+
+# Configuration settings for testsuites
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,cannot_call_functions 1
+set_board_info gdb,skip_float_tests 1
+set_board_info gdb,can_reverse 1
+set_board_info gdb,use_precord 1
+
+# More time is needed
+set_board_info gcc,timeout 800
+set_board_info gdb,timeout 60
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size  5000
+
diff --git a/.ci/moxie-sim.exp b/.ci/moxie-sim.exp
new file mode 100644
index 0000000..32979ea
--- /dev/null
+++ b/.ci/moxie-sim.exp
@@ -0,0 +1,60 @@
+# Copyright (C) 2010  Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {moxie-elf}
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# "moxie" is the name of the sim subdir in devo/sim.
+setup_sim moxie
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+
+set_board_info compiler  "[find_gcc]"
+set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
+# No linker script needed.
+set_board_info ldscript "-Tsim.ld"
+
+# Configuration settings for testsuites
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,cannot_call_functions 1
+set_board_info gdb,skip_float_tests 1
+set_board_info gdb,can_reverse 1
+set_board_info gdb,use_precord 1
+
+# More time is needed
+set_board_info gcc,timeout 800
+set_board_info gdb,timeout 60
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size  5000
+
diff --git a/.ci/msvs-detect b/.ci/msvs-detect
new file mode 100755
index 0000000..601575c
--- /dev/null
+++ b/.ci/msvs-detect
@@ -0,0 +1,1103 @@
+#!/usr/bin/env bash
+# ################################################################################################ #
+# MetaStack Solutions Ltd.                                                                         #
+# ################################################################################################ #
+# Microsoft C Compiler Environment Detection Script                                                #
+# ################################################################################################ #
+# Copyright (c) 2016, 2017, 2018, 2019, 2020 MetaStack Solutions Ltd.                              #
+# ################################################################################################ #
+# Author: David Allsopp                                                                            #
+# 16-Feb-2016                                                                                      #
+# ################################################################################################ #
+# Redistribution and use in source and binary forms, with or without modification, are permitted   #
+# provided that the following two conditions are met:                                              #
+#     1. Redistributions of source code must retain the above copyright notice, this list of       #
+#        conditions and the following disclaimer.                                                  #
+#     2. Neither the name of MetaStack Solutions Ltd. nor the names of its contributors may be     #
+#        used to endorse or promote products derived from this software without specific prior     #
+#        written permission.                                                                       #
+#                                                                                                  #
+# This software is provided by the Copyright Holder 'as is' and any express or implied warranties  #
+# including, but not limited to, the implied warranties of merchantability and fitness for a       #
+# particular purpose are disclaimed. In no event shall the Copyright Holder be liable for any      #
+# direct, indirect, incidental, special, exemplary, or consequential damages (including, but not   #
+# limited to, procurement of substitute goods or services; loss of use, data, or profits; or       #
+# business interruption) however caused and on any theory of liability, whether in contract,       #
+# strict liability, or tort (including negligence or otherwise) arising in any way out of the use  #
+# of this software, even if advised of the possibility of such damage.                             #
+# ################################################################################################ #
+
+VERSION=0.4.1
+
+# debug [level=2] message
+debug ()
+{
+  if [[ -z ${2+x} ]] ; then
+    DEBUG_LEVEL=2
+  else
+    DEBUG_LEVEL=$1
+    shift
+  fi
+
+  if [[ $DEBUG -ge $DEBUG_LEVEL ]] ; then
+    echo "$1">&2
+  fi
+}
+
+# warning message
+warning ()
+{
+  if [[ $DEBUG -gt 0 ]] ; then
+    echo "Warning: $1">&2
+  fi
+}
+
+# reg_string key value
+# Retrieves a REG_SZ value from the registry (redirected on WOW64)
+reg_string ()
+{
+  reg query "$1" /v "$2" 2>/dev/null | tr -d '\r' | sed -ne "s/ *$2 *REG_SZ *//p"
+}
+
+# reg64_string key value
+# As reg_string, but without WOW64 redirection (i.e. guaranteed access to 64-bit registry)
+reg64_string ()
+{
+  $REG64 query "$1" /v "$2" 2>/dev/null | tr -d '\r' | sed -ne "s/ *$2 *REG_SZ *//p"
+}
+
+# find_in list file
+# Increments $RET if file does not exist in any of the directories in the *-separated list
+find_in ()
+{
+  debug 4 "Looking for $2 in $1"
+  if [[ -z $1 ]] ; then
+    STATUS=1
+  else
+    IFS=*
+    STATUS=1
+    for f in $1; do
+      if [[ -e "$f/$2" ]] ; then
+        STATUS=0
+        break
+      fi
+    done
+    unset IFS
+  fi
+  if [[ $STATUS -eq 1 ]] ; then
+    debug 4 "$2 not found"
+  fi
+  ((RET+=STATUS))
+}
+
+# check_environment PATH INC LIB name arch
+# By checking for the presence of various files, verifies that PATH, INC and LIB provide a complete
+# compiler and indicates this in its return status. RET is assumed to be zero on entry. $ASSEMBLER
+# will contain the name of assembler for this compiler series (ml.exe or ml64.exe).
+# The following files are checked:
+#   cl.exe        PATH  Microsoft C compiler
+#   kernel32.lib  LIB   Implies Windows SDK present
+#   link.exe      PATH  Microsoft Linker
+#   ml[64].exe    PATH  Microsoft Assembler (ml.exe or ml64.exe)
+#   msvcrt.lib    LIB   Implies C Runtime Libraries present
+#   mt.exe        PATH  Microsoft Manifest Tool
+#   oldnames.lib  LIB   Implies C Runtime Libraries present
+#   rc.exe        PATH  Microsoft Resource Compiler (implies tools present)
+#   stdlib.h      INC   Implies Microsoft C Runtime Libraries present
+#   windows.h     INC   Implies Windows SDK present
+# oldnames.lib is included, because certain SDKs and older versions don't correctly install the
+# entire runtime if only some options (e.g. Dynamic Runtime and not Static) are selected.
+check_environment ()
+{
+  debug 4 "Checking $4 ($5)"
+  for tool in cl rc link ; do
+    find_in "$1" $tool.exe
+  done
+
+  if [[ $RET -gt 0 ]] ; then
+    warning "Microsoft C Compiler tools not all found - $4 ($5) excluded"
+    return 1
+  fi
+
+  RET=0
+  find_in "$2" windows.h
+  find_in "$3" kernel32.lib
+  if [[ $RET -gt 0 ]] ; then
+    warning "Windows SDK not all found - $4 ($5) excluded"
+    return 1
+  fi
+
+  RET=0
+  find_in "$2" stdlib.h
+  find_in "$3" msvcrt.lib
+  find_in "$3" oldnames.lib
+  if [[ $RET -gt 0 ]] ; then
+    warning "Microsoft C runtime library not all found - $4 ($5) excluded"
+    return 1
+  fi
+
+  ASSEMBLER=ml${5#x}
+  ASSEMBLER=${ASSEMBLER%86}.exe
+  if [[ $ML_REQUIRED -eq 1 ]] ; then
+    RET=0
+    find_in "$1" $ASSEMBLER
+    if [[ $RET -gt 0 ]] ; then
+      warning "Microsoft Assembler ($ASSEMBLER) not found - $4 ($5)"
+      return 1
+    fi
+  fi
+
+  if [[ $MT_REQUIRED -eq 1 ]] ; then
+    RET=0
+    find_in "$1" mt.exe
+    if [[ $RET -gt 0 ]] ; then
+      warning "Microsoft Manifest Tool not found - $4 ($5)"
+      return 1
+    fi
+  fi
+
+  return 0
+}
+
+# output VAR value arch
+# Outputs a command for setting VAR to value based on $OUTPUT. If $ENV_ARCH is arch, then an empty
+# value (i.e. no change) is output.
+output ()
+{
+  if [[ $3 = $ENV_ARCH ]] ; then
+    VALUE=
+  else
+    VALUE=$2
+  fi
+  case "$OUTPUT" in
+    0)
+      echo "$1='${VALUE//\'/\'\"\'\"\'}'";;
+    1)
+      VALUE=${VALUE//#/\\\#}
+      echo "$1=${VALUE//\$/\$\$}";;
+  esac
+}
+
+# DEBUG       Debugging level
+# MODE        Operation mode
+#               0 - Normal
+#               1 - --all
+#               2 - --help
+#               3 - --version
+# OUTPUT      --output option
+#               0 - =shell
+#               1 - =make
+# MT_REQUIRED --with-mt
+# ML_REQUIRED --with-assembler
+# TARGET_ARCH Normalised --arch (x86, x64 or blank for both)
+# LEFT_ARCH   \ If $TARGET_ARCH is blank, these will be x86 and x64 respectively, otherwise they
+# RIGHT_ARCH  / equal $TARGET_ARCH
+# SCAN_ENV    Controls from parsing whether the environment should be queried for a compiler
+DEBUG=0
+MODE=0
+OUTPUT=0
+MT_REQUIRED=0
+ML_REQUIRED=0
+TARGET_ARCH=
+SCAN_ENV=0
+
+# Various PATH messing around means it's sensible to know where tools are now
+WHICH=$(which which)
+
+if [[ $(uname --operating-system 2>/dev/null) = "Msys" ]] ; then
+  # Prevent MSYS from translating command line switches to paths
+  SWITCH_PREFIX='//'
+else
+  SWITCH_PREFIX='/'
+fi
+
+# Parse command-line. At the moment, the short option which usefully combines with anything is -d,
+# so for the time being, combining short options is not permitted, as the loop becomes even less
+# clear with getopts. GNU getopt isn't installed by default on Cygwin...
+if [[ $@ != "" ]] ; then
+  while true ; do
+    case "$1" in
+      # Mode settings ($MODE)
+      -a|--all)
+        MODE=1
+        shift 1;;
+      -h|--help)
+        MODE=2
+        shift;;
+      -v|--version)
+        MODE=3
+        shift;;
+
+      # Simple flags ($MT_REQUIRED and $ML_REQUIRED)
+      --with-mt)
+        MT_REQUIRED=1
+        shift;;
+      --with-assembler)
+        ML_REQUIRED=1
+        shift;;
+
+      # -o, --output ($OUTPUT)
+      -o|--output)
+        case "$2" in
+          shell)
+            ;;
+          make)
+            OUTPUT=1;;
+          *)
+            echo "$0: unrecognised option for $1: '$2'">&2
+            exit 2;;
+        esac
+        shift 2;;
+      -oshell|--output=shell)
+        shift;;
+      -omake|--output=make)
+        OUTPUT=1
+        shift;;
+      -o*)
+        echo "$0: unrecognised option for -o: '${1#-o}'">&2
+        exit 2;;
+      --output=*)
+        echo "$0: unrecognised option for --output: '${1#--output=}'">&2
+        exit 2;;
+
+      # -x, --arch ($TARGET_ARCH)
+      -x|--arch)
+        case "$2" in
+          86|x86)
+            TARGET_ARCH=x86;;
+          64|x64)
+            TARGET_ARCH=x64;;
+          *)
+            echo "$0: unrecognised option for $1: '$2'">&2
+            exit 2
+        esac
+        shift 2;;
+      -x86|-xx86|--arch=x86|--arch=86)
+        TARGET_ARCH=x86
+        shift;;
+      -x64|-xx64|--arch=x64|--arch=64)
+        TARGET_ARCH=x64
+        shift;;
+      -x*)
+        echo "$0: unrecognised option for -x: '${1#-x}'">&2
+        exit 2;;
+      --arch=*)
+        echo "$0: unrecognised option for --arch: '${1#--arch}'">&2
+        exit 2;;
+
+      # -d, --debug ($DEBUG)
+      -d*)
+        DEBUG=${1#-d}
+        if [[ -z $DEBUG ]] ; then
+          DEBUG=1
+        fi
+        shift;;
+      --debug=*)
+        DEBUG=${1#*=}
+        shift;;
+      --debug)
+        DEBUG=1
+        shift;;
+
+      # End of option marker
+      --)
+        shift
+        break;;
+
+      # Invalid options
+      --*)
+        echo "$0: unrecognised option: '${1%%=*}'">&2
+        exit 2;;
+      -*)
+        echo "$0: unrecognised option: '${1:1:1}'">&2
+        exit 2;;
+
+      # MSVS_PREFERENCE (without end-of-option marker)
+      *)
+        break;;
+    esac
+  done
+
+  if [[ -n ${1+x} ]] ; then
+    if [[ $MODE -eq 1 ]] ; then
+      echo "$0: cannot specify MSVS_PREFERENCE and --all">&2
+      exit 2
+    else
+      MSVS_PREFERENCE="$@"
+    fi
+  fi
+fi
+
+# Options sanitising
+if [[ $MODE -eq 1 ]] ; then
+  if [[ -n $TARGET_ARCH ]] ; then
+    echo "$0: --all and --arch are mutually exclusive">&2
+    exit 2
+  fi
+  MSVS_PREFERENCE=
+  SCAN_ENV=1
+elif [[ -z ${MSVS_PREFERENCE+x} ]] ; then
+  MSVS_PREFERENCE='@;VS16.*;VS15.*;VS14.0;VS12.0;VS11.0;10.0;9.0;8.0;7.1;7.0'
+fi
+
+MSVS_PREFERENCE=${MSVS_PREFERENCE//;/ }
+
+if [[ -z $TARGET_ARCH ]] ; then
+  LEFT_ARCH=x86
+  RIGHT_ARCH=x64
+else
+  LEFT_ARCH=$TARGET_ARCH
+  RIGHT_ARCH=$TARGET_ARCH
+fi
+
+# Command line parsing complete (MSVS_PREFERENCE pending)
+
+NAME="Microsoft C Compiler Environment Detection Script"
+case $MODE in
+  2)
+    echo "$NAME"
+    echo "Queries the environment and registry to locate Visual Studio / Windows SDK"
+    echo "installations and uses their initialisation scripts (SetEnv.cmd, vcvarsall.bat,"
+    echo "etc.) to determine INCLUDE, LIB and PATH alterations."
+    echo
+    echo "Usage:"
+    echo "  $0 [OPTIONS] [--] [MSVS_PREFERENCE]"
+    echo
+    echo "Options:"
+    echo "  -a, --all            Display all available compiler packages"
+    echo "  -x, --arch=ARCH      Only consider packages for ARCH (x86 or x64). Default is"
+    echo "                       to return packages containing both architectures"
+    echo "  -d, --debug[=LEVEL]  Set debug messages level"
+    echo "  -h, --help           Display this help screen"
+    echo "  -o, --output=OUTPUT  Set final output. Default is shell. Valid values:"
+    echo "                         shell - shell assignments, for use with eval"
+    echo "                         make  - make assignments, for inclusion in a Makefile"
+    echo "  -v, --version        Display the version"
+    echo "      --with-mt        Only consider packages including the Manifest Tool"
+    echo "      --with-assembler Only consider packages including an assembler"
+    echo
+    echo "If MSVS_PREFERENCE is not given, then the environment variable MSVS_PREFERENCE"
+    echo "is read. MSVS_PREFERENCE is a semicolon separated list of preferred versions."
+    echo "Three kinds of version notation are supported:"
+    echo "  1. @ - which refers to the C compiler found in PATH (if it can be identified)"
+    echo "     (this allows the C compiler corresponding to the opposite architecture to"
+    echo "     be selected, if possible)."
+    echo "  2. mm.n - which refers to a Visual Studio version (e.g. 14.0, 7.1) but which"
+    echo "     also allows an SDK to provide the compiler (e.g. Windows SDK 7.1 provides"
+    echo "     10.0). Visual Studio packages are always preferred ahead of SDKs."
+    echo "  3. SPEC - an actual package specification. Visual Studio packages are VSmm.n"
+    echo "     (e.g. VS14.0, VS7.1) and SDK packages are SDKm.n (e.g. SDK7.1)."
+    echo "     Any Visual Studio 2017 update can be selected with VS15.*"
+    echo "The default behaviour is to match the environment compiler followed by the most"
+    echo "recent version of the compiler."
+    exit 0;;
+  3)
+    echo "$NAME"
+    echo "Version $VERSION"
+    exit 0;;
+esac
+
+# Known compiler packages. Visual Studio .NET 2002 onwards. Detection is in place for Visual Studio
+# 2005 Express, but because it doesn't include a Windows SDK, it can only ever be detected if the
+# script has been launched from within a Platform SDK command prompt (this provides the Windows
+# Headers and Libraries which allows this script to detect the rest).
+# Each element is either a Visual Studio or SDK package and the value is the syntax for a bash
+# associative array to be eval'd. Each of these contains the following properties:
+#   NAME           - the friendly name of the package
+#   ENV            - (VS only) the version-specific portion of the VSCOMNTOOLS environment variable
+#   VERSION        - (VS only) version number of the package
+#   ARCH           - Lists the architectures available in this version
+#   ARCH_SWITCHES  - The script is assumed to accept x86 and x64 to indicate architecture. This key
+#                    contains another eval'd associative array allowing alternate values to be given
+#   SETENV_RELEASE - (SDK only) script switch necessary to select release than debugging versions
+#   EXPRESS        - (VS only) the prefix to the registry key to detect the Express edition
+#   EXPRESS_ARCH   - (VS only) overrides ARCH if Express edition is detected
+#   EXPRESS_ARCH_SWITCHES - (VS only) overrides ARCH_SWITCHES if Express edition is detected
+#   VC_VER         - (SDK only) specifies the version of the C Compilers included in the SDK (SDK
+#                    equivalent of the VERSION key)
+#   REG_KEY        - (SDK only) registry key to open to identify this package installation
+#   REG_VALUE      - (SDK only) registry value to query to identify this package installation
+#   VSWHERE        - (VS 2017+) is 1 if the compiler can only be detected using vswhere
+# For a while, Windows SDKs followed a standard pattern which is stored in the SDK element and
+# copied to the appropriate version. SDKs after 7.1 do not include compilers, and so are not
+# captured (as of Visual Studio 2015, the Windows SDK is official part of Visual Studio).
+declare -A COMPILERS
+SDK52_KEY='HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3'
+COMPILERS=(
+  ["VS7.0"]='(
+    ["NAME"]="Visual Studio .NET 2002"
+    ["ENV"]=""
+    ["VERSION"]="7.0"
+    ["ARCH"]="x86")'
+  ["VS7.1"]='(
+    ["NAME"]="Visual Studio .NET 2003"
+    ["ENV"]="71"
+    ["VERSION"]="7.1"
+    ["ARCH"]="x86")'
+  ["VS8.0"]='(
+    ["NAME"]="Visual Studio 2005"
+    ["ENV"]="80"
+    ["VERSION"]="8.0"
+    ["EXPRESS"]="VC"
+    ["ARCH"]="x86 x64"
+    ["EXPRESS_ARCH"]="x86")'
+  ["VS9.0"]='(
+    ["NAME"]="Visual Studio 2008"
+    ["ENV"]="90"
+    ["VERSION"]="9.0"
+    ["EXPRESS"]="VC"
+    ["ARCH"]="x86 x64"
+    ["EXPRESS_ARCH"]="x86")'
+  ["VS10.0"]='(
+    ["NAME"]="Visual Studio 2010"
+    ["ENV"]="100"
+    ["VERSION"]="10.0"
+    ["EXPRESS"]="VC"
+    ["ARCH"]="x86 x64"
+    ["EXPRESS_ARCH"]="x86")'
+  ["VS11.0"]='(
+    ["NAME"]="Visual Studio 2012"
+    ["ENV"]="110"
+    ["VERSION"]="11.0"
+    ["EXPRESS"]="WD"
+    ["ARCH"]="x86 x64"
+    ["EXPRESS_ARCH_SWITCHES"]="([\"x64\"]=\"x86_amd64\")")'
+  ["VS12.0"]='(
+    ["NAME"]="Visual Studio 2013"
+    ["ENV"]="120"
+    ["VERSION"]="12.0"
+    ["EXPRESS"]="WD"
+    ["ARCH"]="x86 x64"
+    ["EXPRESS_ARCH_SWITCHES"]="([\"x64\"]=\"x86_amd64\")")'
+  ["VS14.0"]='(
+    ["NAME"]="Visual Studio 2015"
+    ["ENV"]="140"
+    ["VERSION"]="14.0"
+    ["ARCH"]="x86 x64")'
+  ["VS15.*"]='(
+    ["NAME"]="Visual Studio 2017"
+    ["VSWHERE"]="1")'
+  ["VS16.*"]='(
+    ["NAME"]="Visual Studio 2019"
+    ["VSWHERE"]="1")'
+  ["SDK5.2"]='(
+    ["NAME"]="Windows Server 2003 SP1 SDK"
+    ["VC_VER"]="8.0"
+    ["REG_KEY"]="$SDK52_KEY"
+    ["REG_VALUE"]="Install Dir"
+    ["SETENV_RELEASE"]="/RETAIL"
+    ["ARCH"]="x64"
+    ["ARCH_SWITCHES"]="([\"x64\"]=\"/X64\")")'
+  ["SDK"]='(
+    ["NAME"]="Generalised Windows SDK"
+    ["SETENV_RELEASE"]="/Release"
+    ["ARCH"]="x86 x64"
+    ["ARCH_SWITCHES"]="([\"x86\"]=\"/x86\" [\"x64\"]=\"/x64\")")'
+  ["SDK6.1"]='(
+    ["NAME"]="Windows Server 2008 with .NET 3.5 SDK"
+    ["VC_VER"]="9.0")'
+  ["SDK7.0"]='(
+    ["NAME"]="Windows 7 with .NET 3.5 SP1 SDK"
+    ["VC_VER"]="9.0")'
+  ["SDK7.1"]='(
+    ["NAME"]="Windows 7 with .NET 4 SDK"
+    ["VC_VER"]="10.0")'
+)
+
+# FOUND is ultimately an associative array containing installed compiler packages. It's
+# hijacked here as part of MSVS_PREFERENCE validation.
+# Ultimately, it contains a copy of the value from COMPILERS with the following extra keys:
+#   IS_EXPRESS - (VS only) indicates whether the Express edition was located
+#   SETENV     - (SDK only) the full location of the SetEnv.cmd script
+#   ASSEMBLER  - the name of the assembler (ml or ml64)
+#   MSVS_PATH \
+#   MSVS_INC   > prefix values for PATH, INCLUDE and LIB determined by running the scripts.
+#   MSVS_LIB  /
+declare -A FOUND
+
+# Check that MSVS_PREFERENCE is valid and contains no repetitions.
+for v in $MSVS_PREFERENCE ; do
+  if [[ -n ${FOUND[$v]+x} ]] ; then
+    echo "$0: corrupt MSVS_PREFERENCE: repeated '$v'">&2
+    exit 2
+  fi
+  if [[ $v != "@" ]] ; then
+    if [[ -z ${COMPILERS[$v]+x} && -z ${COMPILERS["VS$v"]+x} && -z ${COMPILERS[${v%.*}.*]+x} ]] ; then
+      echo "$0: corrupt MSVS_PREFERENCE: unknown compiler '$v'">&2
+      exit 2
+    fi
+  else
+    SCAN_ENV=1
+  fi
+  FOUND["$v"]=""
+done
+
+# Reset FOUND for later use.
+FOUND=()
+
+# Scan the environment for a C compiler, and check that it's valid. Throughout the rest of the
+# script, it is assumed that if ENV_ARCH is set then there is a valid environment compiler.
+if [[ $SCAN_ENV -eq 1 ]] ; then
+  if "$WHICH" cl >/dev/null 2>&1 ; then
+    # Determine its architecture from the Microsoft Logo line.
+    ENV_ARCH=$(cl 2>&1 | head -1 | tr -d '\r')
+    case "${ENV_ARCH#* for }" in
+      x64|AMD64)
+        ENV_ARCH=x64;;
+      80x86|x86)
+        ENV_ARCH=x86;;
+      *)
+        echo "Unable to identify C compiler architecture from '${ENV_ARCH#* for }'">&2
+        echo "Environment C compiler discarded">&2
+        unset ENV_ARCH;;
+    esac
+
+    # Environment variable names are a bit of a nightmare on Windows - they are actually case
+    # sensitive (at the kernel level) but not at the user level! To compound the misery is that SDKs
+    # use Include and Lib where vcvars32 tends to use INCLUDE and LIB. Windows versions also contain
+    # a mix of Path and PATH, but fortunately Cygwin normalises that to PATH for us! For this
+    # reason, use env to determine the actual case of the LIB and INCLUDE variables.
+    if [[ -n ${ENV_ARCH+x} ]] ; then
+      RET=0
+      ENV_INC=$(env | sed -ne 's/^\(INCLUDE\)=.*/\1/pi')
+      ENV_LIB=$(env | sed -ne 's/^\(LIB\)=.*/\1/pi')
+      if [[ -z $ENV_INC || -z $ENV_LIB ]] ; then
+        warning "Microsoft C Compiler Include and/or Lib not set - Environment C compiler ($ENV_ARCH) excluded"
+        unset ENV_ARCH
+      else
+        if check_environment "${PATH//:/*}" \
+                             "${!ENV_INC//;/*}" \
+                             "${!ENV_LIB//;/*}" \
+                             "Environment C compiler" \
+                             "$ENV_ARCH" ; then
+          ENV_CL=$("$WHICH" cl)
+          ENV_cl=${ENV_CL,,}
+          ENV_cl=${ENV_cl/bin\/*_/bin\/}
+          debug "Environment appears to include a compiler at $ENV_CL"
+          if [[ -n $TARGET_ARCH && $TARGET_ARCH != $ENV_ARCH ]] ; then
+            debug "But architecture doesn't match required value"
+            unset ENV_ARCH
+          fi
+        else
+          unset ENV_ARCH
+        fi
+      fi
+    fi
+  fi
+fi
+
+# Even if launched from a 64-bit Command Prompt, Cygwin is usually 32-bit and so the scripts
+# executed will inherit that fact. This is a problem when querying the registry, but fortunately
+# WOW64 provides a mechanism to break out of the 32-bit environment by mapping $WINDIR/sysnative to
+# the real 64-bit programs.
+# Thus:
+#   MS_ROOT is the 32-bit Microsoft Registry key (all Visual Studio keys are located there)
+#   REG64 is the processor native version of the reg utility (allowing 64-bit keys to be read for
+#         the SDKs)
+if [[ -n ${PROCESSOR_ARCHITEW6432+x} ]] ; then
+  debug "WOW64 detected"
+  MS_ROOT='HKLM\SOFTWARE\Microsoft'
+  REG64=$WINDIR/sysnative/reg
+else
+  MS_ROOT='HKLM\SOFTWARE\Wow6432Node\Microsoft'
+  REG64=reg
+fi
+
+# COMPILER contains each eval'd element from COMPILERS
+declare -A COMPILER
+
+# Scan the registry for compiler package (vswhere is later)
+for i in "${!COMPILERS[@]}" ; do
+  eval COMPILER=${COMPILERS[$i]}
+
+  if [[ -n ${COMPILER["ENV"]+x} ]] ; then
+    # Visual Studio package - test for its environment variable
+    ENV=VS${COMPILER["ENV"]}COMNTOOLS
+    if [[ -n ${!ENV+x} ]] ; then
+      debug "$ENV is a candidate"
+      TEST_PATH=${!ENV%\"}
+      TEST_PATH=$(cygpath -u -f - <<< ${TEST_PATH#\"})
+      if [[ -e $TEST_PATH/vsvars32.bat ]] ; then
+        debug "Directory pointed to by $ENV contains vsvars32.bat"
+        EXPRESS=0
+        # Check for the primary Visual Studio registry value indicating installation
+        INSTALL_DIR=$(reg_string "$MS_ROOT\\VisualStudio\\${COMPILER["VERSION"]}" InstallDir)
+        if [[ -z $INSTALL_DIR ]] ; then
+          if [[ -n ${COMPILER["EXPRESS"]+x} ]] ; then
+            TEST_KEY="$MS_ROOT\\${COMPILER["EXPRESS"]}Express\\${COMPILER["VERSION"]}"
+            INSTALL_DIR=$(reg_string "$TEST_KEY" InstallDir)
+            # Exception for Visual Studio 2005 Express, which doesn't set the registry correctly, so
+            # set INSTALL_DIR to a fake value to pass the next test.
+            if [[ ${COMPILER["VERSION"]} = "8.0" ]] ; then
+              INSTALL_DIR=$(cygpath -w "$TEST_PATH")
+              EXPRESS=1
+            else
+              if [[ -z $INSTALL_DIR ]] ; then
+                warning "vsvars32.bat found, but registry value not located (Exp or Pro)"
+              else
+                EXPRESS=1
+              fi
+            fi
+          else
+            warning "vsvars32.bat found, but registry value not located"
+          fi
+        fi
+
+        if [[ -n $INSTALL_DIR ]] ; then
+          if [[ ${TEST_PATH%/} = $(cygpath -u "$INSTALL_DIR\\..\\Tools") ]] ; then
+            RESULT=${COMPILERS[$i]%)}
+            DISPLAY=${COMPILER["NAME"]}
+            if [[ $EXPRESS -eq 1 ]] ; then
+              DISPLAY="$DISPLAY Express"
+            fi
+            FOUND+=(["$i"]="$RESULT [\"DISPLAY\"]=\"$DISPLAY\" [\"IS_EXPRESS\"]=\"$EXPRESS\")")
+            debug "${COMPILER["NAME"]} accepted for further detection"
+          else
+            warning "$ENV doesn't agree with registry"
+          fi
+        else
+          warning "vsvars32.bat found, but registry settings not found"
+        fi
+      else
+        warning "$ENV set, but vsvars32.bat not found"
+      fi
+    fi
+  elif [[ -n ${COMPILER["REG_KEY"]+x} ]] ; then
+    # SDK with explicit registry detection value
+    INSTALL_DIR=$(reg64_string "${COMPILER["REG_KEY"]}" "${COMPILER["REG_VALUE"]}")
+    if [[ -n $INSTALL_DIR ]] ; then
+      TEST_PATH=$(cygpath -u "$INSTALL_DIR")
+      if [[ -e $TEST_PATH/SetEnv.cmd ]] ; then
+        RESULT=${COMPILERS[$i]%)}
+        FOUND+=(["$i"]="$RESULT [\"DISPLAY\"]=\"${COMPILER["NAME"]}\" [\"SETENV\"]=\"$INSTALL_DIR\\SetEnv.cmd\")")
+        debug "${COMPILER["NAME"]} accepted for further detection"
+      else
+        warning "Registry set for Windows Server 2003 SDK, but SetEnv.cmd not found"
+      fi
+    fi
+  fi
+done
+
+# Now enumerate installed SDKs for v6.0+
+SDK_ROOT='HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows'
+for i in $(reg query "$SDK_ROOT" 2>/dev/null | tr -d '\r' | sed -ne '/Windows\\v/s/.*\\//p') ; do
+  debug "Analysing SDK key $SDK_ROOT\\$i"
+  INSTALL_DIR=$(reg_string "$SDK_ROOT\\$i" InstallationFolder)
+  if [[ -n $INSTALL_DIR ]] ; then
+    TEST_PATH=$(cygpath -u "$INSTALL_DIR")
+    if [[ -e $TEST_PATH/Bin/SetEnv.cmd ]] ; then
+      if [[ -z ${COMPILERS["SDK${i#v}"]+x} ]] ; then
+        warning "SDK $i is not known to this script - assuming compatibility"
+        DISPLAY="Windows SDK $i"
+      else
+        eval COMPILER=${COMPILERS["SDK${i#v}"]}
+        DISPLAY=${COMPILER['NAME']}
+      fi
+      RESULT=${COMPILERS['SDK']%)}
+      FOUND+=(["SDK${i/v/}"]="$RESULT [\"DISPLAY\"]=\"$DISPLAY\" [\"SETENV\"]=\"$INSTALL_DIR\\Bin\\SetEnv.cmd\")")
+    else
+      if [[ -n ${COMPILERS["SDK${i#v}"]+x} ]] ; then
+        warning "Registry set for Windows SDK $i, but SetEnv.cmd not found"
+      fi
+    fi
+  else
+    warning "Registry key for Windows SDK $i doesn't contain expected InstallationFolder value"
+  fi
+done
+
+# Now enumerate Visual Studio 2017+ instances
+VSWHERE=$(dirname $(realpath $0))/vswhere.exe
+if [[ ! -x $VSWHERE ]] ; then
+  VSWHERE="$(printenv 'ProgramFiles(x86)')\\Microsoft Visual Studio\\Installer\\vswhere.exe"
+  VSWHERE=$(echo $VSWHERE| cygpath -f -)
+fi
+if [[ -x $VSWHERE ]] ; then
+  debug "$VSWHERE found"
+  while IFS= read -r line; do
+    case ${line%: *} in
+      instanceId)
+        INSTANCE=${line#*: };;
+      installationPath)
+        INSTANCE_PATH=${line#*: };;
+      installationVersion)
+        INSTANCE_VER=${line#*: }
+        INSTANCE_VER=${INSTANCE_VER%.*}
+        INSTANCE_VER=${INSTANCE_VER%.*};;
+      displayName)
+        INSTANCE_NAME=${line#*: }
+        debug "Looking at $INSTANCE in $INSTANCE_PATH ($INSTANCE_VER $INSTANCE_NAME)"
+        if [[ -e "$(echo $INSTANCE_PATH| cygpath -f -)/VC/Auxiliary/Build/vcvarsall.bat" ]] ; then
+          debug "vcvarsall.bat found"
+          FOUND+=(["VS$INSTANCE_VER"]="([\"DISPLAY\"]=\"$INSTANCE_NAME\" [\"ARCH\"]=\"x86 x64\" [\"SETENV\"]=\"$INSTANCE_PATH\\VC\\Auxiliary\\Build\\vcvarsall.bat\" [\"SETENV_RELEASE\"]=\"\")")
+        else
+          warning "vcvarsall.bat not found for $INSTANCE"
+        fi;;
+    esac
+  done < <("$VSWHERE" -all -nologo | tr -d '\r')
+fi
+
+if [[ $DEBUG -gt 1 ]] ; then
+  for i in "${!FOUND[@]}" ; do
+    echo "Inspect $i">&2
+  done
+fi
+
+# Basic scanning is complete, now interrogate the packages which seem to be installed and ensure
+# that they pass the check_environment tests.
+
+# CANDIDATES is a hash table of the keys of FOUND. The result of the next piece of processing is to
+# derive two arrays PREFERENCE and TEST. TEST will contain a list of the keys of FOUND in the order
+# in which they should be evaluated. PREFERENCE contains a parsed version of MSVS_PREFERENCE but
+# filtered on the basis of the compiler packages already identified. The current "hoped for"
+# preference is stored in $pref (the index into PREFERENCE) and $PREF (which is
+# ${PREFERENCE[$pref]}). These two arrays together allow testing to complete quickly if the desired
+# version is found (note that often this won't be possible as the @ environment option requires all
+# packages to be tested in order to be sure that the environment compiler is not ambiguous).
+declare -A CANDIDATES
+for i in "${!FOUND[@]}" ; do
+  CANDIDATES[$i]="";
+done
+
+# For --all, act as though MSVS_PREFERENCE were "@" because this causes all packages to be tested.
+if [[ $MODE -eq 1 ]] ; then
+  PREFER_ENV=1
+  PREFERENCE=("@")
+else
+  PREFER_ENV=0
+  PREFERENCE=()
+fi
+
+TEST=()
+for i in $MSVS_PREFERENCE ; do
+  if [[ $i = "@" ]] ; then
+    if [[ -n ${ENV_ARCH+x} ]] ; then
+      PREFERENCE+=("@")
+      PREFER_ENV=1
+    else
+      debug "Preference @ ignored since no environment compiler selected"
+    fi
+  else
+    if [[ -n ${COMPILERS[$i]+x} || -n ${COMPILERS[${i%.*}.*]+x} ]] ; then
+      if [[ -n ${CANDIDATES[$i]+x} ]] ; then
+        unset CANDIDATES[$i]
+        TEST+=($i)
+        PREFERENCE+=($i)
+      elif [[ ${i#*.} = "*" ]] ; then
+        INSTANCES=
+        for j in "${!CANDIDATES[@]}" ; do
+          if [[ "${j%.*}.*" = $i ]] ; then
+            unset CANDIDATES[$j]
+            INSTANCES="$INSTANCES $j"
+          fi
+        done
+        INSTANCES="$(sort -r <<< "${INSTANCES// /$'\n'}")"
+        eval TEST+=($INSTANCES)
+        eval PREFERENCE+=($INSTANCES)
+      fi
+    else
+      if [[ -n ${CANDIDATES["VS$i"]+x} ]] ; then
+        unset CANDIDATES["VS$i"]
+        TEST+=("VS$i")
+        PREFERENCE+=("VS$i")
+      fi
+      SDKS=
+      for j in "${!COMPILERS[@]}" ; do
+        eval COMPILER=${COMPILERS[$j]}
+        if [[ -n ${COMPILER["VC_VER"]+x} ]] ; then
+          if [[ $i = ${COMPILER["VC_VER"]} && -n ${CANDIDATES[$j]+x} ]] ; then
+            unset CANDIDATES[$j]
+            SDKS="$j $SDKS"
+          fi
+        fi
+      done
+      SDKS=${SDKS% }
+      SDKS="$(sort -r <<< "${SDKS// /$'\n'}")"
+      SDKS=${SDKS//$'\n'/ }
+      eval TEST+=($SDKS)
+      eval PREFERENCE+=($SDKS)
+    fi
+  fi
+done
+
+# If MSVS_PREFERENCE includes @, add any remaining items from CANDIDATES to TEST, otherwise remove
+# them from FOUND so that they don't accidentally get reported on later.
+for i in "${!CANDIDATES[@]}" ; do
+  if [[ $PREFER_ENV -eq 1 ]] ; then
+    TEST+=($i)
+  else
+    unset FOUND[$i]
+  fi
+done
+
+# Initialise pref and PREF to ${PREFERENCE[0]}
+pref=0
+PREF=${PREFERENCE[0]}
+
+if [[ $DEBUG -gt 1 ]] ; then
+  for i in "${!TEST[@]}" ; do
+    echo "Test ${TEST[$i]}">&2
+  done
+fi
+
+
+# Now run each compiler's environment script and then test whether it is suitable. During this loop,
+# attempt to identify the environment C compiler (if one was found). The environment C compiler is
+# strongly identified if the full location of cl matches the one in PATH and both LIB and INCLUDE
+# contain the strings returned by the script in an otherwise empty environment (if one or both of
+# the LIB and INCLUDE variables do not contain the string returned, then the compiler is weakly
+# identified). If the environment compiler is strongly identified by more than one package, then it
+# is not identified at all; if it is strongly identified by no packages but weakly identified by
+# exactly 1, then we grudgingly accept that that's probably the one.
+ENV_COMPILER=
+WEAK_ENV=
+
+# ARCHINFO contains the appropriate ARCH_SWITCHES associative array for each compiler.
+declare -A ARCHINFO
+
+for i in "${TEST[@]}" ; do
+  CURRENT=${FOUND[$i]}
+  eval COMPILER=$CURRENT
+  # At the end of this process, the keys of FOUND will be augmented with the architecture found in
+  # each case (so if "VS14.0" was in FOUND from the scan and both the x86 and x64 compilers are
+  # valid, then at the end of this loop FOUND will contain "VS14.0-x86" and "VS14.0-x64").
+  unset FOUND[$i]
+
+  if [[ ${COMPILER["IS_EXPRESS"]}0 -gt 0 && -n ${COMPILER["EXPRESS_ARCH_SWITCHES"]+x} ]] ; then
+    eval ARCHINFO=${COMPILER["EXPRESS_ARCH_SWITCHES"]}
+  elif [[ -n ${COMPILER["ARCH_SWITCHES"]+x} ]] ; then
+    eval ARCHINFO=${COMPILER["ARCH_SWITCHES"]}
+  else
+    ARCHINFO=()
+  fi
+
+  # Determine the script to be executed and any non-architecture specific switches needed.
+  # $ENV is will contain the value of the environment variable for the compiler (empty for an SDK)
+  # which is required for Visual Studio 7.x shim later.
+  if [[ -n ${COMPILER["ENV"]+x} ]] ; then
+    ENV=VS${COMPILER["ENV"]}COMNTOOLS
+    ENV=${!ENV%\"}
+    ENV=${ENV#\"}
+    if [[ ${COMPILER["ENV"]}0 -ge 800 ]] ; then
+      SCRIPT="$(cygpath -d -f - <<< $ENV)\\..\\..\\VC\\vcvarsall.bat"
+      SCRIPT_SWITCHES=
+    else
+      SCRIPT="$(cygpath -d -f - <<< $ENV)\\vsvars32.bat"
+      SCRIPT_SWITCHES=
+    fi
+  else
+    ENV=
+    SCRIPT=${COMPILER["SETENV"]}
+    SCRIPT_SWITCHES=${COMPILER["SETENV_RELEASE"]}
+  fi
+  # For reasons of escaping, the script is executed using its basename so the directory needs
+  # prepending to PATH.
+  DIR=$(dirname "$SCRIPT" | cygpath -u -f -)
+
+  if [[ ${COMPILER["IS_EXPRESS"]} -gt 0 && -n ${COMPILER["EXPRESS_ARCH"]+x} ]] ; then
+    ARCHS=${COMPILER["EXPRESS_ARCH"]}
+  else
+    ARCHS=${COMPILER["ARCH"]}
+  fi
+
+  for arch in $ARCHS ; do
+    # Determine the command line switch for this architecture
+    if [[ -n ${ARCHINFO[$arch]+x} ]] ; then
+      ARCH_SWITCHES=${ARCHINFO[$arch]}
+    else
+      ARCH_SWITCHES=$arch
+    fi
+
+    # Run the script in order to determine changes made to PATH, INCLUDE and LIB. These scripts
+    # always prepend changes to the environment variables.
+    MSVS_PATH=
+    MSVS_LIB=
+    MSVS_INC=
+
+    COMMAND='%EXEC_SCRIPT% && echo XMARKER && echo !PATH! && echo !LIB! && echo !INCLUDE!'
+
+    # Note that EXEC_SCRIPT must have ARCH_SWITCHES first for older Platform SDKs (newer ones parse
+    # arguments properly)
+    if [[ $DEBUG -gt 3 ]] ; then
+      printf "Scanning %s... " "$(basename "$SCRIPT") $ARCH_SWITCHES $SCRIPT_SWITCHES">&2
+    fi
+    num=0
+    while IFS= read -r line; do
+      case $num in
+        0)
+          MSVS_PATH=${line%% };;
+        1)
+          MSVS_LIB=${line%% };;
+        2)
+          MSVS_INC=${line%% };;
+      esac
+      ((num++))
+    done < <(INCLUDE='' LIB='' PATH="?msvs-detect?:$DIR:$PATH" ORIGINALPATH='' \
+             EXEC_SCRIPT="$(basename "$SCRIPT") $ARCH_SWITCHES $SCRIPT_SWITCHES" \
+             $(cygpath "$COMSPEC") ${SWITCH_PREFIX}v:on ${SWITCH_PREFIX}c $COMMAND 2>/dev/null | grep -F XMARKER -A 3 | tr -d '\015' | tail -3)
+    if [[ $DEBUG -gt 3 ]] ; then
+      echo done>&2
+    fi
+
+    if [[ -n $MSVS_PATH ]] ; then
+      # Translate MSVS_PATH back to Cygwin notation (/cygdrive, etc. and colon-separated)
+      MSVS_PATH=$(cygpath "$MSVS_PATH" -p)
+      # Remove any trailing / from elements of MSVS_PATH
+      MSVS_PATH=$(echo "$MSVS_PATH" | sed -e 's|\([^:]\)/\+\(:\|$\)|\1\2|g;s/?msvs-detect?.*//')
+      # Guarantee that MSVS_PATH ends with a single :
+      MSVS_PATH="${MSVS_PATH%%:}:"
+    fi
+    # Ensure that both variables end with a semi-colon (it doesn't matter if for some erroneous
+    # reason they have come back blank, because check_environment will shortly fail)
+    MSVS_LIB="${MSVS_LIB%%;};"
+    MSVS_INC="${MSVS_INC%%;};"
+
+    # Visual Studio .NET 2002 and 2003 do not include mt in PATH, for not entirely clear reasons.
+    # This shim detects that scenario and adds the winnt folder to MSVS_PATH.
+    RET=0
+    if [[ ${i/.*/} = "VS7" ]] ; then
+      find_in "${MSVS_PATH//:/*}" mt.exe
+      if [[ $RET -eq 1 ]] ; then
+        MSVS_PATH="$MSVS_PATH$(cygpath -u -f - <<< $ENV\\Bin\\winnt):"
+        RET=0
+      fi
+    fi
+
+    # Ensure that these derived values give a valid compiler.
+    if check_environment "${MSVS_PATH//:/*}" "${MSVS_INC//;/*}" "${MSVS_LIB//;/*}" "$i" $arch ; then
+      # Put the package back into FOUND, but augmented with the architecture name and with the
+      # derived values.
+      FOUND["$i-$arch"]="${CURRENT%)} [\"MSVS_PATH\"]=\"$MSVS_PATH\" \
+                                      [\"MSVS_INC\"]=\"$MSVS_INC\" \
+                                      [\"MSVS_LIB\"]=\"$MSVS_LIB\" \
+                                      [\"ASSEMBLER\"]=\"$ASSEMBLER\")" #"# fixes vim syn match error
+
+      # Check to see if this is a match for the environment C compiler.
+      if [[ -n ${ENV_ARCH+x} ]] ; then
+        TEST_cl=$(PATH="$MSVS_PATH:$PATH" "$WHICH" cl)
+        TEST_cl=${TEST_cl,,}
+        TEST_cl=${TEST_cl/bin\/*_/bin\/}
+        if [[ $TEST_cl = $ENV_cl ]] ; then
+          if [[ ${!ENV_INC/"$MSVS_INC"/} != "${!ENV_INC}" && \
+                ${!ENV_LIB/"$MSVS_LIB"/} != "${!ENV_LIB}" ]] ; then
+            debug "$i-$arch is a strong candidate for the Environment C compiler"
+            if [[ -n ${ENV_COMPILER+x} ]] ; then
+              if [[ -z ${ENV_COMPILER} ]] ; then
+                ENV_COMPILER=$i-$arch
+                unset WEAK_ENV
+              else
+                # More than one strong candidate - no fall back available
+                unset ENV_COMPILER
+                unset WEAK_ENV
+              fi
+            fi
+          else
+            debug "$i-$arch is a weak candidate for the Environment C compiler"
+            if [[ -n ${WEAK_ENV+x} ]] ; then
+              if [[ -z ${WEAK_ENV} ]] ; then
+                WEAK_ENV=$i-$arch
+              else
+                # More than one weak candidate - no fall back available
+                unset WEAK_ENV
+              fi
+            fi
+          fi
+        fi
+      fi
+    fi
+  done
+
+  # Does this package match the current preference? Note that PREFERENCE and TEST are constructed in
+  # a cunning (and hopefully not too "You are not expected to understand this" way) such that $PREF
+  # will always equal $i, unless $PREF = "@".
+  if [[ $PREF = $i ]] ; then
+    # In which case, check that the architecture(s)s were found
+    if [[ -n ${FOUND["$i-$LEFT_ARCH"]+x} && -n ${FOUND["$i-$RIGHT_ARCH"]+x} ]] ; then
+      debug "Solved TARGET_ARCH=$TARGET_ARCH with $i"
+      SOLUTION=$i
+      break
+    fi
+  fi
+
+  if [[ $PREF != "@" ]] ; then
+    ((pref++))
+    PREF=${PREFERENCE[$pref]}
+  fi
+done
+
+# If we got this far, then either we failed to find a compiler at all, or we were looking for the
+# environment compiler (or --all was specified).
+
+# Adopt a weak match for the environment compiler, if that's the best we can do.
+if [[ -n ${ENV_COMPILER+x} && -z ${ENV_COMPILER} && -n ${WEAK_ENV} ]] ; then
+  warning "Assuming Environment C compiler is $WEAK_ENV"
+  ENV_COMPILER=$WEAK_ENV
+fi
+
+declare -A FLIP
+FLIP=(["x86"]="x64" ["x64"]="x86")
+
+if [[ $MODE -eq 0 ]] ; then
+  if [[ $PREF = "@" && -n ${ENV_COMPILER} ]] ; then
+    SOLUTION=${ENV_COMPILER%-$ENV_ARCH}
+    # If --arch wasn't specified, then ensure that the other architecture was also found. If --arch
+    # was specified, then validate that the compiler was valid. This should always happen, unless
+    # something went wrong running the script to get MSVS_PATH, MSVS_LIB and MSVS_INC.
+    if [[ -n ${FOUND["$SOLUTION-${FLIP[$ENV_ARCH]}"]+x} ||
+          -n ${FOUND["$SOLUTION-$TARGET_ARCH"]+x} ]] ; then
+      debug "Solved with $SOLUTION"
+    else
+      unset SOLUTION
+      unset ENV_ARCH
+    fi
+  fi
+
+  if [[ -z ${SOLUTION+x} ]] ; then
+    ((pref++))
+    debug "Search remaining: ${PREFERENCE[*]}"
+    TEST_ARCH=$TARGET_ARCH
+    for i in "${PREFERENCE[@]:$pref}" ; do
+      if [[ -n ${FOUND["$i-$LEFT_ARCH"]+x} && -n ${FOUND["$i-$RIGHT_ARCH"]+x} ]] ; then
+        debug "Solved TARGET_ARCH='$TARGET_ARCH' with $i"
+        SOLUTION=$i
+        break
+      fi
+    done
+  fi
+fi
+
+debug "Solution: $SOLUTION"
+
+if [[ -n ${ENV_COMPILER} && $MODE -eq 1 ]] ; then
+  echo "Identified Environment C compiler as $ENV_COMPILER"
+fi
+
+if [[ $MODE -eq 1 ]] ; then
+  echo "Installed and usable packages:"
+  for i in "${!FOUND[@]}" ; do
+    echo "  $i"
+  done | sort
+  exit 0
+fi
+
+if [[ -n $SOLUTION ]] ; then
+  eval COMPILER=${FOUND[$SOLUTION-$LEFT_ARCH]}
+  output MSVS_NAME "${COMPILER["DISPLAY"]}" $LEFT_ARCH
+  output MSVS_PATH "${COMPILER["MSVS_PATH"]}" $LEFT_ARCH
+  output MSVS_INC "${COMPILER["MSVS_INC"]}" $LEFT_ARCH
+  output MSVS_LIB "${COMPILER["MSVS_LIB"]}" $LEFT_ARCH
+  if [[ $ML_REQUIRED -eq 1 ]] ; then
+    output MSVS_ML "${COMPILER["ASSEMBLER"]%.exe}" always
+  fi
+  if [[ -z $TARGET_ARCH ]] ; then
+    eval COMPILER=${FOUND[$SOLUTION-$RIGHT_ARCH]}
+    output MSVS64_PATH "${COMPILER["MSVS_PATH"]}" $RIGHT_ARCH
+    output MSVS64_INC "${COMPILER["MSVS_INC"]}" $RIGHT_ARCH
+    output MSVS64_LIB "${COMPILER["MSVS_LIB"]}" $RIGHT_ARCH
+    if [[ $ML_REQUIRED -eq 1 ]] ; then
+      output MSVS64_ML "${COMPILER["ASSEMBLER"]%.exe}" always
+    fi
+  fi
+  exit 0
+else
+  exit 1
+fi
diff --git a/.ci/or1k-sim.exp b/.ci/or1k-sim.exp
new file mode 100644
index 0000000..3920413
--- /dev/null
+++ b/.ci/or1k-sim.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {or1k-elf}
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# "or1k" is the name of the sim subdir in devo/sim.
+setup_sim or1k
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+
+set_board_info compiler  "[find_gcc]"
+set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
+
+# Configuration settings for testsuites
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,cannot_call_functions 1
+set_board_info gdb,skip_float_tests 1
+set_board_info gdb,can_reverse 1
+set_board_info gdb,use_precord 1
+
+# More time is needed
+set_board_info gcc,timeout 800
+set_board_info gdb,timeout 60
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size  5000
+
diff --git a/.ci/powerpc-eabisim.exp b/.ci/powerpc-eabisim.exp
new file mode 100644
index 0000000..285fd4f
--- /dev/null
+++ b/.ci/powerpc-eabisim.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {powerpc-eabisim}
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+# basic-sim.exp is a basic description for the standard Cygnus simulator.
+load_base_board_description "basic-sim"
+
+# "powerpc" is the name of the sim subdir in devo/sim.
+setup_sim powerpc
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+
+set_board_info compiler  "[find_gcc]"
+set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
+
+# Configuration settings for testsuites
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,cannot_call_functions 1
+set_board_info gdb,skip_float_tests 1
+set_board_info gdb,can_reverse 1
+set_board_info gdb,use_precord 1
+
+# More time is needed
+set_board_info gcc,timeout 800
+set_board_info gdb,timeout 60
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size  5000
+
diff --git a/.ci/site.exp b/.ci/site.exp
new file mode 100644
index 0000000..96c013e
--- /dev/null
+++ b/.ci/site.exp
@@ -0,0 +1,29 @@
+# Copyright (C) 2008, 2010, 2018, 2019, 2021  Anthony Green
+
+# Make sure we look in the right place for the board description files.
+if ![info exists boards_dir] {
+    set boards_dir {}
+}
+
+lappend boards_dir $::env(BOARDSDIR)
+
+verbose "Global Config File: target_triplet is $target_triplet" 2
+global target_list
+
+case "$target_triplet" in {
+    { "bfin-elf" } {
+	set target_list "bfin-sim"
+    }
+    { "m32r-elf" } {
+	set target_list "m32r-sim"
+    }
+    { "moxie-elf" } {
+	set target_list "moxie-sim"
+    }
+    { "or1k-elf" } {
+	set target_list "or1k-sim"
+    }
+    { "powerpc-eabisim" } {
+        set target_list "powerpc-eabisim"
+    }
+}
diff --git a/.ci/wine-sim.exp b/.ci/wine-sim.exp
new file mode 100644
index 0000000..1ad6038
--- /dev/null
+++ b/.ci/wine-sim.exp
@@ -0,0 +1,55 @@
+# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
+#
+# This file is part of DejaGnu.
+#
+# DejaGnu is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# DejaGnu is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with DejaGnu; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
+
+# This is a list of toolchains that are supported on this board.
+set_board_info target_install {i686-w64-mingw32}
+
+# Load the generic configuration for this board. This will define a basic set
+# of routines needed by the tool to communicate with the board.
+load_generic_config "sim"
+
+set_board_info sim "wineconsole --backend=curses"
+set_board_info is_simulator 1
+
+# No multilib options needed by default.
+process_multilib_options ""
+
+# We only support newlib on this target. We assume that all multilib
+# options have been specified before we get here.
+
+set_board_info compiler  "[find_gcc]"
+set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
+set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
+
+# Configuration settings for testsuites
+set_board_info noargs 1
+set_board_info gdb,nosignals 1
+set_board_info gdb,noresults 1
+set_board_info gdb,cannot_call_functions 1
+set_board_info gdb,skip_float_tests 1
+set_board_info gdb,can_reverse 1
+set_board_info gdb,use_precord 1
+
+# More time is needed
+set_board_info gcc,timeout 800
+set_board_info gdb,timeout 60
+
+# Used by a few gcc.c-torture testcases to delimit how large the stack can
+# be.
+set_board_info gcc,stack_size  5000
+
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..ec19fe0
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,154 @@
+name: CI
+
+# Controls when the action will run.
+on:
+  # Triggers the workflow on push or pull request events but only for the master branch
+  push:
+    branches: [ github-actions ]
+  pull_request:
+    branches: [ github-actions ]
+
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+
+  build-sim:
+    name: Build & test
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+       include:
+         - MEVAL: "export CC=clang && CXX=clang"
+         - HOST: "i386-pc-linux-gnu"
+           MEVAL: 'export CC="gcc -m32" && CXX="g++ -m32"'
+         - CONFIGURE_OPTIONS: "--disable-shared"
+         - CONFIGURE_OPTIONS: "--enable-shared"
+         - HOST: "m68k-linux-gnu"
+           MEVAL: 'export CC="m68k-linux-gnu-gcc-8 -mcpu=547x" && CXX="m68k-linux-gnu-g++-8 -mcpu=547x"'
+           CONFIGURE_OPTIONS: '--disable-shared'
+           QEMU_LD_PREFIX: '/usr/m68k-linux-gnu'
+           QEMU_CPU: 'cfv4e'
+         - HOST: "sh4-linux-gnu"
+           CONFIGURE_OPTIONS: "--disable-shared"
+           QEMU_LD_PREFIX: "/usr/sh4-linux-gnu"
+           QEMU_CPU: 'sh7785'
+         - HOST: "alpha-linux-gnu"
+           CONFIGURE_OPTIONS: "--disable-shared"
+           QEMU_LD_PREFIX: "/usr/alpha-linux-gnu"
+         - HOST: "arm32v7-linux-gnu"
+           LIBFFI_TEST_OPTIMIZATION: "-O0"
+         - HOST: "arm32v7-linux-gnu"
+           LIBFFI_TEST_OPTIMIZATION: "-O2"
+         - HOST: "arm32v7-linux-gnu"
+           LIBFFI_TEST_OPTIMIZATION: "-O2 -fomit-frame-pointer"
+         - HOST: "powerpc-eabisim"
+           RUNTESTFLAGS: "--target_board powerpc-eabisim"
+         - HOST: "or1k-elf"
+           RUNTESTFLAGS: "--target_board or1k-sim"
+         - HOST: "m32r-elf"
+           RUNTESTFLAGS: "--target_board m32-sim"
+         - HOST: "bfin-elf"
+           RUNTESTFLAGS: "--target_board bfin-sim"
+         - MEVAL: "export PATH=/opt/moxielogic/bin:$PATH && CC=moxie-elf-gcc && CXX=moxie-elf-g++"
+           HOST: "moxie-elf"
+           LDFLAGS: "-Tsim.ld"
+           RUNTESTFLAGS: "--target_board moxie-sim"
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - env:
+          MEVAL: ${{ matrix.MEVAL }}
+          HOST: ${{ matrix.HOST }}
+          LDFLAGS: ${{ matrix.LDFLAGS }}
+          RUNTESTFLAGS: ${{ matrix.RUNTESTFLAGS }}
+          CONFIGURE_OPTIONS: ${{ matrix.CONFIGURE_OPTIONS }}
+          QEMU_LD_PREFIX: ${{ matrix.QEMU_LD_PREFIX }}
+          QEMU_CPU: ${{ matrix.QEMU_CPU }}
+        run: |
+          if test x"$MEVAL" != x; then eval ${MEVAL}; fi
+          ./.ci/install.sh
+          ./.ci/build.sh
+
+  build:
+    name: Build & test with Cygwin
+    runs-on: windows-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        platform: [windows-latest]
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set up Cygwin
+        uses: egor-tensin/setup-cygwin@v3
+        with:
+          platform: x64
+          packages: wget gcc-core make dejagnu automake autoconf libtool texinfo dos2unix unzip
+
+      - run: |
+          cd $(cygpath $RUNNER_WORKSPACE)/libffi
+          wget https://rl.gl/cli/rlgl-windows-amd64.zip
+          unzip rlgl-windows-amd64.zip
+          find . -name \*.m4|xargs dos2unix
+          find . -name \*.ac|xargs dos2unix
+          find . -name \*.am|xargs dos2unix
+          find . -name \*.host|xargs dos2unix
+          autoreconf -f -v -i
+          ./configure
+          find . -name libtool\*|xargs dos2unix
+          make -j 4
+          TERM=none export DEJAGNU=$(pwd)/.ci/site.exp BOARDSDIR=$(pwd)/.ci make check || true
+          ./rlgl/rlgl.exe l --key=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI https://rl.gl
+          ID=$(./rlgl/rlgl.exe start)
+          ./rlgl/rlgl.exe e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git $(find . -name libffi.log)
+        shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
+
+  build-msvc:
+    name: Build & test with Visual C++
+    runs-on: windows-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        platform: [windows-latest]
+
+    steps:
+      - uses: actions/checkout@v2
+      - uses: egor-tensin/setup-cygwin@v3
+        with:
+          platform: x64
+          packages: wget make dejagnu automake autoconf libtool texinfo unzip dos2unix
+      - uses: ilammy/msvc-dev-cmd@v1.8.1
+      - uses: microsoft/setup-msbuild@v1.0.2
+
+      - name: Build and test
+        run: |
+          dos2unix $(cygpath $RUNNER_WORKSPACE)/libffi/.ci/msvs-detect
+          # $(cygpath $RUNNER_WORKSPACE)/libffi/.ci/msvs-detect --arch=x64 --with-assembler
+          export PATH=$PATH:"/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64"
+          cd $(cygpath $RUNNER_WORKSPACE)/libffi
+          wget https://rl.gl/cli/rlgl-windows-amd64.zip
+          unzip rlgl-windows-amd64.zip
+          find . -name \*.sh|xargs dos2unix
+          find . -name \*.m4|xargs dos2unix
+          find . -name \*.ac|xargs dos2unix
+          find . -name \*.am|xargs dos2unix
+          find . -name \*.host|xargs dos2unix
+          dos2unix .ci/ar-lib
+          autoreconf -f -v -i
+          ./configure CC="$(pwd)/msvcc.sh -m64" CXX="$(pwd)/msvcc.sh -m64" LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='$(pwd)/.ci/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST $DEBUG_ARG $SHARED_ARG || cat */config.log
+          find . -name libtool\*|xargs dos2unix
+          make
+          cp $(find . -name 'libffi-?.dll') x86_64-pc-cygwin/testsuite/
+          TERM=none DEJAGNU=$(pwd)/.ci/site.exp BOARDSDIR=$(pwd)/.ci make check || true
+          ./rlgl/rlgl.exe l --key=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI https://rl.gl
+          ID=$(./rlgl/rlgl.exe start)
+          ./rlgl/rlgl.exe e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git $(find . -name libffi.log)
+        shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
diff --git a/.gitignore b/.gitignore
index e393a47..f33ca3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,7 @@ Makefile
 Makefile.in
 aclocal.m4
 compile
-!.travis/compile
+!.ci/compile
 configure
 depcomp
 doc/libffi.info
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index a18919c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,83 +0,0 @@
----
-sudo: required
-
-language: cpp
-
-# For qemu-powered targets, get the list of supported processors from
-# travis by setting QEMU_CPU=help, then set -mcpu= for the compilers
-# accordingly.
-
-matrix:
-  include:
-    - os: linux
-      env: HOST=powerpc-eabisim RUNTESTFLAGS="--target_board powerpc-eabisim" DEJAGNU="/opt/.travis/site.exp"
-    - os: linux
-      env: HOST=or1k-elf RUNTESTFLAGS="--target_board or1k-sim" DEJAGNU="/opt/.travis/site.exp"
-    - os: linux
-      env: HOST=m32r-elf RUNTESTFLAGS="--target_board m32r-sim" DEJAGNU="/opt/.travis/site.exp"
-    - os: linux
-      env: HOST=bfin-elf RUNTESTFLAGS="--target_board bfin-sim" DEJAGNU="/opt/.travis/site.exp"
-# This configuration is still using the native x86 toolchain?
-#    - os: osx
-#      env: HOST=aarch64-apple-darwin13
-    - os: osx
-      env: HOST=x86_64-apple-darwin10
-    - os: linux
-      env: HOST=x86_64-w64-mingw32 MEVAL='export CC="x86_64-w64-mingw32-gcc" && CXX="x86_64-w64-mingw32-g++" RUNTESTFLAGS="--target_board wine-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp" CONFIGURE_OPTIONS=--disable-shared LIBFFI_TEST_OPTIMIZATION="-O2"
-    - os: linux
-      env: HOST=sh4-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/sh4-linux-gnu
-    - os: linux
-      env: HOST=alpha-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/alpha-linux-gnu
-    - os: linux
-      env: HOST=m68k-linux-gnu MEVAL='export CC="m68k-linux-gnu-gcc-8 -mcpu=547x" && CXX="m68k-linux-gnu-g++-8 -mcpu=547x"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/m68k-linux-gnu QEMU_CPU=cfv4e
-    - os: linux
-      arch: s390x
-      env: HOST=s390x-linux-gnu
-    - os: linux
-      arch: ppc64le
-      env: HOST=ppc64le-linux-gnu
-    - os: linux
-      arch: arm64
-      env: HOST=aarch64-linux-gnu
-    - os: linux
-      arch: arm64
-      env: HOST=aarch64-linux-gnu
-      compiler: clang
-    - os: linux
-      env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O0"
-    - os: linux
-      env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2"
-    - os: linux
-      env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2 -fomit-frame-pointer"
-# The sparc64 linux system in the GCC compile farm is non-responsive.
-#    - os: linux
-#      env: HOST=sparc64-linux-gnu
-# The mips64 linux system in the GCC compile farm is not allowing logins
-#    - os: linux
-#      env: HOST=mips64el-linux-gnu
-    - os: linux
-      compiler: gcc
-      env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"'
-    - os: linux
-      compiler: gcc
-    - os: linux
-      compiler: gcc
-      env: CONFIGURE_OPTIONS=--disable-shared
-    - os: linux
-      compiler: clang
-    - os: linux
-      compiler: clang
-      env: CONFIGURE_OPTIONS=--disable-shared
-    - os: linux
-      env: HOST=moxie-elf MEVAL='export PATH=/opt/moxielogic/bin:$PATH && CC=moxie-elf-gcc && CXX=moxie-elf-g++' LDFLAGS=-Tsim.ld RUNTESTFLAGS="--target_board moxie-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp"
-
-before_install:
-  - if test x"$MEVAL" != x; then eval ${MEVAL}; fi
-
-install:
-  - travis_wait 60 ./.travis/install.sh
-
-script:
-  - if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi
-  - travis_wait 115 sleep infinity &
-  - ./.travis/build.sh
diff --git a/.travis/ar-lib b/.travis/ar-lib
deleted file mode 100755
index 0baa4f6..0000000
--- a/.travis/ar-lib
+++ /dev/null
@@ -1,270 +0,0 @@
-#! /bin/sh
-# Wrapper for Microsoft lib.exe
-
-me=ar-lib
-scriptversion=2012-03-01.08; # UTC
-
-# Copyright (C) 2010-2018 Free Software Foundation, Inc.
-# Written by Peter Rosin <peda@lysator.liu.se>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-
-# func_error message
-func_error ()
-{
-  echo "$me: $1" 1>&2
-  exit 1
-}
-
-file_conv=
-
-# func_file_conv build_file
-# Convert a $build file to $host form and store it in $file
-# Currently only supports Windows hosts.
-func_file_conv ()
-{
-  file=$1
-  case $file in
-    / | /[!/]*) # absolute file, and not a UNC file
-      if test -z "$file_conv"; then
-	# lazily determine how to convert abs files
-	case `uname -s` in
-	  MINGW*)
-	    file_conv=mingw
-	    ;;
-	  CYGWIN*)
-	    file_conv=cygwin
-	    ;;
-	  *)
-	    file_conv=wine
-	    ;;
-	esac
-      fi
-      case $file_conv in
-	mingw)
-	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
-	  ;;
-	cygwin)
-	  file=`cygpath -m "$file" || echo "$file"`
-	  ;;
-	wine)
-	  file=`winepath -w "$file" || echo "$file"`
-	  ;;
-      esac
-      ;;
-  esac
-}
-
-# func_at_file at_file operation archive
-# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
-# for each of them.
-# When interpreting the content of the @FILE, do NOT use func_file_conv,
-# since the user would need to supply preconverted file names to
-# binutils ar, at least for MinGW.
-func_at_file ()
-{
-  operation=$2
-  archive=$3
-  at_file_contents=`cat "$1"`
-  eval set x "$at_file_contents"
-  shift
-
-  for member
-  do
-    $AR -NOLOGO $operation:"$member" "$archive" || exit $?
-  done
-}
-
-case $1 in
-  '')
-     func_error "no command.  Try '$0 --help' for more information."
-     ;;
-  -h | --h*)
-    cat <<EOF
-Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
-
-Members may be specified in a file named with @FILE.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "$me, version $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test $# -lt 3; then
-  func_error "you must specify a program, an action and an archive"
-fi
-
-AR=$1
-shift
-while :
-do
-  if test $# -lt 2; then
-    func_error "you must specify a program, an action and an archive"
-  fi
-  case $1 in
-    -lib | -LIB \
-    | -ltcg | -LTCG \
-    | -machine* | -MACHINE* \
-    | -subsystem* | -SUBSYSTEM* \
-    | -verbose | -VERBOSE \
-    | -wx* | -WX* )
-      AR="$AR $1"
-      shift
-      ;;
-    *)
-      action=$1
-      shift
-      break
-      ;;
-  esac
-done
-orig_archive=$1
-shift
-func_file_conv "$orig_archive"
-archive=$file
-
-# strip leading dash in $action
-action=${action#-}
-
-delete=
-extract=
-list=
-quick=
-replace=
-index=
-create=
-
-while test -n "$action"
-do
-  case $action in
-    d*) delete=yes  ;;
-    x*) extract=yes ;;
-    t*) list=yes    ;;
-    q*) quick=yes   ;;
-    r*) replace=yes ;;
-    s*) index=yes   ;;
-    S*)             ;; # the index is always updated implicitly
-    c*) create=yes  ;;
-    u*)             ;; # TODO: don't ignore the update modifier
-    v*)             ;; # TODO: don't ignore the verbose modifier
-    *)
-      func_error "unknown action specified"
-      ;;
-  esac
-  action=${action#?}
-done
-
-case $delete$extract$list$quick$replace,$index in
-  yes,* | ,yes)
-    ;;
-  yesyes*)
-    func_error "more than one action specified"
-    ;;
-  *)
-    func_error "no action specified"
-    ;;
-esac
-
-if test -n "$delete"; then
-  if test ! -f "$orig_archive"; then
-    func_error "archive not found"
-  fi
-  for member
-  do
-    case $1 in
-      @*)
-        func_at_file "${1#@}" -REMOVE "$archive"
-        ;;
-      *)
-        func_file_conv "$1"
-        $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
-        ;;
-    esac
-  done
-
-elif test -n "$extract"; then
-  if test ! -f "$orig_archive"; then
-    func_error "archive not found"
-  fi
-  if test $# -gt 0; then
-    for member
-    do
-      case $1 in
-        @*)
-          func_at_file "${1#@}" -EXTRACT "$archive"
-          ;;
-        *)
-          func_file_conv "$1"
-          $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
-          ;;
-      esac
-    done
-  else
-    $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
-    do
-      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
-    done
-  fi
-
-elif test -n "$quick$replace"; then
-  if test ! -f "$orig_archive"; then
-    if test -z "$create"; then
-      echo "$me: creating $orig_archive"
-    fi
-    orig_archive=
-  else
-    orig_archive=$archive
-  fi
-
-  for member
-  do
-    case $1 in
-    @*)
-      func_file_conv "${1#@}"
-      set x "$@" "@$file"
-      ;;
-    *)
-      func_file_conv "$1"
-      set x "$@" "$file"
-      ;;
-    esac
-    shift
-    shift
-  done
-
-  if test -n "$orig_archive"; then
-    $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
-  else
-    $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
-  fi
-
-elif test -n "$list"; then
-  if test ! -f "$orig_archive"; then
-    func_error "archive not found"
-  fi
-  $AR -NOLOGO -LIST "$archive" || exit $?
-fi
diff --git a/.travis/bfin-sim.exp b/.travis/bfin-sim.exp
deleted file mode 100644
index b36d9f0..0000000
--- a/.travis/bfin-sim.exp
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
-#
-# This file is part of DejaGnu.
-#
-# DejaGnu is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# DejaGnu is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with DejaGnu; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
-
-# This is a list of toolchains that are supported on this board.
-set_board_info target_install {bfin-elf}
-
-# Load the generic configuration for this board. This will define a basic set
-# of routines needed by the tool to communicate with the board.
-load_generic_config "sim"
-
-# basic-sim.exp is a basic description for the standard Cygnus simulator.
-load_base_board_description "basic-sim"
-
-# "bfin" is the name of the sim subdir in devo/sim.
-setup_sim bfin
-
-# No multilib options needed by default.
-process_multilib_options ""
-
-# We only support newlib on this target. We assume that all multilib
-# options have been specified before we get here.
-
-set_board_info compiler  "[find_gcc]"
-set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
-set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
-
-# Configuration settings for testsuites
-set_board_info noargs 1
-set_board_info gdb,nosignals 1
-set_board_info gdb,noresults 1
-set_board_info gdb,cannot_call_functions 1
-set_board_info gdb,skip_float_tests 1
-set_board_info gdb,can_reverse 1
-set_board_info gdb,use_precord 1
-
-# More time is needed
-set_board_info gcc,timeout 800
-set_board_info gdb,timeout 60
-
-# Used by a few gcc.c-torture testcases to delimit how large the stack can
-# be.
-set_board_info gcc,stack_size  5000
-
diff --git a/.travis/build-cross-in-container.sh b/.travis/build-cross-in-container.sh
deleted file mode 100755
index 7e2252c..0000000
--- a/.travis/build-cross-in-container.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-
-cd /opt
-
-echo $PATH
-export PATH=/usr/local/bin:$PATH
-echo $PATH
-
-./configure --host=${HOST} || cat */config.log
-make
-make dist
-make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
-
-
diff --git a/.travis/build-in-container.sh b/.travis/build-in-container.sh
deleted file mode 100755
index 1a7fa76..0000000
--- a/.travis/build-in-container.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-cd /opt
-
-export QEMU_LD_PREFIX=/usr/${HOST}
-
-./configure ${HOST+--host=$HOST --disable-shared}
-make
-make dist
-make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
-
-
diff --git a/.travis/build.sh b/.travis/build.sh
deleted file mode 100755
index ebd063d..0000000
--- a/.travis/build.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/bash
-
-set -x
-
-# This is a policy bound API key.  It can only be used with
-# https://github.com/libffi/rlgl-policy.git.
-RLGL_KEY=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI
-
-if [ -z ${QEMU_CPU+x} ]; then
-    export SET_QEMU_CPU=
-else
-    export SET_QEMU_CPU="-e QEMU_CPU=${QEMU_CPU}"
-fi
-
-export DOCKER=docker
-
-function build_cfarm()
-{
-    curl -u ${CFARM_AUTH} https://cfarm-test-libffi-libffi.apps.home.labdroid.net/test?host=${HOST}\&commit=${TRAVIS_COMMIT} | tee build.log
-    echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-    echo $(tail build.log | grep '^==LOGFILE==')
-    echo $(tail build.log | grep '^==LOGFILE==' | cut -b13-)
-    echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-    curl -u ${CFARM_AUTH} "$(tail build.log | grep '^==LOGFILE==' | cut -b13-)" > libffi.log
-
-    ./rlgl l --key=${RLGL_KEY} https://rl.gl
-    ID=$(./rlgl start)
-    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git libffi.log
-    exit $?
-}
-
-function build_linux()
-{
-    ./autogen.sh
-    ./configure ${HOST+--host=$HOST} ${CONFIGURE_OPTIONS} || cat */config.log
-    make
-    make dist
-    make check RUNTESTFLAGS="-a $RUNTESTFLAGS"
-
-    ./rlgl l --key=${RLGL_KEY} https://rl.gl
-    ID=$(./rlgl start)
-    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
-    exit $?
-}
-
-function build_foreign_linux()
-{
-    ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh
-
-    ./rlgl l --key=${RLGL_KEY} https://rl.gl
-    ID=$(./rlgl start)
-    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
-    exit $?
-}
-
-function build_cross_linux()
-{
-    ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh
-
-    ./rlgl l --key=${RLGL_KEY} https://rl.gl
-    ID=$(./rlgl start)
-    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
-    exit $?
-}
-
-function build_cross()
-{
-    ${DOCKER} pull quay.io/moxielogic/libffi-ci-${HOST}
-    ${DOCKER} run --rm -t -i -v $(pwd):/opt -e HOST="${HOST}" -e CC="${HOST}-gcc ${GCC_OPTIONS}" -e CXX="${HOST}-g++ ${GCC_OPTIONS}" -e TRAVIS_BUILD_DIR=/opt -e DEJAGNU="${DEJAGNU}" -e RUNTESTFLAGS="${RUNTESTFLAGS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/libffi-ci-${HOST} bash -c /opt/.travis/build-cross-in-container.sh
-
-    ./rlgl l --key=${RLGL_KEY} https://rl.gl
-    ID=$(./rlgl start)
-    ./rlgl e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git */testsuite/libffi.log
-    exit $?
-}
-
-function build_ios()
-{
-    which python
-# export PYTHON_BIN=/usr/local/bin/python
-    ./generate-darwin-source-and-headers.py --only-ios
-    xcodebuild -showsdks
-    xcodebuild -project libffi.xcodeproj -target "libffi-iOS" -configuration Release -sdk iphoneos11.4
-    exit $?
-}
-
-function build_macosx()
-{
-    which python
-# export PYTHON_BIN=/usr/local/bin/python
-    ./generate-darwin-source-and-headers.py --only-osx
-    xcodebuild -showsdks
-    xcodebuild -project libffi.xcodeproj -target "libffi-Mac" -configuration Release -sdk macosx10.13
-    echo "Finished build"
-    exit $?
-}
-
-case "$HOST" in
-    arm-apple-darwin*)
-	./autogen.sh
-	build_ios
-	;;
-    x86_64-apple-darwin*)
-	./autogen.sh
-	build_macosx
-	;;
-    arm32v7-linux-gnu)
-	./autogen.sh
-        build_foreign_linux arm quay.io/moxielogic/arm32v7-ci-build-container:latest
-	;;
-    mips64el-linux-gnu | sparc64-linux-gnu)
-        build_cfarm
-	;;
-    bfin-elf )
-	./autogen.sh
-	GCC_OPTIONS=-msim build_cross
-	;;
-    m32r-elf )
-	./autogen.sh
-	build_cross
-	;;
-    or1k-elf )
-	./autogen.sh
-	build_cross
-	;;
-    powerpc-eabisim )
-	./autogen.sh
-	build_cross
-	;;
-    m68k-linux-gnu )
-	./autogen.sh
-	GCC_OPTIONS=-mcpu=547x build_cross_linux
-	;;
-    alpha-linux-gnu | sh4-linux-gnu )
-	./autogen.sh
-	build_cross_linux
-	;;
-    *)
-	./autogen.sh
-	build_linux
-	;;
-esac
diff --git a/.travis/compile b/.travis/compile
deleted file mode 100755
index 655932a..0000000
--- a/.travis/compile
+++ /dev/null
@@ -1,351 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand '-c -o'.
-
-scriptversion=2018-03-27.18; # UTC
-
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-nl='
-'
-
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent tools from complaining about whitespace usage.
-IFS=" ""	$nl"
-
-file_conv=
-
-# func_file_conv build_file lazy
-# Convert a $build file to $host form and store it in $file
-# Currently only supports Windows hosts. If the determined conversion
-# type is listed in (the comma separated) LAZY, no conversion will
-# take place.
-func_file_conv ()
-{
-  file=$1
-  case $file in
-    / | /[!/]*) # absolute file, and not a UNC file
-      if test -z "$file_conv"; then
-	# lazily determine how to convert abs files
-	case `uname -s` in
-	  MINGW*)
-	    file_conv=mingw
-	    ;;
-	  CYGWIN*)
-	    file_conv=cygwin
-	    ;;
-	  *)
-	    file_conv=wine
-	    ;;
-	esac
-      fi
-      case $file_conv/,$2, in
-	*,$file_conv,*)
-	  ;;
-	mingw/*)
-	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
-	  ;;
-	cygwin/*)
-	  file=`cygpath -m "$file" || echo "$file"`
-	  ;;
-	wine/*)
-	  file=`winepath -w "$file" || echo "$file"`
-	  ;;
-      esac
-      ;;
-  esac
-}
-
-# func_cl_dashL linkdir
-# Make cl look for libraries in LINKDIR
-func_cl_dashL ()
-{
-  func_file_conv "$1"
-  if test -z "$lib_path"; then
-    lib_path=$file
-  else
-    lib_path="$lib_path;$file"
-  fi
-  linker_opts="$linker_opts -LIBPATH:$file"
-}
-
-# func_cl_dashl library
-# Do a library search-path lookup for cl
-func_cl_dashl ()
-{
-  lib=$1
-  found=no
-  save_IFS=$IFS
-  IFS=';'
-  for dir in $lib_path $LIB
-  do
-    IFS=$save_IFS
-    if $shared && test -f "$dir/$lib.dll.lib"; then
-      found=yes
-      lib=$dir/$lib.dll.lib
-      break
-    fi
-    if test -f "$dir/$lib.lib"; then
-      found=yes
-      lib=$dir/$lib.lib
-      break
-    fi
-    if test -f "$dir/lib$lib.a"; then
-      found=yes
-      lib=$dir/lib$lib.a
-      break
-    fi
-  done
-  IFS=$save_IFS
-
-  if test "$found" != yes; then
-    lib=$lib.lib
-  fi
-}
-
-# func_cl_wrapper cl arg...
-# Adjust compile command to suit cl
-func_cl_wrapper ()
-{
-  # Assume a capable shell
-  lib_path=
-  shared=:
-  linker_opts=
-  for arg
-  do
-    if test -n "$eat"; then
-      eat=
-    else
-      case $1 in
-	-o)
-	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
-	  eat=1
-	  case $2 in
-	    *.o | *.[oO][bB][jJ])
-	      func_file_conv "$2"
-	      set x "$@" -Fo"$file"
-	      shift
-	      ;;
-	    *)
-	      func_file_conv "$2"
-	      set x "$@" -Fe"$file"
-	      shift
-	      ;;
-	  esac
-	  ;;
-	-I)
-	  eat=1
-	  func_file_conv "$2" mingw
-	  set x "$@" -I"$file"
-	  shift
-	  ;;
-	-I*)
-	  func_file_conv "${1#-I}" mingw
-	  set x "$@" -I"$file"
-	  shift
-	  ;;
-	-l)
-	  eat=1
-	  func_cl_dashl "$2"
-	  set x "$@" "$lib"
-	  shift
-	  ;;
-	-l*)
-	  func_cl_dashl "${1#-l}"
-	  set x "$@" "$lib"
-	  shift
-	  ;;
-	-L)
-	  eat=1
-	  func_cl_dashL "$2"
-	  ;;
-	-L*)
-	  func_cl_dashL "${1#-L}"
-	  ;;
-	-static)
-	  shared=false
-	  ;;
-	-warn)
-	  eat=1
-	  ;;
-	-Wl,*)
-	  arg=${1#-Wl,}
-	  save_ifs="$IFS"; IFS=','
-	  for flag in $arg; do
-	    IFS="$save_ifs"
-	    linker_opts="$linker_opts $flag"
-	  done
-	  IFS="$save_ifs"
-	  ;;
-	-Xlinker)
-	  eat=1
-	  linker_opts="$linker_opts $2"
-	  ;;
-	-*)
-	  set x "$@" "$1"
-	  shift
-	  ;;
-	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
-	  func_file_conv "$1"
-	  set x "$@" -Tp"$file"
-	  shift
-	  ;;
-	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
-	  func_file_conv "$1" mingw
-	  set x "$@" "$file"
-	  shift
-	  ;;
-	*)
-	  set x "$@" "$1"
-	  shift
-	  ;;
-      esac
-    fi
-    shift
-  done
-  if test -n "$linker_opts"; then
-    linker_opts="-link$linker_opts"
-  fi
-  exec "$@" $linker_opts
-  exit 1
-}
-
-eat=
-
-case $1 in
-  '')
-     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand '-c -o'.
-Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file 'INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "compile $scriptversion"
-    exit $?
-    ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
-  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
-    func_cl_wrapper "$@"      # Doesn't return...
-    ;;
-esac
-
-ofile=
-cfile=
-
-for arg
-do
-  if test -n "$eat"; then
-    eat=
-  else
-    case $1 in
-      -o)
-	# configure might choose to run compile as 'compile cc -o foo foo.c'.
-	# So we strip '-o arg' only if arg is an object.
-	eat=1
-	case $2 in
-	  *.o | *.obj)
-	    ofile=$2
-	    ;;
-	  *)
-	    set x "$@" -o "$2"
-	    shift
-	    ;;
-	esac
-	;;
-      *.c)
-	cfile=$1
-	set x "$@" "$1"
-	shift
-	;;
-      *)
-	set x "$@" "$1"
-	shift
-	;;
-    esac
-  fi
-  shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
-  # If no '-o' option was seen then we might have been invoked from a
-  # pattern rule where we don't need one.  That is ok -- this is a
-  # normal compilation that the losing compiler can handle.  If no
-  # '.c' file was seen then we are probably linking.  That is also
-  # ok.
-  exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use '[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file.  Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
-  if mkdir "$lockdir" >/dev/null 2>&1; then
-    break
-  fi
-  sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
-  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
-  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'before-save-hook 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC0"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/.travis/install.sh b/.travis/install.sh
deleted file mode 100755
index 7e87235..0000000
--- a/.travis/install.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/bash
-set -x
-
-if [[ $TRAVIS_OS_NAME != 'linux' ]]; then
-    brew update --verbose
-    # brew update > brew-update.log 2>&1
-    # fix an issue with libtool on travis by reinstalling it
-    brew uninstall libtool;
-    brew install libtool dejagnu;
-
-    # Download and extract the rlgl client
-    wget -qO - https://rl.gl/cli/rlgl-darwin-amd64.tgz | \
-	tar --strip-components=2 -xvzf - ./rlgl/rlgl;
-
-else
-    # Download and extract the rlgl client
-    case $HOST in
-	aarch64-linux-gnu)
-	    wget -qO - https://rl.gl/cli/rlgl-linux-arm.tgz | \
-		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
-	    ;;
-	ppc64le-linux-gnu)
-	    wget -qO - https://rl.gl/cli/rlgl-linux-ppc64le.tgz | \
-		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
-	    ;;
-	s390x-linux-gnu)
-	    wget -qO - https://rl.gl/cli/rlgl-linux-s390x.tgz | \
-		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
-	    ;;
-	*)
-	    wget -qO - https://rl.gl/cli/rlgl-linux-amd64.tgz | \
-		tar --strip-components=2 -xvzf - ./rlgl/rlgl;
-	    ;;
-    esac
-
-    sudo apt-get clean # clear the cache
-    sudo apt-get update
-    case $HOST in
-	mips64el-linux-gnu | sparc64-linux-gnu)
-        ;;
-	alpha-linux-gnu | arm32v7-linux-gnu | m68k-linux-gnu | sh4-linux-gnu)
-	    sudo apt-get install qemu-user-static
-	    ;;
-	hppa-linux-gnu )
-	    sudo apt-get install -y qemu-user-static g++-5-hppa-linux-gnu
-	    ;;
-	i386-pc-linux-gnu)
-	    sudo apt-get install gcc-multilib g++-multilib;
-	    ;;
-	moxie-elf)
-	    echo 'deb https://repos.moxielogic.org:7114/MoxieLogic moxiedev main' | sudo tee -a /etc/apt/sources.list
-	    sudo apt-get clean # clear the cache
-	    sudo apt-get update ## -qq
-	    sudo apt-get update
-	    sudo apt-get install -y --allow-unauthenticated moxielogic-moxie-elf-gcc moxielogic-moxie-elf-gcc-c++ moxielogic-moxie-elf-gcc-libstdc++ moxielogic-moxie-elf-gdb-sim
-	    ;;
-	x86_64-w64-mingw32)
-	    sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine;
-	    ;;
-	i686-w32-mingw32)
-	    sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 wine;
-	    ;;
-    esac
-    case $HOST in
-	arm32v7-linux-gnu)
-        # don't install host tools
-        ;;
-	*)
-	    sudo apt-get install dejagnu texinfo sharutils
-	    ;;
-    esac
-fi
diff --git a/.travis/m32r-sim.exp b/.travis/m32r-sim.exp
deleted file mode 100644
index c18123f..0000000
--- a/.travis/m32r-sim.exp
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
-#
-# This file is part of DejaGnu.
-#
-# DejaGnu is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# DejaGnu is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with DejaGnu; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
-
-# This is a list of toolchains that are supported on this board.
-set_board_info target_install {m32r-elf}
-
-# Load the generic configuration for this board. This will define a basic set
-# of routines needed by the tool to communicate with the board.
-load_generic_config "sim"
-
-# basic-sim.exp is a basic description for the standard Cygnus simulator.
-load_base_board_description "basic-sim"
-
-# "m32r" is the name of the sim subdir in devo/sim.
-setup_sim m32r
-
-# No multilib options needed by default.
-process_multilib_options ""
-
-# We only support newlib on this target. We assume that all multilib
-# options have been specified before we get here.
-
-set_board_info compiler  "[find_gcc]"
-set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
-set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
-
-# Configuration settings for testsuites
-set_board_info noargs 1
-set_board_info gdb,nosignals 1
-set_board_info gdb,noresults 1
-set_board_info gdb,cannot_call_functions 1
-set_board_info gdb,skip_float_tests 1
-set_board_info gdb,can_reverse 1
-set_board_info gdb,use_precord 1
-
-# More time is needed
-set_board_info gcc,timeout 800
-set_board_info gdb,timeout 60
-
-# Used by a few gcc.c-torture testcases to delimit how large the stack can
-# be.
-set_board_info gcc,stack_size  5000
-
diff --git a/.travis/moxie-sim.exp b/.travis/moxie-sim.exp
deleted file mode 100644
index 32979ea..0000000
--- a/.travis/moxie-sim.exp
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (C) 2010  Free Software Foundation, Inc.
-#
-# This file is part of DejaGnu.
-#
-# DejaGnu is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# DejaGnu is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with DejaGnu; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
-
-# This is a list of toolchains that are supported on this board.
-set_board_info target_install {moxie-elf}
-
-# Load the generic configuration for this board. This will define a basic set
-# of routines needed by the tool to communicate with the board.
-load_generic_config "sim"
-
-# basic-sim.exp is a basic description for the standard Cygnus simulator.
-load_base_board_description "basic-sim"
-
-# "moxie" is the name of the sim subdir in devo/sim.
-setup_sim moxie
-
-# No multilib options needed by default.
-process_multilib_options ""
-
-# We only support newlib on this target. We assume that all multilib
-# options have been specified before we get here.
-
-set_board_info compiler  "[find_gcc]"
-set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
-set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
-# No linker script needed.
-set_board_info ldscript "-Tsim.ld"
-
-# Configuration settings for testsuites
-set_board_info noargs 1
-set_board_info gdb,nosignals 1
-set_board_info gdb,noresults 1
-set_board_info gdb,cannot_call_functions 1
-set_board_info gdb,skip_float_tests 1
-set_board_info gdb,can_reverse 1
-set_board_info gdb,use_precord 1
-
-# More time is needed
-set_board_info gcc,timeout 800
-set_board_info gdb,timeout 60
-
-# Used by a few gcc.c-torture testcases to delimit how large the stack can
-# be.
-set_board_info gcc,stack_size  5000
-
diff --git a/.travis/or1k-sim.exp b/.travis/or1k-sim.exp
deleted file mode 100644
index 3920413..0000000
--- a/.travis/or1k-sim.exp
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
-#
-# This file is part of DejaGnu.
-#
-# DejaGnu is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# DejaGnu is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with DejaGnu; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
-
-# This is a list of toolchains that are supported on this board.
-set_board_info target_install {or1k-elf}
-
-# Load the generic configuration for this board. This will define a basic set
-# of routines needed by the tool to communicate with the board.
-load_generic_config "sim"
-
-# basic-sim.exp is a basic description for the standard Cygnus simulator.
-load_base_board_description "basic-sim"
-
-# "or1k" is the name of the sim subdir in devo/sim.
-setup_sim or1k
-
-# No multilib options needed by default.
-process_multilib_options ""
-
-# We only support newlib on this target. We assume that all multilib
-# options have been specified before we get here.
-
-set_board_info compiler  "[find_gcc]"
-set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
-set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
-
-# Configuration settings for testsuites
-set_board_info noargs 1
-set_board_info gdb,nosignals 1
-set_board_info gdb,noresults 1
-set_board_info gdb,cannot_call_functions 1
-set_board_info gdb,skip_float_tests 1
-set_board_info gdb,can_reverse 1
-set_board_info gdb,use_precord 1
-
-# More time is needed
-set_board_info gcc,timeout 800
-set_board_info gdb,timeout 60
-
-# Used by a few gcc.c-torture testcases to delimit how large the stack can
-# be.
-set_board_info gcc,stack_size  5000
-
diff --git a/.travis/powerpc-eabisim.exp b/.travis/powerpc-eabisim.exp
deleted file mode 100644
index 285fd4f..0000000
--- a/.travis/powerpc-eabisim.exp
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
-#
-# This file is part of DejaGnu.
-#
-# DejaGnu is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# DejaGnu is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with DejaGnu; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
-
-# This is a list of toolchains that are supported on this board.
-set_board_info target_install {powerpc-eabisim}
-
-# Load the generic configuration for this board. This will define a basic set
-# of routines needed by the tool to communicate with the board.
-load_generic_config "sim"
-
-# basic-sim.exp is a basic description for the standard Cygnus simulator.
-load_base_board_description "basic-sim"
-
-# "powerpc" is the name of the sim subdir in devo/sim.
-setup_sim powerpc
-
-# No multilib options needed by default.
-process_multilib_options ""
-
-# We only support newlib on this target. We assume that all multilib
-# options have been specified before we get here.
-
-set_board_info compiler  "[find_gcc]"
-set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
-set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
-
-# Configuration settings for testsuites
-set_board_info noargs 1
-set_board_info gdb,nosignals 1
-set_board_info gdb,noresults 1
-set_board_info gdb,cannot_call_functions 1
-set_board_info gdb,skip_float_tests 1
-set_board_info gdb,can_reverse 1
-set_board_info gdb,use_precord 1
-
-# More time is needed
-set_board_info gcc,timeout 800
-set_board_info gdb,timeout 60
-
-# Used by a few gcc.c-torture testcases to delimit how large the stack can
-# be.
-set_board_info gcc,stack_size  5000
-
diff --git a/.travis/site.exp b/.travis/site.exp
deleted file mode 100644
index 644ec63..0000000
--- a/.travis/site.exp
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2008, 2010, 2018, 2019  Anthony Green
-
-# Make sure we look in the right place for the board description files.
-if ![info exists boards_dir] {
-    set boards_dir {}
-}
-
-lappend boards_dir $::env(TRAVIS_BUILD_DIR)/.travis
-
-verbose "Global Config File: target_triplet is $target_triplet" 2
-global target_list
-
-case "$target_triplet" in {
-    { "bfin-elf" } {
-	set target_list "bfin-sim"
-    }
-    { "m32r-elf" } {
-	set target_list "m32r-sim"
-    }
-    { "moxie-elf" } {
-	set target_list "moxie-sim"
-    }
-    { "or1k-elf" } {
-	set target_list "or1k-sim"
-    }
-}
-
diff --git a/.travis/wine-sim.exp b/.travis/wine-sim.exp
deleted file mode 100644
index 1ad6038..0000000
--- a/.travis/wine-sim.exp
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (C) 2010, 2019  Free Software Foundation, Inc.
-#
-# This file is part of DejaGnu.
-#
-# DejaGnu is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# DejaGnu is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with DejaGnu; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, MA 02110, USA.
-
-# This is a list of toolchains that are supported on this board.
-set_board_info target_install {i686-w64-mingw32}
-
-# Load the generic configuration for this board. This will define a basic set
-# of routines needed by the tool to communicate with the board.
-load_generic_config "sim"
-
-set_board_info sim "wineconsole --backend=curses"
-set_board_info is_simulator 1
-
-# No multilib options needed by default.
-process_multilib_options ""
-
-# We only support newlib on this target. We assume that all multilib
-# options have been specified before we get here.
-
-set_board_info compiler  "[find_gcc]"
-set_board_info cflags    "[libgloss_include_flags] [newlib_include_flags]"
-set_board_info ldflags   "[libgloss_link_flags] [newlib_link_flags]"
-
-# Configuration settings for testsuites
-set_board_info noargs 1
-set_board_info gdb,nosignals 1
-set_board_info gdb,noresults 1
-set_board_info gdb,cannot_call_functions 1
-set_board_info gdb,skip_float_tests 1
-set_board_info gdb,can_reverse 1
-set_board_info gdb,use_precord 1
-
-# More time is needed
-set_board_info gcc,timeout 800
-set_board_info gdb,timeout 60
-
-# Used by a few gcc.c-torture testcases to delimit how large the stack can
-# be.
-set_board_info gcc,stack_size  5000
-