X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-pe%2Fpe-run.exp;h=6983b9867f8078bb1b7111cd6cf6bf712c154ffb;hb=07e7fdfd429985f061630c46e91cb10579607233;hp=3e7c356cff03d73c4e00ff904ab75d9920ae4e20;hpb=c1711530e652a14bc0df9b603c73e350b5dfe5ec;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testsuite/ld-pe/pe-run.exp b/ld/testsuite/ld-pe/pe-run.exp old mode 100755 new mode 100644 index 3e7c356cff..6983b9867f --- a/ld/testsuite/ld-pe/pe-run.exp +++ b/ld/testsuite/ld-pe/pe-run.exp @@ -1,7 +1,6 @@ # Expect script for complex PE tests that require a C compiler and the ability # to run target executables natively, in addition to the just-built binutils. -# Copyright 2006, 2007 -# Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -55,7 +54,7 @@ if {![is_pecoff_format]} { } # No compiler, no test. -if { [which $CC] == 0 } { +if { ![check_compiler_available] } { untested "Direct linking to dll test" return } @@ -72,9 +71,9 @@ proc test_direct_link_dll {} { # Compile the dll. if ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/direct_dll.c $tmpdir/direct_dll.o ] { fail "compiling shared lib" - } elseif ![ld_simple_link "$CC -shared" $tmpdir/direct_dll.dll "$tmpdir/direct_dll.o" ] { + } elseif ![ld_link "$CC -shared" $tmpdir/direct_dll.dll "$tmpdir/direct_dll.o" ] { fail "linking shared lib (.dll)" - } elseif ![ld_simple_link "$CC -shared" $tmpdir/direct_dll.sl "$tmpdir/direct_dll.o" ] { + } elseif ![ld_link "$CC -shared" $tmpdir/direct_dll.sl "$tmpdir/direct_dll.o" ] { fail "linking shared lib (.sl)" } else { # Compile and link the client program. @@ -83,7 +82,8 @@ proc test_direct_link_dll {} { } else { # Check linking directly to direct_dll.dll. set msg "linking client (.dll)" - if [ld_simple_link $CC $tmpdir/direct_client_dll.exe "$tmpdir/direct_client.o $tmpdir/direct_dll.dll" ] { + if [ld_link "$CC -Wl,--enable-auto-import" $tmpdir/direct_client_dll.exe \ + "$tmpdir/direct_client.o $tmpdir/direct_dll.dll" ] { pass $msg } else { fail $msg @@ -91,7 +91,8 @@ proc test_direct_link_dll {} { # Check linking directly to direct_dll.sl. set msg "linking client (.sl)" - if [ld_simple_link $CC $tmpdir/direct_client_sl.exe "$tmpdir/direct_client.o $tmpdir/direct_dll.sl" ] { + if [ld_link "$CC -Wl,--enable-auto-import" $tmpdir/direct_client_sl.exe \ + "$tmpdir/direct_client.o $tmpdir/direct_dll.sl" ] { pass $msg } else { fail $msg @@ -101,7 +102,8 @@ proc test_direct_link_dll {} { # Create symbolic link. catch "exec ln -fs direct_dll.dll $tmpdir/libdirect_dll.dll.a" ln_catch set msg "linking client (symlink -> .dll)" - if [ld_simple_link $CC $tmpdir/direct_client_symlink_dll.exe "$tmpdir/direct_client.o $tmpdir/libdirect_dll.dll.a" ] { + if [ld_link "$CC -Wl,--enable-auto-import" $tmpdir/direct_client_symlink_dll.exe \ + "$tmpdir/direct_client.o $tmpdir/libdirect_dll.dll.a" ] { pass $msg } else { fail $msg @@ -111,7 +113,8 @@ proc test_direct_link_dll {} { # Create symbolic link. catch "exec ln -fs direct_dll.sl $tmpdir/libdirect_sl.dll.a" ln_catch set msg "linking client (symlink -> .sl)" - if [ld_simple_link $CC $tmpdir/direct_client_symlink_sl.exe "$tmpdir/direct_client.o $tmpdir/libdirect_sl.dll.a" ] { + if [ld_link "$CC -Wl,--enable-auto-import" $tmpdir/direct_client_symlink_sl.exe \ + "$tmpdir/direct_client.o $tmpdir/libdirect_sl.dll.a" ] { pass $msg } else { fail $msg