This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use FFI_DECLARE macros


This breaks the Mozilla build with:

libtool: compile:  /e/builds/slave/win32-hg/build/js/ctypes/libffi/msvcc.sh -DHAVE_CONFIG_H -I. -I/e/builds/slave/win32-hg/build/js/ctypes/libffi -I. -I/e/builds/slave/win32-hg/build/js/ctypes/libffi/include -Iinclude -I/e/builds/slave/win32-hg/build/js/ctypes/libffi/src -Wall -g -fexceptions -g -c /e/builds/slave/win32-hg/build/js/ctypes/libffi/src/prep_cif.c -o src/prep_cif.obj
cl -MDd -nologo -W3 -WX -wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 -wd4324 -DHAVE_CONFIG_H -I. -I/e/builds/slave/win32-hg/build/js/ctypes/libffi -I. -I/e/builds/slave/win32-hg/build/js/ctypes/libffi/include -Iinclude -I/e/builds/slave/win32-hg/build/js/ctypes/libffi/src -Wall -D_DEBUG -RTC1 -Zi -D_DEBUG -RTC1 -Zi -c /e/builds/slave/win32-hg/build/js/ctypes/libffi/src/prep_cif.c -Fosrc/prep_cif.obj -Fdsrc/prep_cif -Fpsrc/prep_cif -Fasrc/prep_cif
prep_cif.c
e:/builds/slave/win32-hg/build/js/ctypes/libffi/src/prep_cif.c(91) : error C2491: 'ffi_prep_cif' : definition of dllimport function not allowed
e:/builds/slave/win32-hg/build/js/ctypes/libffi/src/prep_cif.c(168) : error C2491: 'ffi_prep_closure' : definition of dllimport function not allowed
make[5]: Leaving directory `/e/builds/slave/win32-hg/build/objdir/js/ctypes/libffi'

The configure args were:

running /bin/sh /e/builds/slave/win32-hg/build/js/ctypes/libffi/configure  --disable-shared --enable-static --disable-raw-api CC=/e/builds/slave/win32-hg/build/js/ctypes/libffi/msvcc.sh LD=link CPP="cl -nologo -EP" --cache-file=../../../js/ctypes/libffi/config.cache --srcdir=/e/builds/slave/win32-hg/build/js/ctypes/libffi

I haven't looked into why.

(As a side note, Mozilla links the static libffi library, so I never tested the shared configuration - hence I'm not surprised that you had to roll this patch.)

Thanks,
Dan.


----- "Mladen Turk" <mturk@redhat.com> wrote:

> Hi
> 
> The patch adds FFI_DECLARE similar to FFI_HIDDEN
> so that msvc compilers can create real .dll files
> 
> There is no functional change to the code except
> when using msvc in which case API is dllexport
> 
> 
> Regards
> -- 
> ^TM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]