[libdispatch-dev] [PATCH 2/4] check whether to add -lm for testing to compile
Mario Schwalbe
schwalbe at inf.tu-dresden.de
Wed Nov 18 07:03:46 PST 2009
Hi,
Robert Watson schrieb:
> On Wed, 18 Nov 2009, Mario Schwalbe wrote:
>> Linux needs -lm in order to compile the testing directory due to fabs().
> Could you confirm that this doesn't create an unnecessary libm
> dependency for libdispatch itself?
No, it does create a superfluous dependency.
# ldd install/libdispatch-{gcc,llvm-gcc}/lib/libdispatch.so
install/libdispatch-gcc/lib/libdispatch.so:
linux-vdso.so.1 => (0x00007fff007ff000)
libkqueue.so => /home/mario/diplom/install/libkqueue/lib/libkqueue.so (0x00007f9f49893000)
libm.so.6 => /lib/libm.so.6 (0x00007f9f495e3000)
librt.so.1 => /lib/librt.so.1 (0x00007f9f493da000)
libc.so.6 => /lib/libc.so.6 (0x00007f9f4906b000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f9f48e4f000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9f49cb0000)
install/libdispatch-llvm-gcc/lib/libdispatch.so:
linux-vdso.so.1 => (0x00007fffcadff000)
libkqueue.so => /home/mario/diplom/install/libkqueue/lib/libkqueue.so (0x00007f6b3e72a000)
libm.so.6 => /lib/libm.so.6 (0x00007f6b3e47a000)
librt.so.1 => /lib/librt.so.1 (0x00007f6b3e271000)
libBlocksRuntime.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007f6b3df02000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f6b3dce5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6b3eb48000)
The patch should have been:
Index: configure.ac
===================================================================
--- configure.ac (Revision 171)
+++ configure.ac (Arbeitskopie)
@@ -138,6 +138,7 @@
#
AC_SEARCH_LIBS(clock_gettime, rt)
AC_SEARCH_LIBS(pthread_create, pthread)
+LT_LIB_M
#
# Prefer native kqueue(2); otherwise use libkqueue if present.
Index: testing/Makefile.am
===================================================================
--- testing/Makefile.am (Revision 171)
+++ testing/Makefile.am (Arbeitskopie)
@@ -33,6 +33,7 @@
dispatch_sema \
dispatch_timer_bit31 \
dispatch_timer_bit63
+dispatch_drift_LDFLAGS=$(LIBM)
endif
TESTS+=$(CBLOCKS_TESTS)
More information about the libdispatch-dev
mailing list