Re: disruptive libffi upgrade

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2012-04-13 at 20:58 -0400, Anthony Green wrote:
> Sorry folks -- thanks for untagging.  I'll ping the list again after May 9, as was suggested earlier in this thread.

Here's a lightly tested patch which implements my suggestion of keeping
the symbols as empty stubs.

Incidentally - keeping the generated autotools stuff in git makes
tracking down what *really* changed extremely painful.  It looks
like the ABI was bumped in ee6696fdf4768ba6dd037fb6dd99435afa13816e
but that commit has thousands of lines of generated code changes
too.  It'd be better to either:

1) Do "regenerate autotools" as a separate commit
2) Keep a separate git repository with generated stuff
3) Don't commit the generated files, have consumers install
   the autotools, and join the rest of the world

>From 25d69ed1bee13fbe040f8ca223a6ddc05940be59 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@xxxxxxxxxx>
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 4a855d7..0e9cabd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -96,11 +96,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.7.6

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux