Hi, Just some rant below.
On Fri, Apr 23, 2010 at 07:31:55AM -0700, Austin Foxley wrote: > >commit: >http://git.uclibc.org/uClibc/commit/?id=a202cf6f119f41532b60ad28bc48746b535fd34c >branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master > > * clock_getcpuclockid, clock_gettime, clock_nanosleep, mq_receive, > mq_send, mq_timedreceive, mq_timedsend, _SC_MONOTONIC_CLOCK > >Signed-off-by: Austin Foxley <[email protected]> >--- > librt/Makefile.in | 31 ++++- >diff --git a/librt/Makefile.in b/librt/Makefile.in >index aaa1918..ea1d03e 100644 >--- a/librt/Makefile.in >+++ b/librt/Makefile.in >@@ -9,7 +9,12 @@ subdirs += librt > > CFLAGS-librt := -DNOT_IN_libc -DIS_IN_librt $(SSP_ALL_CFLAGS) > >-LDFLAGS-librt.so := $(LDFLAGS) $(call link.asneeded,-lc) removing this was a bad idea. >+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) >+LDFLAGS-librt.so := $(LDFLAGS) $(top_builddir)lib/libdl.so \ >+ $(top_builddir)lib/libpthread.so >+else >+LDFLAGS-librt.so := $(LDFLAGS) >+endif > > LIBS-librt.so := $(LIBS) wrong. libs are to be placed in LIBS. If you do that properly, you suddently don't have to put pthread symbols (prominent example being pthread_atfork()) into librt. > >@@ -19,22 +24,36 @@ librt_DIR := $(top_srcdir)librt > librt_OUT := $(top_builddir)librt > > ifeq ($(UCLIBC_HAS_REALTIME),y) >-librt_SRC := $(wildcard $(librt_DIR)/*.c) >-librt_OBJ := $(patsubst $(librt_DIR)/%.c,$(librt_OUT)/%.o,$(librt_SRC)) >+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) >+librt_CSRC := $(filter-out mq_notify.c timer_create.c timer_delete.c \ >+ timer_getoverr.c timer_gettime.c timer_settime.c, \ >+ $(notdir $(wildcard $(librt_DIR)/*.c))) This is inadequate in several ways: 1) librt_CSRC-$(CONFIG_KNOB) is shorter, easier to read and overall better. 2) make(1) has $(filter-out) that you should have used to filter out the objects that may have come from another source, impl agnostic. >+librt_SSRC := $(wildcard $(librt_DIR)/*.S) >+librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_CSRC)) >+librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC)) >+else >+librt_SRC := $(filter-out clock_nanosleep.c clock_getcpuclockid.c >clock_gettime.c, \ >+ $(notdir $(wildcard $(librt_DIR)/*.c))) >+librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC)) >+endif ditto. I'm taking care of these. _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
