[patch binutils] Handle Win64 calling convention in ld-plugin tests
Stephen Kitt
steve@sk2.org
Thu Aug 28 20:26:00 GMT 2014
On Thu, 28 Aug 2014 14:50:51 +0930, Alan Modra <amodra@gmail.com> wrote:
> On Sun, Aug 24, 2014 at 08:59:56AM -0700, Stephen Kitt wrote:
> > Currently the ld-plugin tests expect to find ___main, which fails when
> > targetting Win64. (The calling convention there specifies no additional
> > underscores.) The following patch adjusts the defsym in ld-lib.exp for
> > this case; this allows the testsuite to pass on x86_64-w64-mingw32.
>
> I see there is a configure option --enable-leading-mingw64-underscores,
> so can you check that the following works?
>
> diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
> index e4084e1..292a873 100644
> --- a/ld/testsuite/lib/ld-lib.exp
> +++ b/ld/testsuite/lib/ld-lib.exp
> @@ -410,9 +410,9 @@ proc ld_simple_link_defsyms {} {
> append flags " --defsym __gccmain=0"
> }
>
> - # Windows targets need __main, prefixed with underscore.
> + # Windows targets need __main, some prefixed with underscore.
> if {[istarget *-*-cygwin* ] || [istarget *-*-mingw*]} {
> - append flags " --defsym ___main=0"
> + append flags " --defsym __main=0 --defsym ___main=0"
> }
>
> # PowerPC EABI code calls __eabi.
It does indeed, and as long as that option is available then the test should
support both variants, which my patch didn't.
Thanks!
Stephen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20140828/eec011f1/attachment.sig>
More information about the Binutils
mailing list