17349280 Move ruby cflags disabling raw_size to libffi and disable raw_size when active
25255783 LLVM makefile libffi include dirs should use --cflags-only-I instead of --cflags
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libffi/patches/1_raw_api.patch Thu Dec 15 15:34:10 2016 -0800
@@ -0,0 +1,36 @@
+Raw API calls are not supported, since they are disabled in the Makefile
+for a fix to bug 22535919 which requires API calls to be disabled.
+Removes the raw API functions if RAW API is not allowed.
+Will attempt to send upstream.
+
+--- libffi-3.2.1/libffi.pc.in_orig 2016-11-30 13:27:54.465013600 +0000
++++ libffi-3.2.1/libffi.pc.in 2016-11-30 13:28:43.661349542 +0000
[email protected]@ -8,4 +8,4 @@
+ Description: Library supporting Foreign Function Interfaces
+ Version: @[email protected]
+ Libs: -L${toolexeclibdir} -lffi
+-Cflags: -I${includedir}
++Cflags: -I${includedir} -DFFI_NO_RAW_API
+--- libffi-3.2.1/include/ffi.h.in.~1~ 2014-11-08 04:47:24.000000000 +0000
++++ libffi-3.2.1/include/ffi.h.in 2016-11-30 17:29:52.630907951 +0000
[email protected]@ -282,14 +282,16 @@
+ #endif
+
+
+-void ffi_raw_call (ffi_cif *cif,
++#if !FFI_NO_RAW_API
++ void ffi_raw_call (ffi_cif *cif,
+ void (*fn)(void),
+ void *rvalue,
+ ffi_raw *avalue);
+
+-void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
+-void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
+-size_t ffi_raw_size (ffi_cif *cif);
++ void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
++ void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
++ size_t ffi_raw_size (ffi_cif *cif);
++#endif
+
+ /* This is analogous to the raw API, except it uses Java parameter */
+ /* packing, even on 64-bit machines. I.e. on 64-bit machines */
--- a/components/llvm/Makefile Thu Dec 15 01:35:04 2016 -0800
+++ b/components/llvm/Makefile Thu Dec 15 15:34:10 2016 -0800
@@ -369,8 +369,8 @@
LLVM_LIBEXECDIR_64 = /usr/libexec/$(MACH64)
LLVM_LIBEXECDIR = $(LLVM_LIBEXECDIR_$(BITS))
-LIBFFI_INCDIR_32 = $(shell pkg-config --cflags libffi | sed -e s,-I,,)
-LIBFFI_INCDIR_64 = $(shell env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH.64) pkg-config --cflags libffi | sed -e s,-I,,)
+LIBFFI_INCDIR_32 = $(shell pkg-config --cflags-only-I libffi | sed -e s,-I,,)
+LIBFFI_INCDIR_64 = $(shell env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH.64) pkg-config --cflags-only-I libffi | sed -e s,-I,,)
LIBFFI_INCDIR = $(LIBFFI_INCDIR_$(BITS))
LIBFFI_LIBDIR_32 = /usr/lib