summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2014-10-08 18:35:16 +0000
committerEd Maste <emaste@freebsd.org>2014-10-08 18:35:16 +0000
commite4320f5e6a1b4cd0f41bd58afb1f96849901333f (patch)
tree281e22c85bbff57a6e9121a5031cc8a7bb189dce /compiler-rt
parent8897b8d21adae3fcf058577258ec8d3f8b9e0c5d (diff)
downloadbcm5719-llvm-e4320f5e6a1b4cd0f41bd58afb1f96849901333f.tar.gz
bcm5719-llvm-e4320f5e6a1b4cd0f41bd58afb1f96849901333f.zip
Remove bashisms and switch to /bin/sh
On a default FreeBSD install Bash is not installed and fdescfs is not mounted. Use plain sh functionality instead. Differential Revision: http://reviews.llvm.org/D5631 llvm-svn: 219333
Diffstat (limited to 'compiler-rt')
-rwxr-xr-xcompiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh32
1 files changed, 16 insertions, 16 deletions
diff --git a/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh b/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh
index 7acf005bf46..50bc85d4aef 100755
--- a/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh
+++ b/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
DFSAN_DIR=$(dirname "$0")/../
DFSAN_CUSTOM_TESTS=${DFSAN_DIR}/../../test/dfsan/custom.cc
@@ -7,20 +7,22 @@ DFSAN_ABI_LIST=${DFSAN_DIR}/done_abilist.txt
DIFFOUT=$(mktemp -q /tmp/tmp.XXXXXXXXXX)
ERRORLOG=$(mktemp -q /tmp/tmp.XXXXXXXXXX)
+DIFF_A=$(mktemp -q /tmp/tmp.XXXXXXXXXX)
+DIFF_B=$(mktemp -q /tmp/tmp.XXXXXXXXXX)
on_exit() {
rm -f ${DIFFOUT} 2> /dev/null
rm -f ${ERRORLOG} 2> /dev/null
+ rm -f ${DIFF_A} 2> /dev/null
+ rm -f ${DIFF_B} 2> /dev/null
}
trap on_exit EXIT
-
-diff -u \
- <(grep -E "^fun:.*=custom" ${DFSAN_ABI_LIST} | grep -v "dfsan_get_label" \
- | sed "s/^fun:\(.*\)=custom.*/\1/" | sort ) \
- <(grep -E "__dfsw.*\(" ${DFSAN_CUSTOM_WRAPPERS} \
- | sed "s/.*__dfsw_\(.*\)(.*/\1/" \
- | sort) > ${DIFFOUT}
+grep -E "^fun:.*=custom" ${DFSAN_ABI_LIST} | grep -v "dfsan_get_label" \
+ | sed "s/^fun:\(.*\)=custom.*/\1/" | sort > $DIFF_A
+grep -E "__dfsw.*\(" ${DFSAN_CUSTOM_WRAPPERS} \
+ | sed "s/.*__dfsw_\(.*\)(.*/\1/" | sort > $DIFF_B
+diff -u $DIFF_A $DIFF_B > ${DIFFOUT}
if [ $? -ne 0 ]
then
echo -n "The following differences between the ABI list and ">> ${ERRORLOG}
@@ -28,13 +30,11 @@ then
cat ${DIFFOUT} >> ${ERRORLOG}
fi
-diff -u \
- <(grep -E __dfsw_ ${DFSAN_CUSTOM_WRAPPERS} \
- | sed "s/.*__dfsw_\([^(]*\).*/\1/" \
- | sort) \
- <(grep -E "^\\s*test_.*\(\);" ${DFSAN_CUSTOM_TESTS} \
- | sed "s/.*test_\(.*\)();/\1/" \
- | sort) > ${DIFFOUT}
+grep -E __dfsw_ ${DFSAN_CUSTOM_WRAPPERS} \
+ | sed "s/.*__dfsw_\([^(]*\).*/\1/" | sort > $DIFF_A
+grep -E "^\\s*test_.*\(\);" ${DFSAN_CUSTOM_TESTS} \
+ | sed "s/.*test_\(.*\)();/\1/" | sort > $DIFF_B
+diff -u $DIFF_A $DIFF_B > ${DIFFOUT}
if [ $? -ne 0 ]
then
echo -n "The following differences between the implemented " >> ${ERRORLOG}
@@ -42,7 +42,7 @@ then
cat ${DIFFOUT} >> ${ERRORLOG}
fi
-if [[ -s ${ERRORLOG} ]]
+if [ -s ${ERRORLOG} ]
then
cat ${ERRORLOG}
exit 1
OpenPOWER on IntegriCloud