diff options
Diffstat (limited to 'libpthread/nptl/sysdeps')
-rw-r--r-- | libpthread/nptl/sysdeps/alpha/tls.h | 2 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/i386/tls.h | 1 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/mips/Makefile | 89 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/mips/tls.h | 21 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/powerpc/tls.h | 2 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/Makefile | 113 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/sh/tls.h | 2 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/sparc/tls.h | 1 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/Makefile | 123 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c | 1 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile | 113 |
11 files changed, 38 insertions, 430 deletions
diff --git a/libpthread/nptl/sysdeps/alpha/tls.h b/libpthread/nptl/sysdeps/alpha/tls.h index fa3c832a6..99cd27a03 100644 --- a/libpthread/nptl/sysdeps/alpha/tls.h +++ b/libpthread/nptl/sysdeps/alpha/tls.h @@ -20,8 +20,6 @@ #ifndef _TLS_H #define _TLS_H 1 -# include <dl-sysdep.h> - #ifndef __ASSEMBLER__ # include <stdbool.h> # include <stddef.h> diff --git a/libpthread/nptl/sysdeps/i386/tls.h b/libpthread/nptl/sysdeps/i386/tls.h index 65566ff7a..ac6084879 100644 --- a/libpthread/nptl/sysdeps/i386/tls.h +++ b/libpthread/nptl/sysdeps/i386/tls.h @@ -20,7 +20,6 @@ #ifndef _TLS_H #define _TLS_H 1 -#include <dl-sysdep.h> #ifndef __ASSEMBLER__ # include <stdbool.h> # include <stddef.h> diff --git a/libpthread/nptl/sysdeps/mips/Makefile b/libpthread/nptl/sysdeps/mips/Makefile index 851d3b841..6371d2871 100644 --- a/libpthread/nptl/sysdeps/mips/Makefile +++ b/libpthread/nptl/sysdeps/mips/Makefile @@ -1,84 +1,13 @@ -# Makefile for uClibc NPTL pthread library (MIPS) +# Makefile for uClibc NPTL # -# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com> +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU Library General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) any -# later version. +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -# details. -# -# You should have received a copy of the GNU Library General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# Makefile for uClibc - -TOPDIR=../../../../ -include $(TOPDIR)Rules.mak -include ../../Rules.mak - -CFLAGS-dl-support.c = -D_GNU_SOURCE - -AR_LIBP_AOBJS = $(patsubst %.S, %.o, $(wildcard *.S)) -SO_LIBP_AOBJS = $(patsubst %.S, %.os, $(wildcard *.S)) -AR_LIBP_COBJS = $(patsubst %.c, %.o, pt-raise.c) -SO_LIBP_COBJS = $(patsubst %.c, %.os, pt-raise.c) - -AR_LIBC_COBJS = $(patsubst %.c, %.o, dl-support.c dl-tls.c libc-tls.c) - -all: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) - -$(AR_LIB_NAME): $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment \ - $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment \ - $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) - -$(AR_SO_LIB_NAME): $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment \ - $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment \ - $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_SO_LIB_NAME) $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) - -obj.pthread.ar: $(AR_LIBC_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(AR_LIBC_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(AR_LIBC_COBJS) -endif - @for objfile in $(AR_LIBC_COBJS); do \ - echo ../libpthread/nptl/sysdeps/mips/$$objfile >> \ - $(TOPDIR)libc/$@; \ - done - -$(AR_LIBP_AOBJS): %.o : %.S - $(CC) $(ASFLAGS-NPTL) -c $< -o $@ - -$(SO_LIBP_AOBJS): %.os : %.S - $(CC) $(ASFLAGS-NPTL) -DSHARED -c $< -o $@ - -$(AR_LIBP_COBJS): %.o : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -c $< -o $@ - -$(SO_LIBP_COBJS): %.os : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -DSHARED -c $< -o $@ - -$(AR_LIBC_COBJS): %.o : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -c $< -o $@ - -clean: - $(RM) *.o *.os *~ core -.PHONY: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) +top_srcdir=../../../../ +top_builddir=../../../../ +all: objs +include $(top_builddir)Rules.mak +include Makefile.arch +include $(top_srcdir)Makerules diff --git a/libpthread/nptl/sysdeps/mips/tls.h b/libpthread/nptl/sysdeps/mips/tls.h index 2a9dde161..cb0021f3f 100644 --- a/libpthread/nptl/sysdeps/mips/tls.h +++ b/libpthread/nptl/sysdeps/mips/tls.h @@ -20,8 +20,6 @@ #ifndef _TLS_H #define _TLS_H 1 -#include <dl-sysdep.h> - #ifndef __ASSEMBLER__ # include <stdbool.h> # include <stddef.h> @@ -55,21 +53,10 @@ typedef union dtv .set pop #endif /* __ASSEMBLER__ */ - /* We require TLS support in the tools. */ -/* - * NPTL - These defines would normally be handled by the top-level - * configure script in glibc. - */ -#ifdef __UCLIBC__ #define HAVE_TLS_SUPPORT 1 #define HAVE_TLS_MODEL_ATTRIBUTE 1 #define HAVE___THREAD 1 -#endif - -#ifndef HAVE_TLS_SUPPORT -# error "TLS support is required." -#endif /* Signal that TLS support is available. */ #define USE_TLS 1 @@ -83,12 +70,8 @@ typedef union dtv # define TLS_DTV_AT_TP 1 /* Get the thread descriptor definition. */ -#ifdef __UCLIBC__ -# include <libc-symbols.h> -# include <../../descr.h> -#else -# include <nptl/descr.h> -#endif +#include <libc-symbols.h> +#include <../../descr.h> typedef struct { diff --git a/libpthread/nptl/sysdeps/powerpc/tls.h b/libpthread/nptl/sysdeps/powerpc/tls.h index b2322b09b..1157116a3 100644 --- a/libpthread/nptl/sysdeps/powerpc/tls.h +++ b/libpthread/nptl/sysdeps/powerpc/tls.h @@ -20,8 +20,6 @@ #ifndef _TLS_H #define _TLS_H 1 -# include <dl-sysdep.h> - #ifndef __ASSEMBLER__ # include <stdbool.h> # include <stddef.h> diff --git a/libpthread/nptl/sysdeps/pthread/Makefile b/libpthread/nptl/sysdeps/pthread/Makefile index 0f03668e1..a30ded527 100644 --- a/libpthread/nptl/sysdeps/pthread/Makefile +++ b/libpthread/nptl/sysdeps/pthread/Makefile @@ -1,108 +1,13 @@ -# Makefile for uClibc NPTL pthread library (pthread) +# Makefile for uClibc NPTL # -# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com> +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU Library General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) any -# later version. +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -# details. -# -# You should have received a copy of the GNU Library General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# Makefile for uClibc - -TOPDIR=../../../../ -include $(TOPDIR)Rules.mak -include ../../Rules.mak - -# -# NOTE: glibc puts flockfile.c, ftrylockfile.c, funlockfile.c, and -# pt-longjmp.c in libc and libpthread. For uClibc, they are -# in libc only. -# -CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c pthread_cond_signal.c \ - pthread_cond_timedwait.c pthread_cond_wait.c pthread_getcpuclockid.c \ - pthread_once.c pthread_rwlock_rdlock.c pthread_rwlock_timedrdlock.c \ - pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c \ - pthread_rwlock_wrlock.c pthread_sigmask.c pthread_spin_destroy.c \ - pthread_spin_init.c pthread_spin_unlock.c sigaction.c \ - sigfillset.c sigprocmask.c unwind-forcedunwind.c - -CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE -CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE -CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE -CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE -CFLAGS-sigaction.c = -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH) \ - -I$(TOPDIR)libc/signal -CFLAGS-sigfillset.c = -I$(TOPDIR)libc/sysdeps/linux/$(TARGET_ARCH) \ - -I$(TOPDIR)libc/signal -CFLAGS-sigprocmask.c = -I$(TOPDIR)libc/sysdeps/linux/common - -AR_LIBP_COBJS = $(patsubst %.c, %.o, $(CSRC)) -SO_LIBP_COBJS = $(patsubst %.c, %.os, $(CSRC)) - -ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) -all: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) crti.o crtn.o -else -all: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) -endif - -$(AR_LIB_NAME): $(AR_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(AR_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(AR_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(AR_LIBP_COBJS) - -$(AR_SO_LIB_NAME): $(SO_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(SO_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(SO_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_SO_LIB_NAME) $(SO_LIBP_COBJS) - -$(AR_LIBP_COBJS): %.o : %.c - $(CC) $(CFLAGS-LIBP) $(CFLAGS-$<) -c $< -o $@ - -$(SO_LIBP_COBJS): %.os : %.c - $(CC) $(CFLAGS-LIBP) $(CFLAGS-$<) -DSHARED -c $< -o $@ - -pt-initfini.s: pt-initfini.c - $(CC) -S $(CFLAGS-LIBP) -g0 -fPIC -fno-inline-functions \ - $(call check_gcc,-fno-unit-at-a-time,) \ - -finhibit-size-directive \ - $(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,)) \ - $< -o $@ - -crti.S: pt-initfini.s - sed -n -e '1,/@HEADER_ENDS/p' \ - -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \ - -e '/@TRAILER_BEGINS/,$$p' $< > $@ - -crtn.S: pt-initfini.s - sed -n -e '1,/@HEADER_ENDS/p' \ - -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \ - -e '/@TRAILER_BEGINS/,$$p' $< > $@ - -defs.h: pt-initfini.s defs.awk - sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ - awk -f defs.awk > $@ - -crti.o: crti.S defs.h - $(CC) -g0 $(ASFLAGS-LIBC) -c $< -o $@ - -crtn.o: crtn.S defs.h - $(CC) -g0 $(ASFLAGS-LIBC) -c $< -o $@ - -clean: - $(RM) *.o *.os *.s crt* *~ core defs.h -.PHONY: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) +top_srcdir=../../../../ +top_builddir=../../../../ +all: objs +include $(top_builddir)Rules.mak +include Makefile.in +include $(top_srcdir)Makerules diff --git a/libpthread/nptl/sysdeps/sh/tls.h b/libpthread/nptl/sysdeps/sh/tls.h index e883bae99..cf9827a2a 100644 --- a/libpthread/nptl/sysdeps/sh/tls.h +++ b/libpthread/nptl/sysdeps/sh/tls.h @@ -20,8 +20,6 @@ #ifndef _TLS_H #define _TLS_H -# include <dl-sysdep.h> - #ifndef __ASSEMBLER__ # include <stdbool.h> # include <stddef.h> diff --git a/libpthread/nptl/sysdeps/sparc/tls.h b/libpthread/nptl/sysdeps/sparc/tls.h index ddc484855..ea26ed32f 100644 --- a/libpthread/nptl/sysdeps/sparc/tls.h +++ b/libpthread/nptl/sysdeps/sparc/tls.h @@ -20,7 +20,6 @@ #ifndef _TLS_H #define _TLS_H -#include <dl-sysdep.h> #ifndef __ASSEMBLER__ # include <stdbool.h> # include <stddef.h> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile index 43f4bb409..34d647527 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile @@ -1,118 +1,13 @@ -# Makefile for uClibc NPTL pthread library (Linux files) +# Makefile for uClibc NPTL # -# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com> +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU Library General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) any -# later version. +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -# details. -# -# You should have received a copy of the GNU Library General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# Makefile for uClibc - -TOPDIR=../../../../../../ -include $(TOPDIR)Rules.mak -include ../../../../Rules.mak - -AR_LIBP_CSRC = pt-raise.c pthread_attr_getaffinity.c \ - pthread_attr_setaffinity.c pthread_getaffinity.c \ - pthread_getcpuclockid.c pthread_kill.c \ - pthread_mutex_cond_lock.c pthread_setaffinity.c \ - pthread_yield.c sem_post.c sem_timedwait.c \ - sem_trywait.c sem_wait.c pt-fork.c -SO_LIBP_CSRC = $(AR_LIBP_CSRC) -AR_LIBC_CSRC = libc_pthread_init.c libc_multiple_threads.c \ - register-atfork.c unregister-atfork.c -SO_LIBC_CSRC = $(AR_LIBC_CSRC) - -ifeq ($(strip $(TARGET_ARCH)),alpha) -AR_LIBC_CSRC += libc-lowlevellock.c -AR_LIBP_CSRC += lowlevellock.c -endif -ifeq ($(strip $(TARGET_ARCH)),mips) -AR_LIBC_CSRC += libc-lowlevellock.c -AR_LIBP_CSRC += lowlevellock.c -endif -ifeq ($(strip $(TARGET_ARCH)),powerpc) -AR_LIBC_CSRC += libc-lowlevellock.c -AR_LIBP_CSRC += lowlevellock.c -endif -ifeq ($(strip $(TARGET_ARCH)),sparc) -AR_LIBC_CSRC += libc-lowlevellock.c -AR_LIBP_CSRC += lowlevellock.c -endif - -# -# Needed to get pthread types. -# -CFLAGS-pt-fork.c = -D_GNU_SOURCE -CFLAGS-pthread_getcpuclockid.c = -I$(TOPDIR)/librt - -AR_LIBP_COBJS = $(patsubst %.c, %.o, $(AR_LIBP_CSRC)) -SO_LIBP_COBJS = $(patsubst %.c, %.os, $(SO_LIBP_CSRC)) -AR_LIBC_COBJS = $(patsubst %.c, %.o, $(AR_LIBC_CSRC)) -SO_LIBC_COBJS = $(patsubst %.c, %.os, $(SO_LIBC_CSRC)) - -all: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) - -$(AR_LIB_NAME): $(AR_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(AR_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(AR_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(AR_LIBP_COBJS) - -$(AR_SO_LIB_NAME): $(SO_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(SO_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(SO_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_SO_LIB_NAME) $(SO_LIBP_COBJS) - -obj.pthread.ar: $(AR_LIBC_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(AR_LIBC_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(AR_LIBC_COBJS) -endif - @for objfile in $(AR_LIBC_COBJS); do \ - echo ../libpthread/nptl/sysdeps/unix/sysv/linux/$$objfile >> \ - $(TOPDIR)libc/$@; \ - done - -obj.pthread.so: $(SO_LIBC_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(SO_LIBC_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(SO_LIBC_COBJS) -endif - @for objfile in $(SO_LIBC_COBJS); do \ - echo ../libpthread/nptl/sysdeps/unix/sysv/linux/$$objfile >> \ - $(TOPDIR)libc/$@; \ - done - -$(AR_LIBP_COBJS): %.o : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -c $< -o $@ - -$(SO_LIBP_COBJS): %.os : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -DSHARED -c $< -o $@ - -$(AR_LIBC_COBJS): %.o : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -c $< -o $@ - -$(SO_LIBC_COBJS): %.os : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -DSHARED -c $< -o $@ - -clean: - $(RM) *.o *.os *~ core -.PHONY: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) +top_srcdir=../../../../../../ +top_builddir=../../../../../../ +all: objs +include $(top_builddir)Rules.mak +include Makefile.in +include $(top_srcdir)Makerules diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c index 3d1c02181..cf5150341 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c @@ -20,7 +20,6 @@ #include <unistd.h> #include <list.h> #include "fork.h" -#include <dl-sysdep.h> #include <tls.h> #include <string.h> #include <pthreadP.h> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile index 084708397..43a6fad84 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile @@ -1,108 +1,13 @@ -# Makefile for uClibc NPTL pthread library (Linux/MIPS) +# Makefile for uClibc NPTL # -# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com> +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> # -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU Library General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) any -# later version. +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -# details. -# -# You should have received a copy of the GNU Library General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# Makefile for uClibc - -TOPDIR=../../../../../../../ -include $(TOPDIR)Rules.mak -include ../../../../../Rules.mak - -#AR_LIBP_ASRC = pt-vfork.S clone.S -AR_LIBP_ASRC = pt-vfork.S -SO_LIBP_ASRC = $(AR_LIBP_ASRC) -AR_LIBP_CSRC = pthread_once.c -SO_LIBP_CSRC = $(AR_LIBP_CSRC) -AR_LIBC_CSRC = fork-nptl.c -SO_LIBC_CSRC = $(AR_LIBC_CSRC) - -AR_LIBP_AOBJS = $(patsubst %.S, %.o, $(AR_LIBP_ASRC)) -SO_LIBP_AOBJS = $(patsubst %.S, %.os, $(SO_LIBP_ASRC)) -AR_LIBP_COBJS = $(patsubst %.c, %.o, $(AR_LIBP_CSRC)) -SO_LIBP_COBJS = $(patsubst %.c, %.os, $(SO_LIBP_CSRC)) -AR_LIBC_COBJS = $(patsubst %.c, %.o, $(AR_LIBC_CSRC)) -SO_LIBC_COBJS = $(patsubst %.c, %.os, $(SO_LIBC_CSRC)) - -ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) -CFLAGS-fork-nptl.c = -D__USE_STDIO_FUTEXES__ -endif - -all: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) - -$(AR_LIB_NAME): $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment \ - $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment \ - $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_LIB_NAME) $(AR_LIBP_AOBJS) $(AR_LIBP_COBJS) - -$(AR_SO_LIB_NAME): $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment \ - $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment \ - $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) -endif - $(AR) $(ARFLAGS) $(AR_SO_LIB_NAME) $(SO_LIBP_AOBJS) $(SO_LIBP_COBJS) - -obj.pthread.ar: $(AR_LIBC_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(AR_LIBC_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(AR_LIBC_COBJS) -endif - @for objfile in $(AR_LIBC_COBJS); do \ - echo ../libpthread/nptl/sysdeps/unix/sysv/linux/mips/$$objfile \ - >> $(TOPDIR)libc/$@; \ - done - -obj.pthread.so: $(SO_LIBC_COBJS) -ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y) - $(STRIPTOOL) -X --strip-debug -R .note -R .comment $(SO_LIBC_COBJS) -else - $(STRIPTOOL) -x -R .note -R .comment $(SO_LIBC_COBJS) -endif - @for objfile in $(SO_LIBC_COBJS); do \ - echo ../libpthread/nptl/sysdeps/unix/sysv/linux/mips/$$objfile \ - >> $(TOPDIR)libc/$@; \ - done - -$(AR_LIBP_AOBJS): %.o : %.S - $(CC) $(ASFLAGS-LIBP) -c $< -o $@ - -$(SO_LIBP_AOBJS): %.os : %.S - $(CC) $(ASFLAGS-LIBP) -DSHARED -c $< -o $@ - -$(AR_LIBP_COBJS): %.o : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -c $< -o $@ - -$(SO_LIBP_COBJS): %.os : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBP) -DSHARED -c $< -o $@ - -$(AR_LIBC_COBJS): %.o : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -c $< -o $@ - -$(SO_LIBC_COBJS): %.os : %.c - $(CC) $(CFLAGS-$<) $(CFLAGS-LIBC) -DSHARED -c $< -o $@ - -clean: - $(RM) *.o *.os *~ core -.PHONY: $(AR_LIB_NAME) $(AR_SO_LIB_NAME) +top_srcdir=../../../../../../../ +top_builddir=../../../../../../../ +all: objs +include $(top_builddir)Rules.mak +include Makefile.arch +include $(top_srcdir)Makerules |