]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Don't compile non-lib modules as lib modules [BZ #21864]
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 30 Jul 2017 04:04:09 +0000 (21:04 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Aug 2017 12:34:54 +0000 (05:34 -0700)
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.

[BZ #21864]
* Makerules (all-nonlib): Add $(others-extras).
* catgets/Makefile (others-extras): New.
* elf/Makefile (others-extras): Likewise.
* nss/Makefile (others-extras): Likewise.

Makerules
catgets/Makefile
elf/Makefile
nss/Makefile

index 9bb707c168acd9f5d4dbf29a4d8aad79a817a9c4..8f1324d8e93beeea4097724c5bbdfb6b158dc7bf 100644 (file)
--- 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
index e5f49491fb3f34ba2abd17e7edb074962775658c..39aab67c143ec1b4406ba9a9427d8e2444ecc3c8 100644 (file)
@@ -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
index d314a5fa7e89fcbf6727ae3399e923de8d7577ba..7cf959aabdfafa607688cd72c5b24d6b101f2f97 100644 (file)
@@ -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
 
index 1e298c28f1b2ff8663c91db8aaa7fbbdef976f57..0369249f3045fd89af9226d92db8f4ae411a92df 100644 (file)
@@ -47,6 +47,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