diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-22 05:15:47 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2005-07-22 05:15:47 +0000 |
| commit | eb6ed4fe445d1d604a6deab019d547f78540127e (patch) | |
| tree | 18c7330002ea33abdc97c8b95678ac518d81b708 /libpthread | |
| parent | 1dfbbd5f31e77a66e8c8b6f9e40e16277eb9f39d (diff) | |
| download | uClibc-alpine-eb6ed4fe445d1d604a6deab019d547f78540127e.tar.bz2 uClibc-alpine-eb6ed4fe445d1d604a6deab019d547f78540127e.tar.xz | |
Massive clean up of makefiles with a focus on being able to compile correctly
both thread library models. Items of interest are the 'Rules.mak' changes at
the top level as well as the new 'Rules.mak' for the NPTL library.
Diffstat (limited to 'libpthread')
| -rw-r--r-- | libpthread/Makefile | 16 | ||||
| -rw-r--r-- | libpthread/linuxthreads/Makefile | 1 | ||||
| -rw-r--r-- | libpthread/linuxthreads_db/Makefile | 1 | ||||
| -rw-r--r-- | libpthread/nptl/Rules.mak | 13 |
4 files changed, 28 insertions, 3 deletions
diff --git a/libpthread/Makefile b/libpthread/Makefile index abf9317d1..2d689edcc 100644 --- a/libpthread/Makefile +++ b/libpthread/Makefile @@ -18,10 +18,16 @@ TOPDIR=../ include $(TOPDIR)Rules.mak +ifeq ($(strip $(PTHREADS_NATIVE)),y) +include nptl/Rules.mak +endif CFLAGS+=$(SSP_ALL_CFLAGS) -#Adjust the soname version to avoid namespace collisions with glibc's libpthread +# +# Adjust the soname version to avoid namespace collisions with glibc's +# libpthread library. +# LIBPTHREAD=libpthread.a LIBPTHREAD_SHARED=libpthread.so LIBPTHREAD_SHARED_FULLNAME=libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so @@ -95,11 +101,19 @@ $(OBJ): Makefile shared: all ifeq ($(strip $(UCLIBC_HAS_THREADS)),y) +ifeq ($(strip $(PTHREADS_NATIVE)),y) + $(LD) $(LDFLAGS_THREAD) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \ + -o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD_SHARED_ARCHIVE) \ + --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \ + -L$(TOPDIR)lib -lc -ldl $(LDADD_LIBFLOAT) $(LIBGCC) \ + $(SHARED_END_FILES) +else $(LD) $(LDFLAGS_THREAD) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \ -o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD) \ --no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \ -L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC) \ $(SHARED_END_FILES) +endif $(INSTALL) -d $(TOPDIR)lib $(RM) $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) \ $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) diff --git a/libpthread/linuxthreads/Makefile b/libpthread/linuxthreads/Makefile index 5752bf98c..2929544ed 100644 --- a/libpthread/linuxthreads/Makefile +++ b/libpthread/linuxthreads/Makefile @@ -38,7 +38,6 @@ CFLAGS :=$(CFLAGS:-O0=-O1) # set up system dependencies include dirs (NOTE: order matters!) -PTDIR = $(TOPDIR)libpthread/linuxthreads/ SYSDEPINC = -I$(PTDIR)sysdeps/pthread \ -I$(PTDIR)sysdeps/$(TARGET_ARCH) \ -I$(PTDIR)sysdeps \ diff --git a/libpthread/linuxthreads_db/Makefile b/libpthread/linuxthreads_db/Makefile index 656275fa9..d10e3131b 100644 --- a/libpthread/linuxthreads_db/Makefile +++ b/libpthread/linuxthreads_db/Makefile @@ -29,7 +29,6 @@ SYSDEPS_DIR:=$(TARGET_ARCH) endif # set up system dependencies include dirs (NOTE: order matters!) -PTDIR = $(TOPDIR)libpthread/linuxthreads/ SYSDEPINC = -I$(PTDIR)sysdeps/unix/sysv/linux \ -I$(PTDIR)sysdeps/pthread \ -I$(PTDIR)sysdeps/unix/sysv \ diff --git a/libpthread/nptl/Rules.mak b/libpthread/nptl/Rules.mak new file mode 100644 index 000000000..c3970d235 --- /dev/null +++ b/libpthread/nptl/Rules.mak @@ -0,0 +1,13 @@ +# +# These names are used for NPTL since we have to build seperate archives +# for the static and shared objects. We export them to sub-makes. +# +LIBPTHREAD_STATIC_ARCHIVE := libpthread.a +LIBPTHREAD_SHARED_ARCHIVE := libpthread-shared.a + +CFLAGS-NPTL := $(CFLAGS:-O0=-O2) \ + -I$(PTDIR) \ + -I$(TOPDIR)ldso/include \ + -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -std=gnu99 + +ASFLAGS-NPTL := $(filter-out -std=gnu99, $(CFLAGS-NPTL)) -D__ASSEMBLER__ |
