On Tue, Mar 13, 2012 at 10:24 AM, Peter Rosin <
peda@...> wrote:
> ---
> ChangeLog | 6 ++++++
> src/x86/win32.S | 2 +-
> 2 files changed, 7 insertions(+), 1 deletions(-)
>
> Hi!
>
> I tried to build libffi using MSYS/MSVC and ml stumbled with
>
> win32.asm(958) : error A2006: undefined symbol : stub
>
> when it compiled win32.S. Looking into that, I could fix it
> with this patch, but it seems a bit strange that I need it,
> given that it fails like this regardless if I use MSVC 2005
> or MSVC 2010 (I can't find any ml.exe in my old MSVC 6 (1998)
> install, I might have selected to not install it?). It seems
> like this double colon problem should have been detected
> earlier...
Thanks Peter. I don't have the ability to test this, but I looked up
the uses for ::, and I agree.
> I would also like a hint on how to do basic tests given that
> dejagnu isn't available for MSYS (or is it?). "make check"
> complains with:
>
> WARNING: could not find `runtest'
DejaGNU is available for cygwin, and a quick google search shows that
there's also an MSYS version.
Thanks,
AG
>
> Cheers,
> Peter
>
> diff --git a/ChangeLog b/ChangeLog
> index bb5bc16..3f4c5b9 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,9 @@
> +2012-03-13 Peter Rosin <
peda@...>
> +
> + * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub'
> + label visible outside the PROC, so that ffi_closure_THISCALL
> + can see it.
> +
> 2012-03-03 H.J. Lu <
hongjiu.lu@...>
>
> * src/x86/ffi64.c (ffi_call): Cast the return value to unsigned
> diff --git a/src/x86/win32.S b/src/x86/win32.S
> index e5c93ecf..47629fe 100644
> --- a/src/x86/win32.S
> +++ b/src/x86/win32.S
> @@ -187,7 +187,7 @@ ffi_closure_SYSV PROC NEAR FORCEFRAME
> lea edx, [ebp - 24]
> mov [ebp - 12], edx ;; resp
> lea edx, [ebp + 8]
> -stub:
> +stub::
> mov [esp + 8], edx ;; args
> lea edx, [ebp - 12]
> mov [esp + 4], edx ;; &resp
> --
> 1.7.9
>