summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-08-07 18:05:09 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2012-08-08 16:20:51 +0200
commit5bf72a2e33dc33bc2e2be076dd3732ee6c53c72f (patch)
treeb669d2f6a737819da256a35e50c7442834911290
parent8955614755b4f49974f779a5e9a7cb6a427cd9f2 (diff)
build: generate sym-file
When -Wl,--version-script is not available, we fallback to using libtool --export-symbols feature, but the needed sym-file is missing from git. This commit adds generation of the sym-file to the update-map-file Makefile target, and adds a sym-file to git. The linker on OSX Lion doesn't like to have non-existing symbols specified in the symbol files it's given, so the symbols need to be split in glib symbols and gtk symbols.
-rw-r--r--gtk/Makefile.am16
-rw-r--r--gtk/spice-glib-sym-file78
-rw-r--r--gtk/spice-gtk-sym-file23
3 files changed, 112 insertions, 5 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 785736d..344c028 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -55,9 +55,11 @@ lib_LTLIBRARIES += libspice-client-gtk-3.0.la
endif
if HAVE_LD_VERSION_SCRIPT
-VERSION_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
+GLIB_VERSION_LDFLAGS = -Wl,--version-script=${srcdir}/map-file
+GTK_VERSION_LD_FLAGS = $(GLIB_VERSION_LDFLAGS)
else
-VERSION_LDFLAGS = -export-symbols ${srcdir}/sym-file
+GLIB_VERSION_LDFLAGS = -export-symbols ${srcdir}/spice-glib-sym-file
+GTK_VERSION_LDFLAGS = -export-symbols ${srcdir}/spice-gtk-sym-file
endif
KEYMAP_GEN = $(srcdir)/keymap-gen.pl
@@ -99,7 +101,7 @@ AM_CPPFLAGS = \
SPICE_GTK_LDFLAGS_COMMON = \
-version-info 4:0:0 \
-no-undefined \
- $(VERSION_LDFLAGS) \
+ $(GTK_VERSION_LDFLAGS) \
$(NULL)
SPICE_GTK_LIBADD_COMMON = \
@@ -169,7 +171,7 @@ nodist_libspice_client_gtkinclude_HEADERS = \
libspice_client_glib_2_0_la_LDFLAGS = \
-version-info 8:0:0 \
-no-undefined \
- $(VERSION_LDFLAGS) \
+ $(GLIB_VERSION_LDFLAGS) \
$(NULL)
libspice_client_glib_2_0_la_LIBADD = \
@@ -637,12 +639,16 @@ typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif
-update-map-file:
+update-symbol-files:
( echo "SPICEGTK_1 {" ; \
echo "global:" ; \
ctags -f - --c-kinds=p $(libspice_client_gtkinclude_HEADERS) $(nodist_libspice_client_gtkinclude_HEADERS) $(libspice_client_glibinclude_HEADERS) $(nodist_libspice_client_glibinclude_HEADERS) | awk '/^spice_/ { print $$1 ";" }' | sort ; \
echo "local:" ; \
echo "*;" ; \
echo "};" ) > $(srcdir)/map-file
+ ( ctags -f - --c-kinds=p $(libspice_client_glibinclude_HEADERS) $(nodist_libspice_client_glibinclude_HEADERS) | awk '/^spice_/ { print $$1 }' | sort ; \
+ ) > $(srcdir)/spice-glib-sym-file
+ ( ctags -f - --c-kinds=p $(libspice_client_gtkinclude_HEADERS) $(nodist_libspice_client_gtkinclude_HEADERS) | awk '/^spice_/ { print $$1 }' | sort ; \
+ ) > $(srcdir)/spice-gtk-sym-file
-include $(top_srcdir)/git.mk
diff --git a/gtk/spice-glib-sym-file b/gtk/spice-glib-sym-file
new file mode 100644
index 0000000..2c7c33a
--- /dev/null
+++ b/gtk/spice-glib-sym-file
@@ -0,0 +1,78 @@
+spice_audio_get
+spice_audio_get_type
+spice_audio_new
+spice_channel_connect
+spice_channel_destroy
+spice_channel_disconnect
+spice_channel_event_get_type
+spice_channel_get_type
+spice_channel_new
+spice_channel_open_fd
+spice_channel_set_capability
+spice_channel_test_capability
+spice_channel_test_common_capability
+spice_channel_type_to_string
+spice_client_error_quark
+spice_cursor_channel_get_type
+spice_display_channel_get_type
+spice_display_get_primary
+spice_get_option_group
+spice_g_signal_connect_object
+spice_inputs_button_press
+spice_inputs_button_release
+spice_inputs_channel_get_type
+spice_inputs_key_press
+spice_inputs_key_release
+spice_inputs_lock_get_type
+spice_inputs_motion
+spice_inputs_position
+spice_inputs_set_key_locks
+spice_main_agent_test_capability
+spice_main_channel_get_type
+spice_main_clipboard_grab
+spice_main_clipboard_notify
+spice_main_clipboard_release
+spice_main_clipboard_request
+spice_main_clipboard_selection_grab
+spice_main_clipboard_selection_notify
+spice_main_clipboard_selection_release
+spice_main_clipboard_selection_request
+spice_main_send_monitor_config
+spice_main_set_display
+spice_main_set_display_enabled
+spice_playback_channel_get_type
+spice_playback_channel_set_delay
+spice_record_channel_get_type
+spice_record_send_data
+spice_session_connect
+spice_session_disconnect
+spice_session_get_channels
+spice_session_get_read_only
+spice_session_get_type
+spice_session_has_channel_type
+spice_session_migration_get_type
+spice_session_new
+spice_session_open_fd
+spice_session_verify_get_type
+spice_set_session_option
+spice_smartcard_channel_get_type
+spice_smartcard_manager_get
+spice_smartcard_manager_get_type
+spice_smartcard_manager_insert_card
+spice_smartcard_manager_remove_card
+spice_smartcard_reader_get_type
+spice_smartcard_reader_is_software
+spice_usb_device_get_description
+spice_usb_device_get_type
+spice_usb_device_manager_can_redirect_device
+spice_usb_device_manager_connect_device_async
+spice_usb_device_manager_connect_device_finish
+spice_usb_device_manager_disconnect_device
+spice_usb_device_manager_get
+spice_usb_device_manager_get_devices
+spice_usb_device_manager_get_type
+spice_usb_device_manager_is_device_connected
+spice_usbredir_channel_get_type
+spice_util_get_debug
+spice_util_get_version_string
+spice_util_set_debug
diff --git a/gtk/spice-gtk-sym-file b/gtk/spice-gtk-sym-file
new file mode 100644
index 0000000..1574e07
--- /dev/null
+++ b/gtk/spice-gtk-sym-file
@@ -0,0 +1,23 @@
+spice_display_copy_to_guest
+spice_display_get_grab_keys
+spice_display_get_pixbuf
+spice_display_get_type
+spice_display_key_event_get_type
+spice_display_mouse_ungrab
+spice_display_new
+spice_display_new_with_monitor
+spice_display_paste_from_guest
+spice_display_send_keys
+spice_display_set_grab_keys
+spice_grab_sequence_as_string
+spice_grab_sequence_copy
+spice_grab_sequence_free
+spice_grab_sequence_get_type
+spice_grab_sequence_new
+spice_grab_sequence_new_from_string
+spice_gtk_session_copy_to_guest
+spice_gtk_session_get
+spice_gtk_session_get_type
+spice_gtk_session_paste_from_guest
+spice_usb_device_widget_get_type
+spice_usb_device_widget_new