From 44f4788c96a3a05c75739c655e4aeb09ffedfedf Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Thu, 6 Aug 2009 01:00:51 +0300 Subject: [PATCH] Fix ordering and missing $(DBUS_TEST_LIBS) for LDFLAGS -Wl,--as-needed compability. Need to pass -lrt before dbus-convenience.a to avoid undefined references of e.g. clock_gettime. http://bugs.freedesktop.org/show_bug.cgi?id=23162. --- dbus/Makefile.am | 3 ++- test/name-test/Makefile.am | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dbus/Makefile.am b/dbus/Makefile.am index e966a43..f92cbda 100644 --- a/dbus/Makefile.am +++ b/dbus/Makefile.am @@ -176,6 +176,7 @@ libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS) libdbus_1_la_LDFLAGS= -export-symbols-regex "^[^_].*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@ libdbus_convenience_la_LDFLAGS=@R_DYNAMIC_LDFLAG@ +libdbus_convenience_la_LIBADD=$(DBUS_TEST_LIBS) ## note that TESTS has special meaning (stuff to use in make check) ## so if adding tests not to be run in make check, don't add them to @@ -194,7 +195,7 @@ noinst_PROGRAMS=$(TESTS) dbus_test_SOURCES= \ dbus-test-main.c -dbus_test_LDADD=libdbus-convenience.la $(DBUS_TEST_LIBS) +dbus_test_LDADD=$(DBUS_TEST_LIBS) libdbus-convenience.la dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ ## mop up the gcov files diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am index 1c73b87..dc1a598 100644 --- a/test/name-test/Makefile.am +++ b/test/name-test/Makefile.am @@ -21,52 +21,52 @@ noinst_PROGRAMS=test-names test-pending-call-dispatch test-pending-call-timeout test_names_SOURCES= \ test-names.c -test_names_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_names_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_pending_call_dispatch_SOURCES = \ test-pending-call-dispatch.c -test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_pending_call_dispatch_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la test_pending_call_dispatch_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_pending_call_timeout_SOURCES = \ test-pending-call-timeout.c -test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_pending_call_timeout_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la test_pending_call_timeout_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_threads_init_SOURCES = \ test-threads-init.c -test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_threads_init_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la test_threads_init_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_ids_SOURCES = \ test-ids.c -test_ids_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_TEST_LIBS) +test_ids_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la test_ids_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_shutdown_SOURCES = \ test-shutdown.c test_shutdown_CFLAGS= -test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_shutdown_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la test_shutdown_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_privserver_SOURCES = \ test-privserver.c test_privserver_CFLAGS= -test_privserver_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_privserver_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la test_privserver_LDFLAGS=@R_DYNAMIC_LDFLAG@ test_privserver_client_SOURCES = \ test-privserver-client.c test_privserver_client_CFLAGS= -test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la $(DBUS_TEST_LIBS) +test_privserver_client_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la ../libdbus-testutils.la test_privserver_client_LDFLAGS=@R_DYNAMIC_LDFLAG@ endif -- 1.6.4