Changes to update Tomato RAF.
[tomato.git] / release / src / router / dnscrypt / src / libnacl / cpuid / do
blob8a3a6f7b3564abac54fc13188b9bc34a4563164d
1 #!/bin/sh -e
3 mkdir include
6 echo x86
7 echo unknown
8 ) | (
9 while read n
11 okabi | (
12 while read abi
14 okc-$abi | (
15 while read c
17 echo "=== `date` === Trying $n.c with $c..." >&2
18 rm -f cpuid.c
19 cp $n.c cpuid.c || continue
20 $c -o cpuid cpuid.c || continue
21 $c -o cbytes cbytes.c || continue
22 ./cpuid > cpuid.out || continue
23 echo 'static const char cpuid[] = {' > cpuid.h || continue
24 ./cbytes < cpuid.out >> cpuid.h || continue
25 echo '} ;' >> cpuid.h || continue
26 cp cpuid.h include/cpuid.h || continue
27 cat cpuid.out
28 exit 0
29 done
30 exit 111
31 ) && exit 0
32 done
33 exit 111
34 ) && exit 0
35 done
36 exit 111