Remove hard-coded invocations of gcc; use cc(1) instead.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2015-01-31 23:02:27 +00:00
parent 1bc414c30e
commit d040338533
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278009
4 changed files with 7 additions and 13 deletions

View File

@ -31,7 +31,6 @@ if [ $# != 1 ]; then
fi fi
dtrace=$1 dtrace=$1
CC=/usr/bin/gcc
CFLAGS= CFLAGS=
doit() doit()
@ -47,7 +46,7 @@ void
main() main()
{} {}
EOF EOF
if $CC $CFLAGS -o $cofile $cfile >/dev/null 2>&1; then if cc $CFLAGS -o $cofile $cfile >/dev/null 2>&1; then
$dtrace -xerrtags -C -s /dev/stdin \ $dtrace -xerrtags -C -s /dev/stdin \
>/dev/null 2>$errfile <<EOF >/dev/null 2>$errfile <<EOF
#include <sys/$file> #include <sys/$file>
@ -67,11 +66,6 @@ EOF
rm -f $cofile $cfile 2>/dev/null rm -f $cofile $cfile 2>/dev/null
} }
if [ ! -x $CC ]; then
echo "$0: bad compiler: $CC" >& 2
exit 1
fi
concurrency=`psrinfo | wc -l` concurrency=`psrinfo | wc -l`
let concurrency=concurrency*4 let concurrency=concurrency*4
let i=0 let i=0

View File

@ -51,7 +51,7 @@ provider test_prov {
}; };
EOF EOF
gcc -c test.c cc -c test.c
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
print -u2 "failed to compile test.c" print -u2 "failed to compile test.c"
exit 1 exit 1
@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then
print -u2 "failed to create DOF" print -u2 "failed to create DOF"
exit 1 exit 1
fi fi
gcc -o test test.o prov.o cc -o test test.o prov.o
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
print -u2 "failed to link final executable" print -u2 "failed to link final executable"
exit 1 exit 1

View File

@ -51,7 +51,7 @@ provider test_prov {
}; };
EOF EOF
gcc -c test.c cc -c test.c
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
print -u2 "failed to compile test.c" print -u2 "failed to compile test.c"
exit 1 exit 1
@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then
print -u2 "failed to create DOF" print -u2 "failed to create DOF"
exit 1 exit 1
fi fi
gcc -o test test.o prov.o cc -o test test.o prov.o
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
print -u2 "failed to link final executable" print -u2 "failed to link final executable"
exit 1 exit 1

View File

@ -51,7 +51,7 @@ provider test_prov {
}; };
EOF EOF
gcc -c test.c cc -c test.c
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
print -u2 "failed to compile test.c" print -u2 "failed to compile test.c"
exit 1 exit 1
@ -61,7 +61,7 @@ if [ $? -ne 0 ]; then
print -u2 "failed to create DOF" print -u2 "failed to create DOF"
exit 1 exit 1
fi fi
gcc -o test test.o prov.o cc -o test test.o prov.o
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
print -u2 "failed to link final executable" print -u2 "failed to link final executable"
exit 1 exit 1