Fix building PE test executables in environments where $CFLAGS is needed.

* ld-pe/pe-run2.exp (test_direct2_link_dll): Add $CFLAGS to the
	compiler command line.
This commit is contained in:
Stephen Kitt 2015-05-29 11:51:41 +01:00 committed by Nick Clifton
parent 8c6a948dbe
commit 32c17175af
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2015-05-29 Stephen Kitt <steve@sk2.org>
* ld-pe/pe-run2.exp (test_direct2_link_dll): Add $CFLAGS to the
compiler command line.
2015-05-28 Catherine Moore <clm@codesourcery.com>
ld/testsuite/

View File

@ -84,7 +84,7 @@ proc test_direct2_link_dll {} {
} else {
# Check linking directly to direct2_dll.dll.
set msg "linking client (.dll) fastcall/stdcall"
if [ld_simple_link "$CC -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_dll.exe \
if [ld_simple_link "$CC $CFLAGS -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_dll.exe \
"$tmpdir/direct2_client.o $tmpdir/direct2_dll.dll" ] {
pass $msg
} else {
@ -93,7 +93,7 @@ proc test_direct2_link_dll {} {
# Check linking directly to direct2_dll.sl.
set msg "linking client (.sl) fastcall/stdcall"
if [ld_simple_link "$CC -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_sl.exe \
if [ld_simple_link "$CC $CFLAGS -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_sl.exe \
"$tmpdir/direct2_client.o $tmpdir/direct2_dll.sl" ] {
pass $msg
} else {
@ -104,7 +104,7 @@ proc test_direct2_link_dll {} {
# Create symbolic link.
catch "exec ln -fs direct2_dll.dll $tmpdir/libdirect2_dll.dll.a" ln_catch
set msg "linking client (symlink -> .dll) fastcall/stdcall"
if [ld_simple_link "$CC -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_symlink_dll.exe \
if [ld_simple_link "$CC $CFLAGS -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_symlink_dll.exe \
"$tmpdir/direct2_client.o $tmpdir/libdirect2_dll.dll.a" ] {
pass $msg
} else {
@ -115,7 +115,7 @@ proc test_direct2_link_dll {} {
# Create symbolic link.
catch "exec ln -fs direct2_dll.sl $tmpdir/libdirect2_sl.dll.a" ln_catch
set msg "linking client (symlink -> .sl) fastcall/stdcall"
if [ld_simple_link "$CC -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_symlink_sl.exe \
if [ld_simple_link "$CC $CFLAGS -Wl,--enable-stdcall-fixup -Wl,--enable-auto-import" $tmpdir/direct2_client_symlink_sl.exe \
"$tmpdir/direct2_client.o $tmpdir/libdirect2_sl.dll.a" ] {
pass $msg
} else {