summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-08-09 05:57:05 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-08-09 05:57:05 +0000
commit680c018810e22008f4fdd4581542648c9fb89e9a (patch)
tree053ad7392c2ed8577ea07f910d35a750b18959ee /libc
parent3dfe29ec75a1adfe9f05e8437ff8b67f309d4acd (diff)
downloaduClibc-alpine-680c018810e22008f4fdd4581542648c9fb89e9a.tar.bz2
uClibc-alpine-680c018810e22008f4fdd4581542648c9fb89e9a.tar.xz
Finally, all of the makefiles that make the magic happen. These changes allow for uClibc to build for NPTL support without breaking the old linuxthreads model. Let the testing begin.
Diffstat (limited to 'libc')
-rw-r--r--libc/Makefile16
-rw-r--r--libc/sysdeps/linux/mips/Makefile19
2 files changed, 9 insertions, 26 deletions
diff --git a/libc/Makefile b/libc/Makefile
index b03596712..5f6b399ff 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -52,7 +52,7 @@ all: halfclean $(LIBNAME_TARGET) $(DO_SHARED)
# the wildcard will be evaluated when `make` is run instead of when the make
# target is evaluated. That means if you run `rm obj.* ; make`, the wildcard
# will evaluate to no files :(.
-$(LIBNAME) shared_$(LIBNAME) ar-target: subdirs
+$(LIBNAME) shared_$(LIBNAME) ar-target: subdirs objs-pthread-libc
$(RM) $(LIBNAME) shared_$(LIBNAME)
objs=`cat obj.*` ; \
$(AR) $(ARFLAGS) $(LIBNAME) $$objs && \
@@ -71,9 +71,7 @@ $(LIBNAME) shared_$(LIBNAME) ar-target: subdirs
done
cp $(LIBNAME) shared_$(LIBNAME)
$(AR) $(ARFLAGS) $(LIBNAME) misc/internals/static.o
-ifeq ($(PTHREADS_NATIVE),y)
- $(AR) d $(LIBNAME) libc-lowlevellock.os
-endif
+ $(AR) $(ARFLAGS) $(LIBNAME) `cat "$(PTCOBJST)"`
$(RANLIB) $(LIBNAME)
$(LIBNAME_TARGET): $(LIBNAME)
@@ -82,9 +80,7 @@ $(LIBNAME_TARGET): $(LIBNAME)
$(INSTALL) -m 644 $(LIBNAME) $(TOPDIR)lib
shared: shared_$(LIBNAME)
-ifeq ($(PTHREADS_NATIVE),y)
- $(AR) d shared_$(LIBNAME) libc-tls.o libc-lowlevellock.o
-endif
+ $(AR) $(ARFLAGS) shared_$(LIBNAME) `cat "$(PTCOBJSH)"`
$(LD) $(LDFLAGS) $(VERSION_SCRIPT) -soname=$(SHARED_MAJORNAME) -o $(SHARED_FULLNAME) \
--whole-archive shared_$(LIBNAME) \
$(TOPDIR)libc/misc/internals/interp.o --no-whole-archive \
@@ -106,7 +102,7 @@ tags:
clean: subdirs_clean halfclean
@$(RM) -r tmp
$(RM) include/asm include/linux include/bits
- $(RM) obj.*
+ $(RM) obj.* obj-*
subdirs: $(patsubst %, _dir_%, $(DIRS))
subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
@@ -117,4 +113,8 @@ $(patsubst %, _dir_%, $(DIRS)) : dummy
$(patsubst %, _dirclean_%, $(DIRS)) : dummy
$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
+objs-pthread-libc:
+ $(RM) $(PTCOBJST) $(PTCOBJSH)
+ $(MAKE) -C ../libpthread $@
+
.PHONY: dummy subdirs
diff --git a/libc/sysdeps/linux/mips/Makefile b/libc/sysdeps/linux/mips/Makefile
index 67524daac..bcfcb0b59 100644
--- a/libc/sysdeps/linux/mips/Makefile
+++ b/libc/sysdeps/linux/mips/Makefile
@@ -28,15 +28,9 @@ SSRC=bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S syscall.S pipe.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
CSRC=__longjmp.c brk.c setjmp_aux.c mmap.c __syscall_error.c \
- cacheflush.c pread_write.c sysmips.c _test_and_set.c #sigaction.c
+ cacheflush.c pread_write.c sysmips.c _test_and_set.c sigaction.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
-ifeq ($(PTHREADS_NATIVE),y)
-COBJS += $(PTDIR)sysdeps/$(TARGET_ARCH)/libc-tls.o \
- $(PTDIR)sysdeps/unix/sysv/linux/libc-lowlevellock.o \
- $(PTDIR)sysdeps/unix/sysv/linux/libc-lowlevellock.os
-endif
-
OBJS=$(SOBJS) $(COBJS)
OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH)
@@ -87,17 +81,6 @@ $(TOPDIR)lib/crtn.o:
$(AR) $(ARFLAGS) $(TOPDIR)lib/crtn.o
endif
-ifeq ($(PTHREADS_NATIVE),y)
-$(PTDIR)sysdeps/$(TARGET_ARCH)/libc-tls.o:
- $(MAKE) -C $(PTDIR)sysdeps/$(TARGET_ARCH) libc-tls.o
-
-$(PTDIR)sysdeps/unix/sysv/linux/libc-lowlevellock.o:
- $(MAKE) -C $(PTDIR)sysdeps/unix/sysv/linux libc-lowlevellock.o
-
-$(PTDIR)sysdeps/unix/sysv/linux/libc-lowlevellock.os:
- $(MAKE) -C $(PTDIR)sysdeps/unix/sysv/linux libc-lowlevellock.os
-endif
-
headers:
$(LN) -fs ../libc/sysdeps/linux/mips/sgidefs.h $(TOPDIR)/include/
# $(LN) -fs ../libc/sysdeps/linux/mips/regdef.h $(TOPDIR)/include/