From: davek Date: Mon, 16 Mar 2009 22:03:44 +0000 (+0000) Subject: * ld-bootstrap/bootstrap.exp: Also pass '-liconv' to linker when X-Git-Tag: cgen-snapshot-20091101~3394 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=05f2484aee5764a3dba092a407180d13217fabc5;p=pf3gnuchains%2Fpf3gnuchains4x.git * ld-bootstrap/bootstrap.exp: Also pass '-liconv' to linker when linking statically on Cygwin, necessitated by '-lintl'. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 462b6954b9..30dadce4fc 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-03-16 Dave Korn + + * ld-bootstrap/bootstrap.exp: Also pass '-liconv' to linker when + linking statically on Cygwin, necessitated by '-lintl'. + 2009-03-15 Dave Korn * ld-auto-import/auto-import.exp: Add missing dll entrypoint. diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index fdeffe3593..d84897d39b 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -83,13 +83,21 @@ foreach flags {"" "strip" "--static" "--traditional-format" } } + # On Cygwin, -lintl may require -liconv when linking statically. + set extralibs "" + if { [istarget "*-*-cygwin*"]} { + if {"$flags" == "--static"} { + set extralibs "-liconv" + } + } + # On Irix 5, linking with --static only works if all the files are # compiled using -non_shared. if {"$flags" == "--static"} { setup_xfail "mips*-*-irix5*" } - if ![ld_link $ld tmpdir/ld1 "$flags tmpdir/ld-partial.o $BFDLIB $LIBIBERTY"] { + if ![ld_link $ld tmpdir/ld1 "$flags tmpdir/ld-partial.o $BFDLIB $LIBIBERTY $extralibs"] { fail $testname continue } @@ -104,12 +112,12 @@ foreach flags {"" "strip" "--static" "--traditional-format" } } - if ![ld_link tmpdir/ld1 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] { + if ![ld_link tmpdir/ld1 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY $extralibs"] { fail $testname continue } - if ![ld_link tmpdir/ld2 tmpdir/ld3 "$flags $OFILES $BFDLIB $LIBIBERTY"] { + if ![ld_link tmpdir/ld2 tmpdir/ld3 "$flags $OFILES $BFDLIB $LIBIBERTY $extralibs"] { fail $testname continue }