On Fri, 2012-11-02 at 16:04 -0400, Adam Jackson wrote:

> It looks like libffi is emitted into the minimal buildroot (rpm-build -> 
> pkg-config -> glib2 -> libffi), so during the transition we'll need to 
> build both sonames of libffi.  It might be worth keeping a compat-libffi 
> around for a release or two anyway, the current soname has a _long_ history.

Or just apply the patch from here:
http://lists.fedoraproject.org/pipermail/devel/2012-April/165871.html
And skip tons of pain for all the libffi consumers at the tiny cost of a
stub symbol.

Hm, no links to the patch in the archives.  Well, I'll attach it again,
since I still have it sitting around in my libffi git checkout.


>From ce7211733bd2d1748c3dcd3d3717850e28d4594d Mon Sep 17 00:00:00 2001
From: Colin Walters <walt...@verbum.org>
Date: Sat, 14 Apr 2012 10:03:59 -0400
Subject: [PATCH] Revert to previous ABI

Bumping the SONAME just to delete 3 symbols that no one called anyways
is quite simply not worth the pain, given how many low-level modules
consume libffi.

Just keep the symbols around as empty stubs.
---
 Makefile.am     |  6 +-----
 libtool-version |  2 +-
 src/debug.c     | 12 ++++++++++--
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8a32794..7829a36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -97,11 +97,7 @@ libffi_la_SOURCES = src/prep_cif.c src/types.c \
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libffi.pc
 
-nodist_libffi_la_SOURCES =
-
-if FFI_DEBUG
-nodist_libffi_la_SOURCES += src/debug.c
-endif
+nodist_libffi_la_SOURCES = src/debug.c
 
 if MIPS
 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
diff --git a/libtool-version b/libtool-version
index 95f48c5..b8b80e0 100644
--- a/libtool-version
+++ b/libtool-version
@@ -26,4 +26,4 @@
 #    release, then set age to 0.
 #
 # CURRENT:REVISION:AGE
-6:0:0
+5:10:0
diff --git a/src/debug.c b/src/debug.c
index 51dcfcf..ae42afd 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -27,33 +27,41 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-/* General debugging routines */
+/* General debugging routines; note these were accidentally
+ * made public, so we keep empty stubs in the case where
+ * we weren't compiled with FFI_DEBUG.
+ */
 
 void ffi_stop_here(void)
 {
+#ifdef FFI_DEBUG
   /* This function is only useful for debugging purposes.
      Place a breakpoint on ffi_stop_here to be notified of
      significant events. */
+#endif
 }
 
 /* This function should only be called via the FFI_ASSERT() macro */
 
 void ffi_assert(char *expr, char *file, int line)
 {
+#ifdef FFI_DEBUG
   fprintf(stderr, "ASSERTION FAILURE: %s at %s:%d\n", expr, file, line);
   ffi_stop_here();
   abort();
+#endif
 }
 
 /* Perform a sanity check on an ffi_type structure */
 
 void ffi_type_test(ffi_type *a, char *file, int line)
 {
+#ifdef FFI_DEBUG
   FFI_ASSERT_AT(a != NULL, file, line);
 
   FFI_ASSERT_AT(a->type <= FFI_TYPE_LAST, file, line);
   FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->size > 0, file, line);
   FFI_ASSERT_AT(a->type == FFI_TYPE_VOID || a->alignment > 0, file, line);
   FFI_ASSERT_AT(a->type != FFI_TYPE_STRUCT || a->elements != NULL, file, line);
-
+#endif
 }
-- 
1.7.11.7

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to