svn commit: trunk/uClibc: extra/Configs libpthread/linuxthreads l etc...
aldot at uclibc.org
aldot at uclibc.org
Fri Oct 17 14:05:53 UTC 2008
Author: aldot
Date: 2008-10-17 07:05:53 -0700 (Fri, 17 Oct 2008)
New Revision: 23705
Log:
- fix toggling thread implementation.
Previously the old headers were left in include/ leading to spurious compile failures.
This is ugly as it can get (we resort to sneaking -L in for the moment) but
good enough for now. The worst thing which can happen is that we ln these
headers once per invocation of make, nothing more.
If some installation of make(1) complains about the "-L" then wrap it in
ifneq ($(findstring check-symlink,$(.FEATURES)),)
Modified:
trunk/uClibc/Makefile.in
trunk/uClibc/extra/Configs/Config.in
trunk/uClibc/libpthread/linuxthreads.old/Makefile.in
trunk/uClibc/libpthread/linuxthreads.old_db/Makefile.in
trunk/uClibc/libpthread/linuxthreads/Makefile.in
trunk/uClibc/libpthread/linuxthreads_db/Makefile.in
Changeset:
Modified: trunk/uClibc/Makefile.in
===================================================================
--- trunk/uClibc/Makefile.in 2008-10-17 14:03:56 UTC (rev 23704)
+++ trunk/uClibc/Makefile.in 2008-10-17 14:05:53 UTC (rev 23705)
@@ -61,6 +61,11 @@
$(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@
$(Q)$(MAKE) headers-y
+# The above doesn't work for threads, though. Just using check-symlinks for now.
+# XXX: FIXME: this is ugly
+MAKEFLAGS += -L
+include/config/linuxthreads/old.h include/config/linuxthreads/new.h:
+
# For the moment, we have to keep re-running this target
# because the fix includes scripts rely on pre-processers
# in order to generate the headers correctly :(. That
Modified: trunk/uClibc/extra/Configs/Config.in
===================================================================
--- trunk/uClibc/extra/Configs/Config.in 2008-10-17 14:03:56 UTC (rev 23704)
+++ trunk/uClibc/extra/Configs/Config.in 2008-10-17 14:05:53 UTC (rev 23705)
@@ -403,6 +403,10 @@
the latest code from glibc, so it may be the only choice for the
newer ports (like alpha/amd64/64bit arches and hppa).
+config LINUXTHREADS_NEW
+ def_bool y
+ depends on !LINUXTHREADS_OLD
+
config UCLIBC_HAS_SYSLOG
bool "Syslog support"
default y
Modified: trunk/uClibc/libpthread/linuxthreads/Makefile.in
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/Makefile.in 2008-10-17 14:03:56 UTC (rev 23704)
+++ trunk/uClibc/libpthread/linuxthreads/Makefile.in 2008-10-17 14:05:53 UTC (rev 23705)
@@ -81,9 +81,6 @@
lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so
-objclean-y += libpthread_clean
-headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers
-headers_clean-y += linuxthreads_headers_clean
#ifeq ($(DOMULTI),n)
$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc.depend) $(top_builddir)lib/libpthread_nonshared.a
@@ -124,13 +121,17 @@
$(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@
include/bits/pthreadtypes.h: | include/bits
$(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@
-linuxthreads_headers: include/pthread.h include/semaphore.h \
+
+linuxthreads_headers := include/pthread.h include/semaphore.h \
include/bits/pthreadtypes.h
+$(linuxthreads_headers): include/config/linuxthreads/old.h \
+ include/config/linuxthreads/new.h
+headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers)
+objclean-y += libpthread_clean
+headers_clean-y += linuxthreads_headers_clean
linuxthreads_headers_clean:
- $(RM) $(top_builddir)include/pthread.h \
- $(top_builddir)include/semaphore.h \
- $(top_builddir)include/bits/pthreadtypes.h
+ $(RM) $(addprefix $(top_builddir),$(linuxthreads_headers))
libpthread_clean:
$(RM) $(libpthread_OUT)/{,*/,*/*/,*/*/*/,*/*/*/*/}*.{o,os,oS,a}
Modified: trunk/uClibc/libpthread/linuxthreads.old/Makefile.in
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/Makefile.in 2008-10-17 14:03:56 UTC (rev 23704)
+++ trunk/uClibc/libpthread/linuxthreads.old/Makefile.in 2008-10-17 14:05:53 UTC (rev 23705)
@@ -71,9 +71,6 @@
lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so
-objclean-y += libpthread_clean
-headers-$(UCLIBC_HAS_THREADS) += linuxthreads_headers
-headers_clean-y += linuxthreads_headers_clean
#ifeq ($(DOMULTI),n)
$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a $(libc.depend)
@@ -111,13 +108,17 @@
$(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@
include/bits/pthreadtypes.h: | include/bits
$(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@
-linuxthreads_headers: include/pthread.h include/semaphore.h \
+
+linuxthreads_headers := include/pthread.h include/semaphore.h \
include/bits/pthreadtypes.h
+$(linuxthreads_headers): include/config/linuxthreads/old.h \
+ include/config/linuxthreads/new.h
+headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers)
+objclean-y += libpthread_clean
+headers_clean-y += linuxthreads_headers_clean
linuxthreads_headers_clean:
- $(RM) $(top_builddir)include/pthread.h \
- $(top_builddir)include/semaphore.h \
- $(top_builddir)include/bits/pthreadtypes.h
+ $(RM) $(addprefix $(top_builddir),$(linuxthreads_headers))
libpthread_clean:
$(RM) $(libpthread_OUT)/*.{o,os,oS,a}
Modified: trunk/uClibc/libpthread/linuxthreads.old_db/Makefile.in
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old_db/Makefile.in 2008-10-17 14:03:56 UTC (rev 23704)
+++ trunk/uClibc/libpthread/linuxthreads.old_db/Makefile.in 2008-10-17 14:05:53 UTC (rev 23705)
@@ -33,9 +33,6 @@
lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
-objclean-y += libthread_db_clean
-headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
-headers_clean-y += linuxthreads_db_headers_clean
#ifeq ($(DOMULTI),n)
ifeq ($(DOPIC),y)
@@ -62,9 +59,17 @@
$(Q)$(RM) $@
$(do_ar)
-linuxthreads_db_headers:
- $(Q)$(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
+include/thread_db.h:
+ $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@
+linuxthreads_db_headers := include/thread_db.h
+$(linuxthreads_db_headers): include/config/linuxthreads/old.h \
+ include/config/linuxthreads/new.h
+headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
+
+objclean-y += libthread_db_clean
+headers_clean-y += linuxthreads_db_headers_clean
+
linuxthreads_db_headers_clean:
$(RM) $(top_builddir)include/thread_db.h
Modified: trunk/uClibc/libpthread/linuxthreads_db/Makefile.in
===================================================================
--- trunk/uClibc/libpthread/linuxthreads_db/Makefile.in 2008-10-17 14:03:56 UTC (rev 23704)
+++ trunk/uClibc/libpthread/linuxthreads_db/Makefile.in 2008-10-17 14:05:53 UTC (rev 23705)
@@ -33,9 +33,6 @@
lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
-objclean-y += libthread_db_clean
-headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
-headers_clean-y += linuxthreads_db_headers_clean
#ifeq ($(DOMULTI),n)
ifeq ($(DOPIC),y)
@@ -62,9 +59,17 @@
$(Q)$(RM) $@
$(do_ar)
-linuxthreads_db_headers:
- $(Q)$(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
+include/thread_db.h:
+ $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@
+linuxthreads_db_headers := include/thread_db.h
+$(linuxthreads_db_headers): include/config/linuxthreads/old.h \
+ include/config/linuxthreads/new.h
+headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers)
+
+objclean-y += libthread_db_clean
+headers_clean-y += linuxthreads_db_headers_clean
+
linuxthreads_db_headers_clean:
$(RM) $(top_builddir)include/thread_db.h
More information about the uClibc-cvs
mailing list