From patchwork Thu Aug 21 10:57:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 381906 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3B704140081 for ; Thu, 21 Aug 2014 20:58:29 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=AqCc7X77C3mV62HB860bqjiwfMBsn3Q pJsQYLBzJ9Fm0+g12x27aJIMOA9aC7itH6xtyx8RoJET2DA1tt2JKvTW7weLSpMJ /2oh0Pnab2Yjb2ImwbREoaW/A9jJXGZGRwWFxGNbagQmPrmK/W/7jj3ZkYQtNj17 r9S9D54WJta0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=X9RF89JqEhrAJ/OCCp0kvWvDT0o=; b=WKx5+ /42KR1RtsCpafn5km3mQ1ua3I8TVgO4EnOIPP3Ko9LXesELWXVrrtnwYUNUMpDF2 yS8mhGkhzGwA+99sBRK4QCL0VP40UQzm+qDHsshWLETK7VKSU0cIBdZ+d1jEu62M pRaFHub1EBNkSpX2T46hhvdt6fosA60ta+qSVs= Received: (qmail 16187 invoked by alias); 21 Aug 2014 10:58:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 16043 invoked by uid 89); 21 Aug 2014 10:58:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_50, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Cc: Siddhesh Poyarekar Subject: [PATCH 01/19] Add new macro IN_MODULE to identify module in which source is built Date: Thu, 21 Aug 2014 16:27:25 +0530 Message-Id: <1408618663-2281-2-git-send-email-siddhesh@redhat.com> In-Reply-To: <1408618663-2281-1-git-send-email-siddhesh@redhat.com> References: <1408618663-2281-1-git-send-email-siddhesh@redhat.com> The current scheme to identify which module a translation unit is built in depends on defining multiple macros IS_IN_* and also defining NOT_IN_libc if we're building a non-libc module. In addition, there is an IN_LIB macro that does effectively the same thing, but for different modules (notably the systemtap probes). This macro scheme unifies both ideas to use just one macro IN_MODULE and assign it a value depending on the module it is being built into. If the module is not defined, it defaults to MODULE_libc. Patches that follow will remove uses of IS_IN_* variables with the IS_IN() macro. libc-symbols.h has been converted already to give an example of how such a transition will look. Verified that there are no relevant source changes. One source change that will crop up repeatedly is that of nscd_stat, since it uses the build timestamp as a constant in its logic. * Makeconfig (in-module): Get value of libof set for the translation unit. (module-def): Set IN_MODULE based on value of libof-*. (CPPFLAGS): Add $(module-def) to CPPFLAGS. * Makerules: Don't suffix routine names for nonlib. * include/libc-modules.h: New file. * include/libc-symbols.h: Include libc-modules.h (IS_IN): New macro to replace IS_IN_* macros. * crypt/Makefile: Set libof-* for each routine. * debug/Makefile: Likewise. * dlfcn/Makefile: Likewise. * elf/Makefile: Likewise. * elf/rtld-Rules: Likewise. * extra-modules.mk: Likewise. * hesiod/Makefile: Likewise. * iconv/Makefile: Likewise. * iconvdata/Makefile: Likewise. * libidn/Makefile: Likewise. * locale/Makefile: Likewise. * login/Makefile: Likewise. * mach/Machrules: Likewise. * malloc/Makefile: Likewise. * math/Makefile: Likewise. * nis/Makefile: Likewise. * nptl/Makefile: Likewise. * nptl_db/Makefile: Likewise. * nss/Makefile: Likewise. * resolv/Makefile: Likewise. * rt/Makefile: Likewise. * stdlib/Makefile: Likewise. * sunrpc/Makefile: Likewise. * sysdeps/gnu/Makefile: Likewise. * sysdeps/ieee754/ldbl-opt/Makefile: Likewise. * sysdeps/unix/sysv/linux/Makefile: Likewise. * sysdeps/s390/s390-64/Makefile: Likewise. * nscd/Makefile: Set libof-* for each routine. Set CFLAGS and CPPFLAGS for nscd instead of nonlib. --- Makeconfig | 7 ++++++- Makerules | 2 +- crypt/Makefile | 5 +++++ debug/Makefile | 10 ++++++++++ dlfcn/Makefile | 5 +++++ elf/Makefile | 7 ++++++- elf/rtld-Rules | 5 +++++ extra-modules.mk | 1 + hesiod/Makefile | 5 +++++ iconv/Makefile | 11 ++++++----- iconvdata/Makefile | 6 ++++++ include/libc-modules.h | 37 +++++++++++++++++++++++++++++++++++++ include/libc-symbols.h | 24 ++++++++++++++---------- libidn/Makefile | 5 +++++ locale/Makefile | 13 +++++++++---- login/Makefile | 4 ++++ mach/Machrules | 5 +++++ malloc/Makefile | 9 +++++++++ math/Makefile | 4 ++++ nis/Makefile | 12 ++++++++++++ nptl/Makefile | 5 +++++ nptl_db/Makefile | 4 ++++ nscd/Makefile | 13 ++++++------- nss/Makefile | 13 ++++++++++++- resolv/Makefile | 8 ++++++++ rt/Makefile | 4 ++++ stdlib/Makefile | 1 + sunrpc/Makefile | 4 ++++ sysdeps/gnu/Makefile | 2 ++ sysdeps/ieee754/ldbl-opt/Makefile | 4 ++++ sysdeps/s390/s390-64/Makefile | 4 ++++ sysdeps/unix/sysv/linux/Makefile | 1 + 32 files changed, 210 insertions(+), 30 deletions(-) create mode 100644 include/libc-modules.h diff --git a/Makeconfig b/Makeconfig index cef0f06..5c6de39 100644 --- a/Makeconfig +++ b/Makeconfig @@ -813,6 +813,11 @@ endif # $(+cflags) == "" # of many little headers in the include directory. libio-include = -I$(..)libio +in-module = $(strip $(foreach lib,$(libof-$(basename $(@F))) $(libof-$( $@; \ diff --git a/include/libc-modules.h b/include/libc-modules.h new file mode 100644 index 0000000..d12fb90 --- /dev/null +++ b/include/libc-modules.h @@ -0,0 +1,37 @@ +#define MODULE_libc 1 +#define MODULE_libpthread 2 +#define MODULE_rtld 3 +#define MODULE_libdl 4 +#define MODULE_libm 5 +#define MODULE_iconvprogs 6 +#define MODULE_iconvdata 7 +#define MODULE_lddlibc4 8 +#define MODULE_locale_programs 9 +#define MODULE_memusagestat 10 +#define MODULE_libutil 12 +#define MODULE_libBrokenLocale 13 +#define MODULE_libmemusage 15 +#define MODULE_libresolv 16 +#define MODULE_libnss_db 17 +#define MODULE_libnss_files 18 +#define MODULE_libnss_dns 19 +#define MODULE_libnss_compat 20 +#define MODULE_libnss_hesiod 21 +#define MODULE_libnss_nis 22 +#define MODULE_libnss_nisplus 23 +#define MODULE_libanl 24 +#define MODULE_librt 25 +#define MODULE_libSegFault 26 +#define MODULE_libthread_db 27 +#define MODULE_libcidn 28 +#define MODULE_libcrypt 29 +#define MODULE_libnsl 30 +#define MODULE_libpcprofile 31 +#define MODULE_librpcsvc 32 +#define MODULE_nscd 33 +#define MODULE_ldconfig 34 +#define MODULE_libnldbl 35 + +/* Catch-all for test modules and other binaries. */ +#define MODULE_nonlib 98 +#define MODULE_extramodules 99 diff --git a/include/libc-symbols.h b/include/libc-symbols.h index d4ab1f3..131d7eb 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -20,6 +20,10 @@ #ifndef _LIBC_SYMBOLS_H #define _LIBC_SYMBOLS_H 1 +#include "libc-modules.h" + +#define IS_IN(lib) (IN_MODULE == MODULE_##lib) + /* This file's macros are included implicitly in the compilation of every file in the C library by -imacros. @@ -468,7 +472,7 @@ for linking") If the function should be internal to multiple objects, say ld.so and libc.so, the best way is to use: - #if !defined NOT_IN_libc || defined IS_IN_rtld + #if IS_IN (libc) || IS_IN (rtld) hidden_proto (foo) #endif @@ -584,7 +588,7 @@ for linking") # define libc_hidden_data_ver(local, name) #endif -#ifdef IS_IN_rtld +#if IS_IN (rtld) # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define rtld_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) # define rtld_hidden_def(name) hidden_def (name) @@ -604,7 +608,7 @@ for linking") # define rtld_hidden_data_ver(local, name) #endif -#ifdef IS_IN_libm +#if IS_IN (libm) # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libm_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) # define libm_hidden_def(name) hidden_def (name) @@ -624,7 +628,7 @@ for linking") # define libm_hidden_data_ver(local, name) #endif -#ifdef IS_IN_libresolv +#if IS_IN (libresolv) # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libresolv_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -645,7 +649,7 @@ for linking") # define libresolv_hidden_data_ver(local, name) #endif -#ifdef IS_IN_librt +#if IS_IN (librt) # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define librt_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -666,7 +670,7 @@ for linking") # define librt_hidden_data_ver(local, name) #endif -#ifdef IS_IN_libdl +#if IS_IN (libdl) # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libdl_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -687,7 +691,7 @@ for linking") # define libdl_hidden_data_ver(local, name) #endif -#ifdef IS_IN_libnss_files +#if IS_IN (libnss_files) # define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libnss_files_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -708,7 +712,7 @@ for linking") # define libnss_files_hidden_data_ver(local, name) #endif -#ifdef IS_IN_libnsl +#if IS_IN (libnsl) # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libnsl_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -729,7 +733,7 @@ for linking") # define libnsl_hidden_data_ver(local, name) #endif -#ifdef IS_IN_libnss_nisplus +#if IS_IN (libnss_nisplus) # define libnss_nisplus_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libnss_nisplus_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -758,7 +762,7 @@ for linking") # define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name) #endif -#ifdef IS_IN_libutil +#if IS_IN (libutil) # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libutil_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) diff --git a/libidn/Makefile b/libidn/Makefile index a40f08e..3c07838 100644 --- a/libidn/Makefile +++ b/libidn/Makefile @@ -32,3 +32,8 @@ libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \ libcidn-inhibit-o = $(filter-out .os,$(object-suffixes)) include $(..)Rules +# +# Set libof-* for each routine. +cpp-srcs-left := $(libcidn-routines) +lib := libcidn +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) diff --git a/locale/Makefile b/locale/Makefile index e4c3878..4c22c74 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -85,7 +85,7 @@ locale-CPPFLAGS = -DLOCALEDIR='"$(localedir)"' \ -DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \ -Iprograms -CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \ +CPPFLAGS-locale_programs = -DLOCALE_PATH='$(localepath)' \ -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \ -DLOCSRCDIR='"$(i18ndir)/locales"' \ @@ -96,7 +96,12 @@ CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-charmap-dir.c = -Wno-write-strings # This makes sure -DNOT_IN_libc et al are passed for all these modules. -cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \ - $(locale-modules) $(lib-modules)) -lib := locale-programs +cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ + $(lib-modules) +lib := locale_programs +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + +# Set libof-* for each routine. +cpp-srcs-left := $(libBrokenLocale-routines) +lib := libBrokenLocale include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) diff --git a/login/Makefile b/login/Makefile index d758ac5..dbfa574 100644 --- a/login/Makefile +++ b/login/Makefile @@ -53,6 +53,10 @@ libutil-routines:= login login_tty logout logwtmp openpty forkpty include ../Rules +# Set libof-* for each routine. +cpp-srcs-left := $(libutil-routines) +lib := libutil +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) CFLAGS-getpt.c = -fexceptions ifeq (yesyes,$(have-fpie)$(build-shared)) diff --git a/mach/Machrules b/mach/Machrules index 8b35cf6..8ac0676 100644 --- a/mach/Machrules +++ b/mach/Machrules @@ -225,7 +225,12 @@ $(interface-library)-routines = $(interface-routines) extra-libs += $(interface-library) extra-libs-others += $(interface-library) +# Set libof-* for each routine. +cpp-srcs-left := $(interface-routines) +lib := $(interface-library) +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) ifeq (yes,$(build-shared)) + interface.so = $(interface-library:=.so) # Depend on libc.so so a DT_NEEDED is generated in the shared objects. diff --git a/malloc/Makefile b/malloc/Makefile index 9e93523..10a53f6 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -89,6 +89,11 @@ endif do-memusagestat: $(objpfx)memusagestat memusagestat-modules = memusagestat + +cpp-srcs-left := $(memusagestat-modules) +lib := memusagestat +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + $(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o) $(LINK.o) -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm @@ -102,6 +107,10 @@ endif include ../Rules +# Set libof-* for each routine. +cpp-srcs-left := $(libmemusage-routines) +lib := libmemusage +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) CFLAGS-mcheck-init.c = $(PIC-ccflag) CFLAGS-obstack.c = $(uses-callbacks) diff --git a/math/Makefile b/math/Makefile index 866bc0f..c900717 100644 --- a/math/Makefile +++ b/math/Makefile @@ -154,6 +154,10 @@ extra-objs += libieee.a ieee-math.o include ../Rules +# Set libof-* for each routine. +cpp-srcs-left := $(libm-routines) +lib := libm +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) ifneq (no,$(PERL)) # Run the math programs to automatically generate ULPs files. .PHONY: regen-ulps diff --git a/nis/Makefile b/nis/Makefile index 7688604..463cc6c 100644 --- a/nis/Makefile +++ b/nis/Makefile @@ -70,6 +70,18 @@ libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes)) include ../Rules +# Set libof-* for each routine. +cpp-srcs-left := $(libnsl-routines) +lib := libnsl +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + +cpp-srcs-left := $(libnss_nisplus-routines) +lib := libnss_nisplus +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + +cpp-srcs-left := $(libnss_nis-routines) +lib := libnss_nis +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) $(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version) $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \ diff --git a/nptl/Makefile b/nptl/Makefile index 157fe62..ba555c9 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -384,6 +384,11 @@ endif include ../Rules +# Set libof-* for each routine. +cpp-srcs-left := $(libpthread-routines) +lib := libpthread +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + ifeq (yes,$(build-shared)) # Make sure these things are built in the `make lib' pass so they can be used # to run programs during the `make others' pass. diff --git a/nptl_db/Makefile b/nptl_db/Makefile index ff873ca..0f90b5e 100644 --- a/nptl_db/Makefile +++ b/nptl_db/Makefile @@ -55,6 +55,10 @@ tests-special += $(objpfx)db-symbols.out include ../Rules +cpp-srcs-left := $(libthread_db-routines) +lib := libthread_db +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + $(objpfx)db-symbols.out: $(objpfx)db-symbols.v.i \ $(common-objpfx)nptl/libpthread.so LC_ALL=C $(READELF) -W -s $(filter %.so,$^) | $(AWK) -f $< > $@; \ diff --git a/nscd/Makefile b/nscd/Makefile index 639d87b..7ab4e9d 100644 --- a/nscd/Makefile +++ b/nscd/Makefile @@ -79,23 +79,22 @@ CFLAGS-nscd_gethst_r.c = -fexceptions CFLAGS-nscd_getai.c = -fexceptions CFLAGS-nscd_initgroups.c = -fexceptions -CPPFLAGS-nonlib += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 +CPPFLAGS-nscd += -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -DNOT_IN_libc=1 ifeq (yesyes,$(have-fpie)$(build-shared)) -CFLAGS-nonlib += $(pie-ccflag) +CFLAGS-nscd += $(pie-ccflag) endif ifeq (yes,$(have-ssp)) -CFLAGS-nonlib += -fstack-protector +CFLAGS-nscd += -fstack-protector endif ifeq (yesyes,$(have-fpie)$(build-shared)) LDFLAGS-nscd = -Wl,-z,now endif -# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed -# for all these modules. -cpp-srcs-left := $(nscd-modules:=.c) -lib := nonlib +# Set libof-nscd. +cpp-srcs-left := $(nscd-modules) +lib := nscd include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) diff --git a/nss/Makefile b/nss/Makefile index 1fa7f1f..41d685c 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -80,6 +80,16 @@ endif include ../Rules +# Set libof-* for each routine. +cpp-srcs-left := $(libnss_files-routines) +lib := libnss_files +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + +cpp-srcs-left := $(libnss_db-routines) +lib := libnss_db +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + + ifeq (yes,$(have-selinux)) LDLIBS-makedb := -lselinux endif @@ -105,7 +115,8 @@ $(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o) $(inst_vardbdir)/Makefile: db-Makefile $(+force) $(do-install) -CFLAGS-nss_test1.c = -DNOT_IN_libc=1 +libof-nss_test1 = extramodules +CPPFLAGS-nss_test1 = -DNOT_IN_libc=1 $(objpfx)/libnss_test1.so: $(objpfx)nss_test1.os $(link-libc-deps) $(build-module) ifdef libnss_test1.so-version diff --git a/resolv/Makefile b/resolv/Makefile index 22575e5..ae78d3c 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -82,6 +82,14 @@ CPPFLAGS += -Dgethostbyname=res_gethostbyname \ -Dgetnetbyname=res_getnetbyname \ -Dgetnetbyaddr=res_getnetbyaddr +cpp-srcs-left := $(libresolv-routines) +lib := libresolv +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + +cpp-srcs-left := $(libnss_dns-routines) +lib := libnss_dns +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + ifeq (yes,$(have-ssp)) CFLAGS-libresolv += -fstack-protector endif diff --git a/rt/Makefile b/rt/Makefile index 875deb3..fd3d9f0 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -60,6 +60,10 @@ extra-libs-others := $(extra-libs) include ../Rules +cpp-srcs-left := $(librt-routines) +lib := librt +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + CFLAGS-aio_suspend.c = -fexceptions CFLAGS-clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-librt-cancellation.c = -fasynchronous-unwind-tables diff --git a/stdlib/Makefile b/stdlib/Makefile index 9b2271b..da6e076 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -145,6 +145,7 @@ LDFLAGS-tst-putenv = $(no-as-needed) $(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os $(link-libc-deps) $(build-module) +libof-tst-putenvmod = extramodules CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1 $(objpfx)bug-getcontext: $(libm) diff --git a/sunrpc/Makefile b/sunrpc/Makefile index a2722af..f64a554 100644 --- a/sunrpc/Makefile +++ b/sunrpc/Makefile @@ -117,6 +117,10 @@ endif include ../Rules +cpp-srcs-left := $(librpcsvc-routines) +lib := librpcsvc +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + ifeq (yes,$(build-shared)) subdir_lib: $(objpfx)librpc_compat_pic.a $(objpfx)librpc_compat_pic.a: $(rpc-compat-routines.os) diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile index c05708d..b5b2cf0 100644 --- a/sysdeps/gnu/Makefile +++ b/sysdeps/gnu/Makefile @@ -29,6 +29,8 @@ ifeq ($(subdir),stdio-common) errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .))) +libof-errlist-compat = extramodules + ifeq ($(build-shared),yes) $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \ $(common-objpfx)Versions.v.i $(before-compile) diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index 222122d..6d612f6 100644 --- a/sysdeps/ieee754/ldbl-opt/Makefile +++ b/sysdeps/ieee754/ldbl-opt/Makefile @@ -145,4 +145,8 @@ CFLAGS-nldbl-y0.c = -fno-builtin-y0l CFLAGS-nldbl-y1.c = -fno-builtin-y1l CFLAGS-nldbl-yn.c = -fno-builtin-ynl +cpp-srcs-left := $(libnldbl-routines) +lib := libnldbl +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + endif diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile index fe5030e..ce4f0c5 100644 --- a/sysdeps/s390/s390-64/Makefile +++ b/sysdeps/s390/s390-64/Makefile @@ -28,6 +28,10 @@ s390x-iconv-modules = ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9 UTF16_UTF32_Z9 UTF8_UT extra-modules-left += $(s390x-iconv-modules) include extra-module.mk +cpp-srcs-left := $(foreach mod,$(s390x-iconv-modules),$($(mod)-routines)) +lib := iconvdata +include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left)) + extra-objs += $(addsuffix .so, $(s390x-iconv-modules)) install-others += $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 9ad6d22..2d6d8bb 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -178,6 +178,7 @@ ifeq ($(subdir),elf) sysdep-rtld-routines += dl-brk dl-sbrk dl-getcwd dl-openat64 dl-opendir \ dl-fxstatat64 +libof-lddlibc4 = lddlibc4 CPPFLAGS-lddlibc4 += -DNOT_IN_libc others += pldd