# Expect script for ld-auto-import tests
-# Copyright 2002, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 2002-2021 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
}
# No compiler, no test.
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
untested "Auto import test (compiler not found)"
return
}
if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/dll.c $tmpdir/dll.o] {
fail "compiling shared lib"
}
- if ![ld_special_link "$CC -shared --enable-auto-import --out-implib=$tmpdir/libstandard.dll.a" $tmpdir/dll.dll "$tmpdir/dll.o $MYLIBS"] {
+ if ![ld_special_link "$ld -shared --enable-auto-import -e __cygwin_dll_entry@12 --out-implib=$tmpdir/libstandard.dll.a" $tmpdir/dll.dll "$tmpdir/dll.o $MYLIBS"] {
fail "linking shared lib"
}