From 5b9c60272e18b69b70862cd9ca26e41e5bc8d9c8 Mon Sep 17 00:00:00 2001 From: Dave Korn Date: Fri, 27 Feb 2009 19:01:57 +0000 Subject: [PATCH] ld/ChangeLog * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Set default state of auto-import flag based on $target. ld/testsuite/ChangeLog * ld-pe/pe.exp: Disable auto-import when linking on Cygwin. --- ld/ChangeLog | 5 +++++ ld/emultempl/pe.em | 16 +++++++++++++++- ld/testsuite/ChangeLog | 4 ++++ ld/testsuite/ld-pe/pe.exp | 5 +++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 2e0068d216b..2f729215911 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2009-02-27 Dave Korn + + * emultempl/pe.em (gld_${EMULATION_NAME}_before_parse): Set + default state of auto-import flag based on $target. + 2009-02-24 Joseph Myers * ld.texinfo (ARM): Document changed meaning of --stub-group-size. diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 54784355881..46c4057433e 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -145,7 +145,21 @@ gld_${EMULATION_NAME}_before_parse (void) #ifdef DLL_SUPPORT config.dynamic_link = TRUE; config.has_shared = 1; - link_info.pei386_auto_import = -1; +EOF + +# Cygwin no longer wants these noisy warnings. Other PE +# targets might like to consider adding themselves here. +case ${target} in + *-*-cygwin*) + default_auto_import=1 + ;; + *) + default_auto_import=-1 + ;; +esac + +fragment < + + * ld-pe/pe.exp: Disable auto-import when linking on Cygwin. + 2009-02-26 Christophe Lyon * ld-arm/arm-elf.exp: Add 3 tests for the 3 new stubs. diff --git a/ld/testsuite/ld-pe/pe.exp b/ld/testsuite/ld-pe/pe.exp index 12b330d5e5e..f489e89d933 100644 --- a/ld/testsuite/ld-pe/pe.exp +++ b/ld/testsuite/ld-pe/pe.exp @@ -34,6 +34,11 @@ if {[istarget x86_64-*-mingw*] } { {".secrel32" "" "" {secrel1.s secrel2.s} {{objdump -s secrel_64.d}} "secrel.x"} } +} elseif {[istarget i*86-*-cygwin*] } { + set pe_tests { + {".secrel32" "--disable-auto-import" "" {secrel1.s secrel2.s} + {{objdump -s secrel.d}} "secrel.x"} + } } else { set pe_tests { {".secrel32" "" "" {secrel1.s secrel2.s} -- 2.30.2