svn commit: trunk/uClibc: libc/inet libc/inet/rpc libc/misc/inter etc...

sjhill at uclibc.org sjhill at uclibc.org
Tue Oct 4 00:29:16 UTC 2005


Author: sjhill
Date: 2005-10-03 17:29:14 -0700 (Mon, 03 Oct 2005)
New Revision: 11741

Log:
Clean up pthread include mess. Some of these will be needed to support NPTL, but they do no harm for the linuxthreads case. Yes, I tested this.


Modified:
   trunk/uClibc/Makefile
   trunk/uClibc/Rules.mak
   trunk/uClibc/libc/inet/Makefile
   trunk/uClibc/libc/inet/rpc/Makefile
   trunk/uClibc/libc/misc/internals/Makefile
   trunk/uClibc/libc/misc/pthread/Makefile
   trunk/uClibc/libc/misc/syslog/Makefile
   trunk/uClibc/libc/stdio/Makefile
   trunk/uClibc/libc/stdlib/malloc-standard/Makefile
   trunk/uClibc/libpthread/linuxthreads/Makefile
   trunk/uClibc/libpthread/linuxthreads_db/Makefile


Changeset:
Modified: trunk/uClibc/Makefile
===================================================================
--- trunk/uClibc/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -353,6 +353,7 @@
 	$(RM) include/fpu_control.h
 	$(MAKE) -C extra/locale clean
 	$(MAKE) -C ldso clean
+	$(MAKE) -C libc clean
 	$(MAKE) -C libpthread clean
 	$(MAKE) -C test clean
 	$(MAKE) -C utils clean

Modified: trunk/uClibc/Rules.mak
===================================================================
--- trunk/uClibc/Rules.mak	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/Rules.mak	2005-10-04 00:29:14 UTC (rev 11741)
@@ -303,6 +303,13 @@
     LDFLAGS := $(LDFLAGS_NOSTRIP) -s
 endif
 
+ifeq ($(UCLIBC_HAS_THREADS),y)
+# set up system dependencies include dirs (NOTE: order matters!)
+PTDIR   := $(TOPDIR)libpthread/linuxthreads/
+PTINC   := -I$(PTDIR)sysdeps/pthread \
+           -I$(PTDIR)sysdeps/$(TARGET_ARCH)
+endif
+
 ifeq ($(UCLIBC_BUILD_RELRO),y)
 LDFLAGS+=-z relro
 endif

Modified: trunk/uClibc/libc/inet/Makefile
===================================================================
--- trunk/uClibc/libc/inet/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/inet/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -56,6 +56,10 @@
 
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
 OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS)
 
 OBJ_LIST=../obj.inet

Modified: trunk/uClibc/libc/inet/rpc/Makefile
===================================================================
--- trunk/uClibc/libc/inet/rpc/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/inet/rpc/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -23,7 +23,6 @@
 
 TOPDIR=../../../
 include $(TOPDIR)Rules.mak
-CFLAGS+=-I$(TOPDIR)libpthread/linuxthreads/sysdeps/pthread
 
 ifeq ($(strip $(UCLIBC_HAS_FULL_RPC)),y)
 CSRC :=auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
@@ -58,7 +57,7 @@
 	echo $(patsubst %, inet/rpc/%, $(OBJS)) > $(OBJ_LIST)
 
 $(COBJS): %.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) $(PTINC) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:

Modified: trunk/uClibc/libc/misc/internals/Makefile
===================================================================
--- trunk/uClibc/libc/misc/internals/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/misc/internals/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -31,6 +31,10 @@
 
 OBJS=$(COBJS)
 
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
 OBJ_LIST=../../obj.misc.internals
 
 all: $(OBJ_LIST) interp.o static.o

Modified: trunk/uClibc/libc/misc/pthread/Makefile
===================================================================
--- trunk/uClibc/libc/misc/pthread/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/misc/pthread/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -19,16 +19,6 @@
 TOPDIR=../../../
 include $(TOPDIR)Rules.mak
 
-PTDIR = $(TOPDIR)libpthread/linuxthreads/
-SYSDEPINC = -I$(PTDIR)sysdeps/unix/sysv/linux \
-            -I$(PTDIR)sysdeps/pthread \
-            -I$(PTDIR)sysdeps/unix/sysv \
-            -I$(PTDIR)sysdeps/unix/unix \
-            -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
-            -I$(PTDIR)sysdeps \
-            -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
-CFLAGS += $(SYSDEPINC) -D_GNU_SOURCE
-
 CSRC=no-tsd.c weaks.c
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 OBJS=$(COBJS)
@@ -41,7 +31,7 @@
 	echo $(patsubst %, misc/pthread/%, $(OBJS)) > $(OBJ_LIST)
 
 $(COBJS): %.o : %.c
-	$(CC) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) $(PTINC) -c $< -o $@
 	$(STRIPTOOL) -x -R .note -R .comment $*.o
 
 clean:

Modified: trunk/uClibc/libc/misc/syslog/Makefile
===================================================================
--- trunk/uClibc/libc/misc/syslog/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/misc/syslog/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -28,6 +28,10 @@
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 OBJS=$(COBJS)
 
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
 OBJ_LIST=../../obj.misc.syslog
 
 all: $(OBJ_LIST)

Modified: trunk/uClibc/libc/stdio/Makefile
===================================================================
--- trunk/uClibc/libc/stdio/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/stdio/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -116,6 +116,10 @@
 OBJS += $(CLOBJS)
 endif
 
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
 OBJ_LIST=../obj.stdio
 
 all: $(OBJ_LIST)

Modified: trunk/uClibc/libc/stdlib/malloc-standard/Makefile
===================================================================
--- trunk/uClibc/libc/stdlib/malloc-standard/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libc/stdlib/malloc-standard/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -32,9 +32,15 @@
 # calloc.c can be found at uClibc/libc/stdlib/calloc.c
 # valloc.c can be found at uClibc/libc/stdlib/valloc.c
 CSRC=malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
+
 COBJS=$(patsubst %.c,%.o, $(CSRC))
+
 OBJS=$(COBJS)
 
+ifeq ($(UCLIBC_HAS_THREADS),y)
+CFLAGS += $(PTINC)
+endif
+
 OBJ_LIST=../../obj.stdlib.malloc-standard
 
 all: $(OBJ_LIST)

Modified: trunk/uClibc/libpthread/linuxthreads/Makefile
===================================================================
--- trunk/uClibc/libpthread/linuxthreads/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libpthread/linuxthreads/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -22,17 +22,11 @@
 
 CFLAGS+=$(SSP_ALL_CFLAGS)
 
-#This stuff will not compile without at least -O1
+# This stuff will not compile without at least -O1
 CFLAGS :=$(CFLAGS:-O0=-O1)
 
-# set up system dependencies include dirs (NOTE: order matters!)
-# psm: don't think that the last include makes sense
-# they all should be already linked to $(TOPDIR)include
-PTDIR = $(TOPDIR)libpthread/linuxthreads/
-SYSDEPINC = -I$(PTDIR)sysdeps/pthread \
-            -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
-            -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
-CFLAGS += $(SYSDEPINC)
+# Get the thread include dependencies
+CFLAGS += $(PTINC)
 
 ARCH_CFLAGS = $(CFLAGS)
 

Modified: trunk/uClibc/libpthread/linuxthreads_db/Makefile
===================================================================
--- trunk/uClibc/libpthread/linuxthreads_db/Makefile	2005-10-04 00:13:51 UTC (rev 11740)
+++ trunk/uClibc/libpthread/linuxthreads_db/Makefile	2005-10-04 00:29:14 UTC (rev 11741)
@@ -26,14 +26,9 @@
 SO_LIB_NAME=$(TOPDIR)lib/$(LIB_NAME).so
 SO_FULL_NAME=$(LIB_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
 
-# set up system dependencies include dirs (NOTE: order matters!)
-PTDIR = $(TOPDIR)libpthread/linuxthreads/
-SYSDEPINC = -I$(PTDIR)sysdeps/pthread \
-            -I$(PTDIR)sysdeps/$(TARGET_ARCH) \
-            -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH)
+# Get the thread include dependencies and shared object name
+CFLAGS += $(PTINC) -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
 
-CFLAGS += $(SYSDEPINC) -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-
 # Remove any -z defs since this lib will have undefined symbols
 LDFLAGS := $(subst -z defs,,$(LDFLAGS)) --warn-unresolved-symbols
 




More information about the uClibc-cvs mailing list