Enable building of the libffi internal MSVC code, instead of libffi_msvc. b=538216, r=ted

This commit is contained in:
Dan Witte 2010-03-05 11:31:53 -08:00
Родитель 63eae82694
Коммит c16513911e
5 изменённых файлов: 54 добавлений и 62 удалений

Просмотреть файл

@ -8730,30 +8730,34 @@ ac_configure_args="$_SUBDIR_CONFIG_ARGS"
# Build jsctypes on the platforms we can.
if test "$BUILD_CTYPES"; then
# Run the libffi 'configure' script on platforms that it supports.
if test -z "$_MSC_VER"; then
ac_configure_args="--disable-shared --enable-static --disable-raw-api"
if test "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --enable-debug"
fi
if test -n "$DSO_PIC_CFLAGS"; then
ac_configure_args="$ac_configure_args --with-pic"
fi
if test -n "$CROSS_COMPILE"; then
ac_configure_args="$ac_configure_args --build=$build --host=$target"
fi
if test "$SOLARIS_SUNPRO_CC"; then
# Always use gcc for libffi on Solaris
old_cache_file=$cache_file
cache_file=js/ctypes/libffi/config.cache
ac_configure_args="$ac_configure_args CC=gcc"
AC_OUTPUT_SUBDIRS(js/ctypes/libffi)
cache_file=$old_cache_file
else
AC_OUTPUT_SUBDIRS(js/ctypes/libffi)
fi
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
# Run the libffi 'configure' script.
ac_configure_args="--disable-shared --enable-static --disable-raw-api"
if test "$MOZ_DEBUG"; then
ac_configure_args="$ac_configure_args --enable-debug"
fi
if test "$DSO_PIC_CFLAGS"; then
ac_configure_args="$ac_configure_args --with-pic"
fi
if test "$CROSS_COMPILE"; then
ac_configure_args="$ac_configure_args --build=$build --host=$target"
fi
if test "$_MSC_VER"; then
# Use a wrapper script for cl and ml that looks more like gcc.
# autotools can't quite handle an MSVC build environment yet.
ac_configure_args="$ac_configure_args CC=$_topsrcdir/js/ctypes/libffi/msvcc.sh LD=link CPP=\"cl -nologo -EP\""
fi
if test "$SOLARIS_SUNPRO_CC"; then
# Always use gcc for libffi on Solaris
ac_configure_args="$ac_configure_args CC=gcc"
fi
# Use a separate cache file for libffi, since it does things differently
# from our configure.
old_cache_file=$cache_file
cache_file=js/ctypes/libffi/config.cache
AC_OUTPUT_SUBDIRS(js/ctypes/libffi)
cache_file=$old_cache_file
ac_configure_args="$_SUBDIR_CONFIG_ARGS"
fi
fi # COMPILE_ENVIRONMENT && !LIBXUL_SDK_DIR

Просмотреть файл

@ -65,51 +65,20 @@ CPPSRCS = \
Module.cpp \
$(NULL)
ifdef _MSC_VER
# build and link sources directly from libffi_msvc
VPATH += \
$(srcdir)/libffi_msvc \
$(NULL)
LOCAL_INCLUDES = \
-I$(srcdir)/libffi_msvc \
$(NULL)
CSRCS = \
ffi.c \
prep_cif.c \
types.c \
$(NULL)
ifndef HAVE_64BIT_OS
CSRCS += \
win32.c \
$(NULL)
else
ASFILES = \
win64.asm \
$(NULL)
endif
else # _MSVC_VER
# build libffi proper
LOCAL_INCLUDES = \
-Ilibffi/include \
$(NULL)
ifeq ($(OS_ARCH),OS2)
libffi/.libs/ffi.$(LIB_SUFFIX): libffi/.libs/$(LIB_PREFIX)ffi.a
# libffi builds an aout lib on OS/2; convert it to an OMF lib.
libffi/.libs/libffi.$(LIB_SUFFIX): libffi/.libs/libffi.a
emxomf $<
endif
SHARED_LIBRARY_LIBS = \
libffi/.libs/$(LIB_PREFIX)ffi.$(LIB_SUFFIX) \
libffi/.libs/libffi.$(LIB_SUFFIX) \
$(NULL)
endif # _MSVC_VER
EXTRA_DSO_LDOPTS += \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \

Просмотреть файл

@ -1,4 +1,4 @@
Patch libffi 3.0.9 to fix bug 528129.
Patch libffi to fix bug 528129 and bug 538216.
diff --git a/js/ctypes/libffi/Makefile.in b/js/ctypes/libffi/Makefile.in
--- a/js/ctypes/libffi/Makefile.in
@ -22,4 +22,25 @@ diff --git a/js/ctypes/libffi/Makefile.in b/js/ctypes/libffi/Makefile.in
TEXINFOS = doc/libffi.texi
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
diff --git a/js/ctypes/libffi/configure b/js/ctypes/libffi/configure
--- a/js/ctypes/libffi/configure
+++ b/js/ctypes/libffi/configure
@@ -9016,17 +9016,17 @@ if test -z "$aix_libpath"; then aix_libp
# Tell ltmain to make .dll files, not .so files.
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
+ fix_srcfile_path=''
enable_shared_with_static_runtimes=yes
;;
darwin* | rhapsody*)
archive_cmds_need_lc=no
hardcode_direct=no

2
js/ctypes/libffi/configure поставляемый
Просмотреть файл

@ -9021,7 +9021,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
fix_srcfile_path=''
enable_shared_with_static_runtimes=yes
;;

Просмотреть файл

@ -116,12 +116,10 @@ tier_platform_dirs += \
$(NULL)
ifdef BUILD_CTYPES
ifndef _MSC_VER
tier_platform_staticdirs += \
js/ctypes/libffi \
$(NULL)
endif
endif
ifdef MOZ_ENABLE_GTK2
ifdef MOZ_X11