From: "H.J. Lu" <hjl.tools@gmail.com>
To: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Don't compile non-lib modules as lib modules [BZ #21864]
Date: Sun, 20 Aug 2017 17:59:00 -0000 [thread overview]
Message-ID: <CAMe9rOqoZHao+0GJzjRrK7FkkpE_Z0K9JuhNQr7gMVJg+zBSew@mail.gmail.com> (raw)
In-Reply-To: <20170813173910.GA15729@gmail.com>
On Sun, Aug 13, 2017 at 10:39 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Some programs have more than one source files. These non-lib modules
> should not be compiled with -DMODULE_NAME=libc. This patch puts these
> non-lib modules in $(others-extras) and adds $(others-extras) to
> all-nonlib.
>
> Tested on i686 and x86-64. OK for master?
Any comments or objections? If there is no objection, I will check it in
tomorrow.
> H.J.
> ---
> [BZ #21864]
> * Makerules (all-nonlib): Add $(others-extras).
> * catgets/Makefile (others-extras): New.
> * elf/Makefile (others-extras): Likewise.
> * nss/Makefile (others-extras): Likewise.
> ---
> Makerules | 3 ++-
> catgets/Makefile | 1 +
> elf/Makefile | 1 +
> nss/Makefile | 1 +
> 4 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Makerules b/Makerules
> index 9bb707c168..8f1324d8e9 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -1359,7 +1359,8 @@ lib := testsuite
> include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
> endif
>
> -all-nonlib := $(strip $(tests-internal) $(test-internal-extras) $(others))
> +all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \
> + $(others) $(others-extras))
> ifneq (,$(all-nonlib))
> cpp-srcs-left = $(all-nonlib)
> lib := nonlib
> diff --git a/catgets/Makefile b/catgets/Makefile
> index e5f49491fb..39aab67c14 100644
> --- a/catgets/Makefile
> +++ b/catgets/Makefile
> @@ -38,6 +38,7 @@ tests-special += $(objpfx)tst-catgets-mem.out
> endif
>
> gencat-modules = xmalloc
> +others-extras = $(gencat-modules)
>
> # To find xmalloc.c
> vpath %.c ../locale/programs
> diff --git a/elf/Makefile b/elf/Makefile
> index d314a5fa7e..7cf959aabd 100644
> --- a/elf/Makefile
> +++ b/elf/Makefile
> @@ -112,6 +112,7 @@ install-rootsbin += ldconfig
>
> ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs
> extra-objs += $(ldconfig-modules:=.o)
> +others-extras = $(ldconfig-modules)
> endif
> endif
>
> diff --git a/nss/Makefile b/nss/Makefile
> index d9f6d41181..87a0ed7134 100644
> --- a/nss/Makefile
> +++ b/nss/Makefile
> @@ -46,6 +46,7 @@ CPPFLAGS-getent.c = -DHAVE_SUNRPC=$(have-sunrpc)
> others := getent makedb
> install-bin := getent makedb
> makedb-modules = xmalloc hash-string
> +others-extras = $(makedb-modules)
> extra-objs += $(makedb-modules:=.o)
>
> tests-static = tst-field
> --
> 2.13.4
>
--
H.J.
prev parent reply other threads:[~2017-08-20 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 17:39 H.J. Lu
2017-08-20 17:59 ` H.J. Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMe9rOqoZHao+0GJzjRrK7FkkpE_Z0K9JuhNQr7gMVJg+zBSew@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).