[compiler-rt] 0fb8a53 - tsan: don't check libc dependency on FreeBSD
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 03:47:53 PDT 2020
Author: Dmitry Vyukov
Date: 2020-04-02T12:46:28+02:00
New Revision: 0fb8a5356214c47bbb832e89fbb3da1c755eeb73
URL: https://github.com/llvm/llvm-project/commit/0fb8a5356214c47bbb832e89fbb3da1c755eeb73
DIFF: https://github.com/llvm/llvm-project/commit/0fb8a5356214c47bbb832e89fbb3da1c755eeb73.diff
LOG: tsan: don't check libc dependency on FreeBSD
This check fails on FreeBSD:
https://github.com/golang/go/issues/14481#issuecomment-607471193
It is meant to prevent regressions, so disable it on FreeBSD.
Added:
Modified:
compiler-rt/lib/tsan/go/buildgo.sh
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh
index f85cad57185e..6133421318f2 100755
--- a/compiler-rt/lib/tsan/go/buildgo.sh
+++ b/compiler-rt/lib/tsan/go/buildgo.sh
@@ -66,6 +66,10 @@ if [ "`uname -a | grep Linux`" != "" ]; then
ARCHCFLAGS=""
fi
elif [ "`uname -a | grep FreeBSD`" != "" ]; then
+ # The resulting object still depends on libc.
+ # We removed this dependency for Go runtime for other OSes,
+ # and we should remove it for FreeBSD as well, but there is no pressing need.
+ DEPENDS_ON_LIBC=1
SUFFIX="freebsd_amd64"
OSCFLAGS="-fno-strict-aliasing -fPIC -Werror"
ARCHCFLAGS="-m64"
@@ -172,10 +176,12 @@ $CC $DIR/gotsan.cpp -c -o $DIR/race_$SUFFIX.syso $FLAGS $CFLAGS
$CC $OSCFLAGS $ARCHCFLAGS test.c $DIR/race_$SUFFIX.syso -g -o $DIR/test $OSLDFLAGS $LDFLAGS
-# Verify that no glibc specific code is present
-if nm $DIR/race_$SUFFIX.syso | grep -q __libc_; then
- printf -- '%s seems to link to libc\n' "race_$SUFFIX.syso"
- exit 1
+# Verify that no libc specific code is present.
+if [ "$DEPENDS_ON_LIBC" != "1" ]; then
+ if nm $DIR/race_$SUFFIX.syso | grep -q __libc_; then
+ printf -- '%s seems to link to libc\n' "race_$SUFFIX.syso"
+ exit 1
+ fi
fi
export GORACE="exitcode=0 atexit_sleep_ms=0"
More information about the llvm-commits
mailing list