This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] win64 support for libffi (2/2)
- From: Andrew Haley <aph at redhat dot com>
- To: Timothy Wall <twalljava at dev dot java dot net>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>, Anthony Green <green at redhat dot com>
- Date: Mon, 18 May 2009 11:11:48 +0100
- Subject: Re: [PATCH] win64 support for libffi (2/2)
- References: <635C3243-B89E-460E-9C0F-209308D89729@dev.java.net>
Timothy Wall wrote:
> This patch adds support for win64 builds under mingw64 for libffi.
> Diffs are against current libffi CVS (5/12/2009). The build works with
> mingw or free MSVC cross compiler, although MSVC needs special scripts
> to wrap the compiler, assembler, and linker (available in the JNA
> project's build tree at http://jna.dev.java.net).
>
> All libffi testsuite tests pass, excluding long double tests, which are
> unsupported at this time.
>
> Configury changes have been tested on x86-darwin for inadvertent side
> effects.
Richard Guenther is right: libffi upstream and gcc have drifted horribly.
With green's permission I'll merge the changes.
Some of your patch seems odd to me, and perhaps changes are needed.
For example, why this change?
@@ -62,41 +71,59 @@
size_t z;
/* Align if necessary */
- if ((sizeof(int) - 1) & (unsigned) argp)
- argp = (char *) ALIGN(argp, sizeof(int));
+ if ((sizeof(void*) - 1) & (size_t) argp)
+ argp = (char *) ALIGN(argp, sizeof(void*));
Or this?
Index: src/x86/win32.S
===================================================================
RCS file: /cvs/libffi/libffi/src/x86/win32.S,v
retrieving revision 1.5
diff -u -b -w -r1.5 win32.S
--- src/x86/win32.S 15 Feb 2008 01:24:06 -0000 1.5
+++ src/x86/win32.S 12 May 2009 13:51:21 -0000
@@ -20,7 +20,7 @@
THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS LIABLE FOR
ANY CLAIM, DAMAGES OR