From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12559 invoked by alias); 7 Nov 2014 23:22:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 12549 invoked by uid 89); 7 Nov 2014 23:22:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Siddhesh Poyarekar Cc: libc-alpha@sourceware.org Subject: Re: [ping3][PATCH 01/19 v2] Add new macro IN_MODULE to identify module in which source is built In-Reply-To: Siddhesh Poyarekar's message of Wednesday, 1 October 2014 13:46:13 +0530 <20141001081613.GG2217@spoyarek.pnq.redhat.com> References: <1408618663-2281-1-git-send-email-siddhesh@redhat.com> <1408618663-2281-2-git-send-email-siddhesh@redhat.com> <20140822182247.E0FCE2C398C@topped-with-meat.com> <20140827171916.GE8020@spoyarek.pnq.redhat.com> <20140917123835.GU6586@spoyarek.pnq.redhat.com> <20141001081613.GG2217@spoyarek.pnq.redhat.com> Message-Id: <20141107232210.66E892C3B00@topped-with-meat.com> Date: Fri, 07 Nov 2014 23:22:00 -0000 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=2Q1r125Qna_QoPgbZlgA:9 a=CjuIK1q_8ugA:10 X-SW-Source: 2014-11/txt/msg00152.txt.bz2 > Patches that follow will remove uses of IS_IN_* variables with the s/remove/replace/ > 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. s/source/binary/ > +in-module = $(strip $(foreach lib,$(libof-$(basename $(@F))) $(libof-$( + $(libof-$(@F)),-DIN_MODULE=MODULE_$(lib))) I think you can make this: in-module = $(firstword $(libof-$(basename $(@F))) \ $(libof-$( - $(CPPFLAGS-$(suffix $@)) \ > + $(CPPFLAGS-$(suffix $@)) $(module-def) \ Here just use -DIN_MODULE=MODULE_$(in-module) directly. > diff --git a/elf/rtld-Rules b/elf/rtld-Rules > index 0a5d6af..4d78d90 100644 > --- a/elf/rtld-Rules > +++ b/elf/rtld-Rules > @@ -138,6 +138,11 @@ ifdef rtld-depfiles > -include $(rtld-depfiles) > endif > > +# Set libof-* for each routine. > +cpp-srcs-left := $(subst .os,,$(rtld-modules)) Use $(rtld-modules:%.os=%) (or patsubst if you prefer). Plain subst will eat .os out of the middle of a name, which is wrong. > --- /dev/null > +++ b/include/libc-modules.h Even though it's just for a brief window of the revision history, please put a comment in this file saying it should/will be generated. > +#include "libc-modules.h" Use <>. Add a short comment saying that is defines the MODULE_* macros. > -CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \ > +CPPFLAGS-locale_programs = -DLOCALE_PATH='$(localepath)' \ Rather than changing this name, I think the libc-modules.h generation should just turn all nonidentifier characters into _. OK with those changes. Thanks, Roland