]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
build: Properly generate .d dependency files [BZ #28922]
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Feb 2022 22:10:45 +0000 (14:10 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 25 Feb 2022 18:35:45 +0000 (10:35 -0800)
1. Also generate .d dependency files for $(tests-container) and
$(tests-printers).
2. elf: Add tst-auditmod17.os to extra-test-objs.
3. iconv: Add tst-gconv-init-failure-mod.os to extra-test-objs.
4. malloc: Rename extra-tests-objs to extra-test-objs.
5. linux: Add tst-sysconf-iov_max-uapi.o to extra-test-objs.
6. x86_64: Add tst-x86_64mod-1.o, tst-platformmod-2.o, test-libmvec.o,
test-libmvec-avx.o, test-libmvec-avx2.o and test-libmvec-avx512f.o to
extra-test-objs.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Makerules
elf/Makefile
iconv/Makefile
malloc/Makefile
sysdeps/unix/sysv/linux/Makefile
sysdeps/x86_64/Makefile
sysdeps/x86_64/fpu/Makeconfig

index 5de2cec6be472729135c4d415fa4111cdcbea5d8..428464f09294abd609bce2111412d21e06922632 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -770,6 +770,7 @@ endif
             $(patsubst %.oS,%.d,$(filter %.oS,$(extra-objs))) \
             $(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
             $(addsuffix .d,$(tests) $(tests-internal) $(xtests) \
+               $(tests-container) $(tests-printers) \
                $(test-srcs) $(tests-time64) $(xtests-time64))
 ifeq ($(build-programs),yes)
 +depfiles += $(addsuffix .d,$(others) $(sysdep-others))
index bff94954c93df2a3406e3e68fb8e675e0658c6ad..281551d380e56caf9c00e0966cbf72ad7bcb0cd5 100644 (file)
@@ -888,6 +888,9 @@ modules-names += \
 modules-names-tests = $(filter-out ifuncmod% tst-tlsmod%,\
                                   $(modules-names))
 
+# For +depfiles in Makerules.
+extra-test-objs += tst-auditmod17.os
+
 ifeq (yes,$(have-mtls-dialect-gnu2))
 tests += tst-gnu2-tls1
 modules-names += tst-gnu2-tls1mod
index 5aeed346efbb8d7ffadfae5d2f00e6b452ccbed0..a0d90cfeac74fde740ce47ff1fd3d79127e94666 100644 (file)
@@ -86,6 +86,7 @@ ifeq (yes,$(build-shared))
 tests += tst-gconv-init-failure
 modules-names += tst-gconv-init-failure-mod
 modules-names-tests += tst-gconv-init-failure-mod
+extra-test-objs += tst-gconv-init-failure-mod.os
 $(objpfx)tst-gconv-init-failure-mod.so: $(libsupport)
 $(objpfx)tst-gconv-init-failure.out: \
  $(objpfx)gconv-modules $(objpfx)tst-gconv-init-failure-mod.so
index 2329cf718a442527e950e872a0752bdb8b4252aa..4e32de2a0b6698cc929f0f0535b3bdf51d14d2bb 100644 (file)
@@ -145,7 +145,7 @@ extra-libs = libmemusage libc_malloc_debug
 extra-libs-others = $(extra-libs)
 
 # Helper objects for some tests.
-extra-tests-objs += \
+extra-test-objs += \
   tst-interpose-aux-nothread.o \
   tst-interpose-aux-thread.o \
 
index 7122f5597537ad4bd51392326fe93cf97946c2e9..ca953804d07361d373dda47d9f71c9cd7734123d 100644 (file)
@@ -128,6 +128,9 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
   tst-epoll \
   # tests
 
+# For +depfiles in Makerules.
+extra-test-objs += tst-sysconf-iov_max-uapi.o
+
 # Test for the symbol version of fcntl that was replaced in glibc 2.28.
 ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
 tests += tst-ofdlocks-compat
index 7a4b57635658842eae6b9737224f2b38593dd8d1..79365aff2a08ceda50a8362c4e83934b607754d7 100644 (file)
@@ -52,6 +52,7 @@ CFLAGS-tst-quad2pie.c = $(PIE-ccflag)
 
 tests += tst-x86_64-1
 modules-names += x86_64/tst-x86_64mod-1
+extra-test-objs += tst-x86_64mod-1.o
 LDFLAGS-tst-x86_64mod-1.so = -Wl,-soname,tst-x86_64mod-1.so
 ifneq (no,$(have-tunables))
 # Test the state size for XSAVE when XSAVEC is disabled.
@@ -63,6 +64,7 @@ $(objpfx)tst-x86_64-1: $(objpfx)x86_64/tst-x86_64mod-1.so
 ifneq (no,$(have-tunables))
 tests += tst-platform-1
 modules-names += tst-platformmod-1 x86_64/tst-platformmod-2
+extra-test-objs += tst-platformmod-2.o
 CFLAGS-tst-platform-1.c = -mno-avx
 CFLAGS-tst-platformmod-1.c = -mno-avx
 CFLAGS-tst-platformmod-2.c = -mno-avx
index 30b8d9782643fb35b24cb1ddcac11ede5ac4432f..5c03b1dbb8715a3183601175caa7910c05bbb21c 100644 (file)
@@ -112,6 +112,12 @@ libmvec-abi-func-avx512f-tests = \
 
 $(common-objpfx)libmvec.mk: $(common-objpfx)config.make
        (echo "ifeq (\$$(subdir)\$$(build-mathvec),mathyes)"; \
+        echo; \
+        echo "extra-test-objs += \\"; \
+        for i in "" "-avx" "-avx2" "-avx512f"; do \
+          echo "  test-libmvec$$i.o \\"; \
+        done; \
+        echo "# extra-test-objs"; \
         echo; \
         for i in "" "-avx" "-avx2" "-avx512f"; do \
           for t in $(libmvec-abi-func-tests); do \