]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Makeconfig: Fix time64-compat.mk target
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 17 Jun 2021 08:52:21 +0000 (14:22 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Thu, 17 Jun 2021 08:52:21 +0000 (14:22 +0530)
The time64-compat.i needed for the time64-compat.mk Makeconfig include
ends up trying to include libc-modules.h, which is not generated until
later.  This results in an error during build which is not noticed
because it somehow does not terminate the build.

Exclude the modules cppflags from the pre-processing command and fix
up the time64-compat.mk target so that the build runs without issues.

Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
Makeconfig

index b6357d0b192d69b0463dd3d512b78d438d82ed3d..6482a43025019f20ce0a82593a6174d16a93c6c8 100644 (file)
@@ -970,7 +970,7 @@ module-cppflags-real = -include $(common-objpfx)libc-modules.h \
 # facility.  In fact, shlib-versions should not use it because that will
 # create a circular dependency as libc-modules.h is generated from
 # shlib-versions.
-module-cppflags = $(if $(filter %.v.i,$(@F)),,$(module-cppflags-real))
+module-cppflags = $(if $(filter %.mk.i %.v.i,$(@F)),,$(module-cppflags-real))
 
 # These are the variables that the implicit compilation rules use.
 # Note that we can't use -std=* in CPPFLAGS, because it overrides
@@ -1239,11 +1239,11 @@ endif # $(build-shared) = yes
 -include $(common-objpfx)time64-compat.mk
 postclean-generated += time64-compat.mk
 
-$(common-objpfx)time64-compat.mk: $(sysd-versions-force) \
-                                 $(common-objpfx)time64-compat.i
+$(common-objpfx)time64-compat.mk: $(common-objpfx)time64-compat.mk.i \
+                                 $(sysd-versions-force)
        sed '/^[        ]*#/d;/^[       ]*$$/d' $< > $@T
        mv -f $@T $@
-$(common-objpfx)time64-compat.i: $(..)Makeconfig
+$(common-objpfx)time64-compat.mk.i: $(..)Makeconfig
        printf "#include <time64-compat.h>\n#ifdef TIME64_NON_DEFAULT\nhave-time64-compat = yes\n#endif" \
        | $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - > $@T
        mv -f $@T $@