# Expect script for ld-plugin tests
-# Copyright (C) 2010-2018 Free Software Foundation, Inc.
+# Copyright (C) 2010-2019 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
# And a compiler to be available.
set can_compile 1
set failure_kind "unresolved"
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
# Don't fail immediately,
set can_compile 0
set failure_kind "unsupported"