Permalink
Switch branches/tags
aj/revert-sunrpc aj/shared-linux-fcntl allan/config-files andros/avx512f-mem andros/libmvec andros/pr19654 archlinux/2.18/master azanella/bz12683 carlos/dlmopen carlos/master cmetcalf/tile-2.15 cvs/fedora-2_3-branch cvs/fedora-2_5-branch cvs/fedora-branch cvs/glibc-2-1-branch cvs/glibc-2-2-branch cvs/glibc-2_0_x cvs/glibc-2_3-branch cvs/glibc-2_5-branch cvs/glibc-2_6-branch cvs/glibc-2_7-branch cvs/glibc-2_8-branch cvs/glibc-2_9-branch cvs/glibc-2_10-branch cvs/master cvs/sparc-2_0_x-branch cvs/thomas-posix1996 davem/sparc dj/malloc fedora/master fedora/2.10/master fedora/2.11/master fedora/2.12/master fedora/2.13/master fedora/2.14/master fedora/2.22/master fw/extend_alloca gentoo/2.18 gentoo/2.19 gentoo/2.20 gentoo/2.21 gentoo/2.22 gentoo/2.23 hjl/avx128 hjl/avx512f-mem/master hjl/avx512f-mem/old hjl/avx512f-mem/prefetcht1 hjl/cpuid/master hjl/cpuid/2.21 hjl/cpuid/2.22 hjl/ctor/release/2.11 hjl/ctor/release/2.12 hjl/erms/i386 hjl/erms/ifunc hjl/erms/master hjl/erms/nt hjl/erms/2.22 hjl/erms/2.23 hjl/fma/master hjl/global hjl/gold hjl/i386/master hjl/i486/multiarch-old hjl/i486/multiarch hjl/implies hjl/init hjl/ld.so/master hjl/memcpy/dpdk/master hjl/mempcpy hjl/plt/master hjl/plt/2.21 hjl/plt/2.22 hjl/pr13862 hjl/pr14370 hjl/pr14562/master hjl/pr14562/2.16 hjl/pr14654 hjl/pr14716 hjl/pr14831 hjl/pr14937 hjl/pr14941 hjl/pr14955 hjl/pr14995 hjl/pr17711/2.18 hjl/pr17711/2.19 hjl/pr17711/2.20 hjl/pr17711/2.21 hjl/pr17841/master hjl/pr17841/2.21 hjl/pr18078 hjl/pr18422 hjl/pr18661 hjl/pr18696 hjl/pr18858/master hjl/pr19122 hjl/pr19178/master hjl/pr19363/clobber hjl/pr19363/master hjl/pr19363/2.22 hjl/pr19371/master hjl/pr19463 hjl/pr19583 hjl/pr19590 hjl/pr19679/2.23 hjl/pr19776/master hjl/pthread/2.21 hjl/pthread/2.22 hjl/release/2.20/master hjl/secondary/master hjl/secondary/2.21 hjl/size/master hjl/tst-plt hjl/unaligned hjl/x32/master hjl/x32/release/2.12 hjl/x32/release/2.15 hjl/x86 hjl/32bit/master hjl/32bit/2.22 ibm/master ibm/2.8/master ibm/2.10/master ibm/2.11/master ibm/2.12/master ibm/2.13/master ibm/2.16/master ibm/2.18/master ibm/2.19/master ibm/2.20/master ibm/2.22/master ldmitrie/intel_mpx linaro/master lxoliva/getaddrinfo master neleai/string-x64 neleai/strlen origin/ibm/2.8/master pasky/fixes-overdue pasky/fixes release/2.10/master release/2.11/master release/2.12/master release/2.13/master release/2.14/master release/2.15/master release/2.16/master release/2.17/master release/2.18/master release/2.19/master release/2.20/master release/2.21/master release/2.22/master release/2.23/master roland/Wshadow roland/add-on-abi-tags roland/backtrace-syms roland/cancelhandling roland/disable-nis roland/getpid roland/gold-vs-libc roland/hwcap_mask roland/manual-check roland/nacl-debug-hack roland/nacl-exit-stacks roland/nacl-port/master roland/nptl_db roland/pthread_attr_getstack roland/stat64 roland/sysconf-clocks roland/tempname roland/x86_64-crt1-cfi rsa/hwcap2_v3 rsa/hwcap2_v4 rsa/hwcap2_v5 rsa/hwcap2_v6 rsa/power8_partial rsa/power8 rsa/stdint_headers rsa/stdint_noheaders rsa/stdint rsa/2.17_backports_v2 rsa/2.17_backports_v3 rsa/2.17_backports rth/aa-memset rth/aa-opt rth/execl rth/tramp siddhesh/is_in_module siddhesh/mmap-fallback siddhesh/posix-wundef siddhesh/sem_timedwait siddhesh/tunables tuliom/multilib
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
108 lines (91 sloc) 3.71 KB
# This file is included several times in a row, once
# for each element of $(extra-libs). $(extra-libs-left)
# is initialized first to $(extra-libs) so that with each
# inclusion, we advance $(lib) to the next library name (e.g. libfoo).
# The variable $($(lib)-routines) defines the list of modules
# to be included in that library. A sysdep Makefile can add to
# $(lib)-sysdep_routines to include additional modules.
lib := $(firstword $(extra-libs-left))
extra-libs-left := $(filter-out $(lib),$(extra-libs-left))
object-suffixes-$(lib) := $(filter-out $($(lib)-inhibit-o),$(object-suffixes))
ifneq (,$($(lib)-static-only-routines))
ifneq (,$(filter yes%,$(build-shared)$($(lib).so-version)))
object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
endif
endif
ifneq (,$(object-suffixes-$(lib)))
# Make sure these are simply-expanded variables before we append to them,
# since we want the expressions we append to be expanded right now.
install-lib := $(install-lib)
extra-objs := $(extra-objs)
# The modules that go in $(lib).
all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines)
# 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)))
extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
$(patsubst %,%$o,$(filter-out \
$($(lib)-shared-only-routines),\
$(all-$(lib)-routines))))
ifneq (,$(filter .os,$(object-suffixes-$(lib))))
extra-objs += $(patsubst %,%.os,$(filter-out $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
endif
ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
extra-objs += $(patsubst %,%.oS,$(filter $($(lib)-static-only-routines),\
$(all-$(lib)-routines)))
endif
alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
$(objpfx)$(patsubst %,$(libtype$o),\
$(lib:lib%=%)))
ifeq (,$(filter $(lib),$(extra-libs-others)))
lib-noranlib: $(alltypes-$(lib))
ifeq (yes,$(build-shared))
lib-noranlib: $(objpfx)$(lib).so$($(lib).so-version)
endif
else
others: $(alltypes-$(lib))
endif
# The linked shared library is never a dependent of lib-noranlib,
# because linking it will depend on libc.so already being built.
ifneq (,$(filter .os,$(object-suffixes-$(lib))))
others: $(objpfx)$(lib).so$($(lib).so-version)
endif
# Use o-iterator.mk to generate a rule for each flavor of library.
ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(patsubst %,$(objpfx)%$o,\
$(filter-out $($(lib)-shared-only-routines),\
$(all-$(lib)-routines))); \
$$(build-extra-lib)
endef
object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
endif
ifneq (,$(filter .os,$(object-suffixes-$(lib))))
$(objpfx)$(patsubst %,$(libtype.os),$(lib:lib%=%)): \
$(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)
endif
ifeq ($(build-shared),yes)
# Add the version script to the dependencies of the shared library.
$(objpfx)$(lib).so: $(firstword $($(lib)-map) \
$(addprefix $(common-objpfx), \
$(filter $(lib).map, \
$(version-maps))))
endif
endif
# This will define `libof-ROUTINE := LIB' for each of the routines.
cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
ifneq (,$(cpp-srcs-left))
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
endif