* extra-lib.mk (object-suffixes-$(lib)): Add .oS when

$(lib)-static-only-routines is nonempty.
	(extra-objs, o-iterator.mk rule): Filter out .oS from generators.
	Add a special rule for .oS objects -> _nonshared.a library.
This commit is contained in:
Roland McGrath 2004-12-02 22:55:30 +00:00
parent b78ad5fd49
commit 3f488b9cdd
6 changed files with 55 additions and 25 deletions

View File

@ -1,3 +1,10 @@
2004-12-02 Roland McGrath <roland@redhat.com>
* extra-lib.mk (object-suffixes-$(lib)): Add .oS when
$(lib)-static-only-routines is nonempty.
(extra-objs, o-iterator.mk rule): Filter out .oS from generators.
Add a special rule for .oS objects -> _nonshared.a library.
2004-12-01 Jakub Jelinek <jakub@redhat.com> 2004-12-01 Jakub Jelinek <jakub@redhat.com>
* time/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC, * time/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,

View File

@ -11,6 +11,12 @@ extra-libs-left := $(filter-out $(lib),$(extra-libs-left))
object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes)) object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
ifneq (,$($(lib)-static-only-routines))
ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
endif
endif
ifneq (,$(object-suffixes-$(lib))) ifneq (,$(object-suffixes-$(lib)))
# Make sure these are simply-expanded variables before we append to them, # Make sure these are simply-expanded variables before we append to them,
@ -23,7 +29,7 @@ all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines)
# Add each flavor of library to the lists of things to build and install. # Add each flavor of library to the lists of things to build and install.
install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
extra-objs += $(foreach o,$(object-suffixes-$(lib):.os=),\ extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
$(patsubst %,%$o,$(filter-out \ $(patsubst %,%$o,$(filter-out \
$($(lib)-shared-only-routines),\ $($(lib)-shared-only-routines),\
$(all-$(lib)-routines)))) $(all-$(lib)-routines))))
@ -51,7 +57,7 @@ endif
# Use o-iterator.mk to generate a rule for each flavor of library. # Use o-iterator.mk to generate a rule for each flavor of library.
ifneq (,$(filter-out .os,$(object-suffixes-$(lib)))) ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
define o-iterator-doit define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(patsubst %,$(objpfx)%$o,\ $(patsubst %,$(objpfx)%$o,\
@ -59,13 +65,23 @@ $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(all-$(lib)-routines))); \ $(all-$(lib)-routines))); \
$$(build-extra-lib) $$(build-extra-lib)
endef endef
object-suffixes-left = $(object-suffixes-$(lib):.os=) object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-$(lib):.os=)) include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
endif endif
ifneq (,$(filter .os,$(object-suffixes-$(lib)))) ifneq (,$(filter .os,$(object-suffixes-$(lib))))
$(objpfx)$(patsubst %,$(libtype.os),$(lib:lib%=%)): \ $(objpfx)$(patsubst %,$(libtype.os),$(lib:lib%=%)): \
$(all-$(lib)-routines:%=$(objpfx)%.os) $(patsubst %,$(objpfx)%.os,\
$(filter-out $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
$(build-extra-lib)
endif
ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
$(patsubst %,$(objpfx)%.oS,\
$(filter $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
$(build-extra-lib) $(build-extra-lib)
endif endif

View File

@ -1,3 +1,16 @@
2004-12-02 Roland McGrath <roland@redhat.com>
* Makefile (libpthread-nonshared): Variable removed.
($(objpfx)libpthread_nonshared.a): Target removed.
($(inst_libdir)/libpthread_nonshared.a): Likewise.
These are now handled by generic magic from
libpthread-static-only-routines being set.
2004-11-04 Roland McGrath <roland@redhat.com>
* sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
[__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
2004-11-27 Ulrich Drepper <drepper@redhat.com> 2004-11-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO, * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,

View File

@ -63,8 +63,6 @@ omit-deps = $(unix-syscalls:%=ptw-%)
libpthread-shared-only-routines = pt-allocrtsig libpthread-shared-only-routines = pt-allocrtsig
libpthread-static-only-routines = pthread_atfork libpthread-static-only-routines = pthread_atfork
libpthread-nonshared = pthread_atfork
linuxthreads-CPPFLAGS = -DIS_IN_linuxthreads=1 linuxthreads-CPPFLAGS = -DIS_IN_linuxthreads=1
CFLAGS-pthread_atfork.c = -DNOT_IN_libc CFLAGS-pthread_atfork.c = -DNOT_IN_libc
@ -81,13 +79,6 @@ CFLAGS-tst-cancel.c = -fno-inline -fno-inline-functions
include ../Makeconfig include ../Makeconfig
ifeq ($(build-shared),yes)
others: $(objpfx)libpthread_nonshared.a
endif
$(objpfx)libpthread_nonshared.a: $(addprefix $(objpfx),$(addsuffix .os,$(libpthread-nonshared)))
$(AR) $(ARFLAGS) $@ $^
ifeq ($(build-shared),yes) ifeq ($(build-shared),yes)
# Set the `multidir' variable by grabbing the variable from the compiler. # Set the `multidir' variable by grabbing the variable from the compiler.
@ -180,8 +171,6 @@ $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
')' \ ')' \
) > $@.new ) > $@.new
mv -f $@.new $@ mv -f $@.new $@
$(inst_libdir)/libpthread_nonshared.a: $(objpfx)libpthread_nonshared.a
$(do-install)
extra-B-pthread.so = -B$(common-objpfx)linuxthreads/ extra-B-pthread.so = -B$(common-objpfx)linuxthreads/

View File

@ -1,3 +1,17 @@
2004-12-02 Roland McGrath <roland@redhat.com>
* Makefile (libpthread-nonshared): Variable removed.
($(objpfx)libpthread_nonshared.a): Target removed.
($(inst_libdir)/libpthread_nonshared.a): Likewise.
These are now handled by generic magic from
libpthread-static-only-routines being set.
2004-11-17 Roland McGrath <roland@redhat.com>
* sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
translating to the kernel clockid_t for our own process/thread clock.
2004-11-27 Ulrich Drepper <drepper@redhat.com> 2004-11-27 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO, * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,

View File

@ -125,8 +125,6 @@ libpthread-routines = init vars events version \
libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind
libpthread-static-only-routines = pthread_atfork libpthread-static-only-routines = pthread_atfork
libpthread-nonshared = pthread_atfork
CFLAGS-pthread_atfork.c = -DNOT_IN_libc CFLAGS-pthread_atfork.c = -DNOT_IN_libc
# Since cancellation handling is in large parts handled using exceptions # Since cancellation handling is in large parts handled using exceptions
@ -301,13 +299,8 @@ $(test-modules): $(objpfx)%.so: $(objpfx)%.os $(common-objpfx)shlib.lds
ifeq ($(build-shared),yes) ifeq ($(build-shared),yes)
# Build all the modules even when not actually running test programs. # Build all the modules even when not actually running test programs.
tests: $(test-modules) tests: $(test-modules)
others: $(objpfx)libpthread_nonshared.a
endif endif
$(objpfx)libpthread_nonshared.a: $(addprefix $(objpfx),$(addsuffix .os,$(libpthread-nonshared)))
$(AR) $(ARFLAGS) $@ $^
ifeq ($(build-shared),yes) ifeq ($(build-shared),yes)
# Set the `multidir' variable by grabbing the variable from the compiler. # Set the `multidir' variable by grabbing the variable from the compiler.
@ -378,8 +371,6 @@ $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
')' \ ')' \
) > $@.new ) > $@.new
mv -f $@.new $@ mv -f $@.new $@
$(inst_libdir)/libpthread_nonshared.a: $(objpfx)libpthread_nonshared.a
$(do-install)
endif endif