Re: glib 2.2.3/2.3.2 binary incompatibility



On 2004.03.04 11:34 Tor Lillqvist wrote:

Still, just for cleanliness, it's probably a good idea to filter out
the incorrectly exported entries from gobject's import libraries (the
gcc and MS ones).

[snip suggested patch]

I enclose an updated patch which sets PRIVATE and triggers on this.
It also uses autoconf to find a prefixed dlltool and egrep.

Cheers,

Ali.
# $Product: glib $ $Id$

diff -Naurd ../cvs/glib/configure.in ./configure.in
--- ../cvs/glib/configure.in	Fri Mar  5 19:08:27 2004
+++ ./configure.in	Fri Mar  5 23:34:09 2004
@@ -161,6 +161,8 @@
 
 if test "$glib_native_win32" = "yes"; then
   AC_CHECK_PROG(ms_librarian, [lib.exe], [yes], [no])
+  AC_CHECK_TOOL(DLLTOOL, dlltool, :)
+  AC_SUBST(DLLTOOL)
 fi
 AM_CONDITIONAL(MS_LIB_AVAILABLE, [test x$ms_librarian = xyes])
 
@@ -241,6 +243,7 @@
 
 AM_PROG_CC_STDC
 AC_PROG_INSTALL
+AC_PROG_EGREP
 
 AC_SYS_LARGEFILE
 
diff -Naurd ../cvs/glib/gobject/Makefile.am ./gobject/Makefile.am
--- ../cvs/glib/gobject/Makefile.am	Fri Sep 12 21:33:31 2003
+++ ./gobject/Makefile.am	Fri Mar  5 23:37:14 2004
@@ -38,9 +38,15 @@
 if OS_WIN32
 export_symbols = -export-symbols $(srcdir)/gobject.def
 
-install-libtool-import-lib:
-	$(INSTALL) .libs/libgobject-2.0.dll.a $(DESTDIR)$(libdir)
-	$(INSTALL) $(srcdir)/gobject.def $(DESTDIR)$(libdir)/gobject-2.0.def
+# Acrobatics to remove incorrectly exported entries from the import library
+# (Can't remove from DLL as that would break ABI.)
+
+libgobject-filtered-2.0.dll.a: gobject.filtered.def
+	@DLLTOOL@ --input-def gobject.filtered.def --output-lib libgobject-filtered-2.0.dll.a
+
+install-libtool-import-lib: libgobject-filtered-2.0.dll.a gobject.filtered.def
+	$(INSTALL) libgobject-filtered-2.0.dll.a $(DESTDIR)$(libdir)/libgobject-2.0.dll.a
+	$(INSTALL) gobject.filtered.def $(DESTDIR)$(libdir)/gobject-2.0.def
 
 uninstall-libtool-import-lib:
 	-rm $(DESTDIR)$(libdir)/libgobject-2.0.dll.a $(DESTDIR)$(libdir)/gobject-2.0.def
@@ -213,8 +219,11 @@
 	$(top_srcdir)/build/win32/lt-compile-resource gobject.rc $@
 endif
 
-gobject-2.0.lib: libgobject-2.0.la gobject.def
-	lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.def -out:$@
+gobject.filtered.def: gobject.def
+	@EGREP@ -v '\<PRIVATE\>' <gobject.def >$@
+
+gobject-2.0.lib: libgobject-2.0.la gobject.filtered.def
+	lib -name:libgobject-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:gobject.filtered.def -out:$@
 
 dist-hook: $(BUILT_EXTRA_DIST)
 	files='$(BUILT_EXTRA_DIST)'; \
diff -Naurd ../cvs/glib/gobject/gobject.def ./gobject/gobject.def
--- ../cvs/glib/gobject/gobject.def	Fri Mar  5 19:08:29 2004
+++ ./gobject/gobject.def	Fri Mar  5 23:34:56 2004
@@ -173,7 +173,7 @@
 	g_signal_stop_emission
 	g_signal_stop_emission_by_name
 	g_signal_type_cclosure_new
-	g_slist_remove_all
+	g_slist_remove_all PRIVATE
 	g_source_set_closure
 	g_strdup_value_contents
 	g_strv_get_type
@@ -244,7 +244,7 @@
 	g_type_set_qdata
 	g_type_test_flags
 	g_type_value_table_peek
-	g_unichar_validate
+	g_unichar_validate PRIVATE
 	g_value_array_append
 	g_value_array_copy
 	g_value_array_free


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