mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-29 17:38:59 +00:00
bf9710fd5a
This only affects build_android, if nacl-gcc-prep is run then build/`uname -s` will be created.
38 lines
781 B
Bash
Executable File
38 lines
781 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
mkdir include
|
|
|
|
(
|
|
echo x86
|
|
echo unknown
|
|
) | (
|
|
while read n
|
|
do
|
|
okabi | (
|
|
while read abi
|
|
do
|
|
okc-$abi | (
|
|
while read c
|
|
do
|
|
echo "=== `date` === Trying $n.c with $c..." >&2
|
|
rm -f cpuid.c
|
|
cp $n.c cpuid.c || continue
|
|
$c -o cpuid cpuid.c || continue
|
|
$c -o cbytes cbytes.c || continue
|
|
./cpuid > cpuid.out || continue
|
|
echo 'static const char cpuid[] = {' > cpuid.h || continue
|
|
./cbytes < cpuid.out >> cpuid.h || continue
|
|
echo '} ;' >> cpuid.h || continue
|
|
cp cpuid.h include/cpuid.h || continue
|
|
cat cpuid.out
|
|
exit 0
|
|
done
|
|
exit 111
|
|
) && exit 0
|
|
done
|
|
exit 111
|
|
) && exit 0
|
|
done
|
|
exit 111
|
|
)
|