blob: c7d6cfb9161776c9508e71c07b473bb8c17b65d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#! /bin/sh
mkdir -p build
abi=${CC##* }
base=build/runcheck$abi
cat >$base.c <<EOF
#include <stdio.h>
int main()
{
printf("$abi");
return 0;
}
EOF
if ${CC:-gcc} -o $base $base.c 2>/dev/null; then
if [ "$($base 2>&1)" = "$abi" ]; then
printf "%s" $abi > $base.out
printf "%s" $abi
fi
fi
|