diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/ctypes/libffi-patches | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/ctypes/libffi-patches')
-rw-r--r-- | js/src/ctypes/libffi-patches/00-base.patch | 134 | ||||
-rw-r--r-- | js/src/ctypes/libffi-patches/01-1014976-rtl.patch | 30 | ||||
-rw-r--r-- | js/src/ctypes/libffi-patches/02-clang-cl.patch | 63 | ||||
-rw-r--r-- | js/src/ctypes/libffi-patches/03-asan.patch | 31 |
4 files changed, 258 insertions, 0 deletions
diff --git a/js/src/ctypes/libffi-patches/00-base.patch b/js/src/ctypes/libffi-patches/00-base.patch new file mode 100644 index 000000000..2edafb986 --- /dev/null +++ b/js/src/ctypes/libffi-patches/00-base.patch @@ -0,0 +1,134 @@ +Modifications to upstream libffi needed for the Mozilla build: +* Clear INFO_DEPS so that builds don't fail when makeinfo isn't present. + - This can be removed if https://github.com/atgreen/libffi/issues/111 is fixed. +* Various workarounds for pymake bugs. + - Once pymake support is fully deprecated, hunks 2-4 be safely removed. + +diff --git a/js/src/ctypes/libffi/Makefile.in b/js/src/ctypes/libffi/Makefile.in +--- a/js/src/ctypes/libffi/Makefile.in ++++ b/js/src/ctypes/libffi/Makefile.in +@@ -358,17 +358,17 @@ am__v_TEXI2PDF_1 = + AM_V_texinfo = $(am__v_texinfo_@AM_V@) + am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) + am__v_texinfo_0 = -q + am__v_texinfo_1 = + AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) + am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) + am__v_texidevnull_0 = > /dev/null + am__v_texidevnull_1 = +-INFO_DEPS = $(srcdir)/doc/libffi.info ++INFO_DEPS = + am__TEXINFO_TEX_DIR = $(srcdir) + DVIS = doc/libffi.dvi + PDFS = doc/libffi.pdf + PSS = doc/libffi.ps + HTMLS = doc/libffi.html + TEXINFOS = doc/libffi.texi + TEXI2DVI = texi2dvi + TEXI2PDF = $(TEXI2DVI) --pdf --batch +@@ -758,18 +758,20 @@ Makefile: $(srcdir)/Makefile.in $(top_bu + + $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) + $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__aclocal_m4_deps): + + fficonfig.h: stamp-h1 +- @test -f $@ || rm -f stamp-h1 +- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 ++ @if test ! -f $@; then \ ++ rm -f stamp-h1; \ ++ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ ++ else :; fi + + stamp-h1: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status fficonfig.h + $(srcdir)/fficonfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ +@@ -1292,57 +1294,57 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/freebsd.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/sysv.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/unix64.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win32.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@src/x86/$(DEPDIR)/win64.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@src/xtensa/$(DEPDIR)/ffi.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@src/xtensa/$(DEPDIR)/sysv.Plo@am__quote@ + +-.S.o: ++%.o: %.S + @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< + +-.S.obj: ++%.obj: %.S + @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + @am__fastdepCCAS_TRUE@ $(CPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +-.S.lo: ++%.lo: %.S + @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ + @am__fastdepCCAS_TRUE@ $(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + @am__fastdepCCAS_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< + +-.c.o: ++%.o: %.c + @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ + @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +-.c.obj: ++%.obj: %.c + @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ + @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ + @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po + @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +-.c.lo: ++%.lo: %.c + @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ + @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ + @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo + @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + + mostlyclean-libtool: +@@ -1443,17 +1445,17 @@ doc/libffi.html: doc/libffi.texi $(srcdi + -@rm -f vti.tmp + @cp $(srcdir)/doc/version.texi $@ + + mostlyclean-vti: + -rm -f vti.tmp + + maintainer-clean-vti: + @MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi +-.dvi.ps: ++%.ps: %.dvi + $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) $(AM_V_texinfo) -o $@ $< + + uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ diff --git a/js/src/ctypes/libffi-patches/01-1014976-rtl.patch b/js/src/ctypes/libffi-patches/01-1014976-rtl.patch new file mode 100644 index 000000000..82c2bcef4 --- /dev/null +++ b/js/src/ctypes/libffi-patches/01-1014976-rtl.patch @@ -0,0 +1,30 @@ +Bug 1014976 - Don't make --enable-debug imply using the debug CRT in FFI + +diff --git a/js/src/ctypes/libffi/msvcc.sh b/js/src/ctypes/libffi/msvcc.sh +--- a/js/src/ctypes/libffi/msvcc.sh ++++ b/js/src/ctypes/libffi/msvcc.sh +@@ -100,19 +100,23 @@ do + shift 1 + ;; + -g) + # Enable debug symbol generation. + args="$args -Zi" + shift 1 + ;; + -DFFI_DEBUG) +- # Link against debug CRT and enable runtime error checks. ++ # Enable runtime error checks. + args="$args -RTC1" + defines="$defines $1" ++ shift 1 ++ ;; ++ -DUSE_DEBUG_RTL) ++ # Link against debug CRT. + md=-MDd + shift 1 + ;; + -c) + args="$args -c" + args="$(echo $args | sed 's%/Fe%/Fo%g')" + single="-c" + shift 1 diff --git a/js/src/ctypes/libffi-patches/02-clang-cl.patch b/js/src/ctypes/libffi-patches/02-clang-cl.patch new file mode 100644 index 000000000..6f0b6a5ea --- /dev/null +++ b/js/src/ctypes/libffi-patches/02-clang-cl.patch @@ -0,0 +1,63 @@ +commit fb25cd08ed5a87640b02f0feeb10a09b37cfddbe (HEAD, origin/clang-cl, clang-cl) +Author: Ehsan Akhgari <ehsan@mozilla.com> +Date: Wed Jun 11 12:07:24 2014 -0400 + + Add support for building with clang-cl + +diff --git a/README b/README +index 7aee5b4..9cba257 100644 +--- a/README ++++ b/README +@@ -146,12 +146,17 @@ It's also possible to build libffi on Windows platforms with + Microsoft's Visual C++ compiler. In this case, use the msvcc.sh + wrapper script during configuration like so: + +-path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\" ++path/to/configure CC=path/to/msvcc.sh CXX=path/to/msvcc.sh LD=link CPP="cl -nologo -EP" + + For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64" and + CXX="path/to/msvcc.sh -m64". You may also need to specify --build + appropriately. + ++It is also possible to build libffi on Windows platforms with the LLVM ++project's clang-cl compiler, like below: ++ ++path/to/configure CC="path/to/msvcc.sh -clang-cl" CXX="path/to/msvcc.sh -clang-cl" LD=link CPP="clang-cl -EP" ++ + When building with MSVC under a MingW environment, you may need to + remove the line in configure that sets 'fix_srcfile_path' to a 'cygpath' + command. ('cygpath' is not present in MingW, and is not required when +diff --git a/include/ffi.h.in b/include/ffi.h.in +index 70c6179..ebed0aa 100644 +--- a/include/ffi.h.in ++++ b/include/ffi.h.in +@@ -68,7 +68,7 @@ extern "C" { + + #ifndef LIBFFI_ASM + +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && !defined(__clang__) + #define __attribute__(X) + #endif + +diff --git a/msvcc.sh b/msvcc.sh +index 9208076..4a65b0b 100755 +--- a/msvcc.sh ++++ b/msvcc.sh +@@ -63,11 +63,15 @@ do + shift 1 + ;; + -m64) +- cl="cl" # "$MSVC/x86_amd64/cl" + ml="ml64" # "$MSVC/x86_amd64/ml64" + safeseh= + shift 1 + ;; ++ -clang-cl) ++ cl="clang-cl" ++ safeseh= ++ shift 1 ++ ;; + -O0) + args="$args -Od" + shift 1 diff --git a/js/src/ctypes/libffi-patches/03-asan.patch b/js/src/ctypes/libffi-patches/03-asan.patch new file mode 100644 index 000000000..c28a850f2 --- /dev/null +++ b/js/src/ctypes/libffi-patches/03-asan.patch @@ -0,0 +1,31 @@ +diff --git a/js/src/ctypes/libffi/src/x86/ffi64.c b/js/src/ctypes/libffi/src/x86/ffi64.c +index 5a5e043..0594119 100644 +--- a/js/src/ctypes/libffi/src/x86/ffi64.c ++++ b/js/src/ctypes/libffi/src/x86/ffi64.c +@@ -414,16 +414,26 @@ ffi_prep_cif_machdep (ffi_cif *cif) + if (ssecount) + flags |= 1 << 11; + cif->flags = flags; + cif->bytes = (unsigned)ALIGN (bytes, 8); + + return FFI_OK; + } + ++#ifndef __SANITIZE_ADDRESS__ ++# ifdef __clang__ ++# if __has_feature(address_sanitizer) ++# define __SANITIZE_ADDRESS__ ++# endif ++# endif ++#endif ++#ifdef __SANITIZE_ADDRESS__ ++__attribute__((noinline,no_sanitize_address)) ++#endif + void + ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + { + enum x86_64_reg_class classes[MAX_CLASSES]; + char *stack, *argp; + ffi_type **arg_types; + int gprcount, ssecount, ngpr, nsse, i, avn; + _Bool ret_in_memory; |