+NUM_TESTS=22
+
+# Set this variable to disable tests that rely on a library using a symbol from
+# the global offset table even if it provides its own copy, which is the
+# default behavior on Linux. This happens when using the '-Bsymbolic-functions'
+# linker flag.
+UST_TESTS_LD_SYMBOLIC_FUNC=${UST_TESTS_LD_SYMBOLIC_FUNC:-}
+
+# On FreeBSD, symbol resolution when dlopening a shared object will always
+# favor symbols local to this shared object and thus our canary function will
+# never be called which breaks our abi conflict detection when abi1 is loaded
+# first.
+if [ "$UST_OS_TYPE" = "freebsd" ]; then
+ UST_TESTS_LD_SYMBOLIC_FUNC=1
+fi
+
+if [ "$UST_TESTS_LD_SYMBOLIC_FUNC" != "" ]; then
+ NUM_TESTS=$((NUM_TESTS - 4))
+fi
+