1#!/bin/sh
2
3PICOLIBC_DIR=/build/picolibc
4GLIBC_DIR=/build/glibc
5
6set -e
7
8#test=echo
9
10for arch in arm riscv; do
11
12    DIR=$PICOLIBC_DIR/builds/build-$arch-minsize
13
14    $test rm -rf $DIR
15    $test mkdir -p $DIR
16    $test cd $DIR
17
18    echo '###################################'
19    echo '####' ../../scripts/do-$arch-configure -Dwant-math-errno=true -Dio-long-double=true
20    echo '###################################'
21
22    $test ../../scripts/do-$arch-configure -Dwant-math-errno=true -Dio-long-double=true
23    $test ninja test install
24
25    DIR=$PICOLIBC_DIR/builds/build-$arch-release
26
27    $test rm -rf $DIR
28    $test mkdir -p $DIR
29    $test cd $DIR
30
31    echo '###################################'
32    echo '####' ../../scripts/do-$arch-configure -Dwant-math-errno=true -Dio-long-double=true --buildtype=release -Dbuild-type-subdir=release
33    echo '###################################'
34
35    $test ../../scripts/do-$arch-configure -Dwant-math-errno=true -Dio-long-double=true --buildtype=release -Dbuild-type-subdir=release
36    $test ninja test install
37
38done
39
40for arch in arm riscv; do
41
42    DIR=$GLIBC_DIR/builds/build-$arch-minsize
43
44    $test rm -rf $DIR
45    $test mkdir -p $DIR
46    $test cd $DIR
47
48    echo '###################################'
49    echo '####' ../../picolibc/do-$arch-configure --buildtype=minsize
50    echo '###################################'
51
52    $test ../../picolibc/do-$arch-configure --buildtype=minsize
53    $test ninja test
54
55    DIR=$GLIBC_DIR/builds/build-$arch-release
56
57    $test rm -rf $DIR
58    $test mkdir -p $DIR
59    $test cd $DIR
60
61    echo '###################################'
62    echo '####' ../../picolibc/do-$arch-configure --buildtype=release -Dpicolibc-buildtype=release
63    echo '###################################'
64
65    $test ../../picolibc/do-$arch-configure --buildtype=release -Dpicolibc-buildtype=release
66    $test ninja test
67
68done
69