public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Makeconfig: Fix time64-compat.mk target
@ 2021-06-17  5:44 Siddhesh Poyarekar
  2021-06-17  8:36 ` Andreas Schwab
  2021-06-17 10:38 ` Adhemerval Zanella
  0 siblings, 2 replies; 4+ messages in thread
From: Siddhesh Poyarekar @ 2021-06-17  5:44 UTC (permalink / raw)
  To: libc-alpha

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.
---
 Makeconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makeconfig b/Makeconfig
index b6357d0b19..6482a43025 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -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 $@
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makeconfig: Fix time64-compat.mk target
  2021-06-17  5:44 [PATCH] Makeconfig: Fix time64-compat.mk target Siddhesh Poyarekar
@ 2021-06-17  8:36 ` Andreas Schwab
  2021-06-17 10:38 ` Adhemerval Zanella
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2021-06-17  8:36 UTC (permalink / raw)
  To: Siddhesh Poyarekar via Libc-alpha; +Cc: Siddhesh Poyarekar

On Jun 17 2021, Siddhesh Poyarekar via Libc-alpha wrote:

> 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.

Ok.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makeconfig: Fix time64-compat.mk target
  2021-06-17  5:44 [PATCH] Makeconfig: Fix time64-compat.mk target Siddhesh Poyarekar
  2021-06-17  8:36 ` Andreas Schwab
@ 2021-06-17 10:38 ` Adhemerval Zanella
  2021-06-17 10:49   ` Siddhesh Poyarekar
  1 sibling, 1 reply; 4+ messages in thread
From: Adhemerval Zanella @ 2021-06-17 10:38 UTC (permalink / raw)
  To: Siddhesh Poyarekar, libc-alpha



On 17/06/2021 02:44, Siddhesh Poyarekar wrote:
> 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.

Thanks for catching it.  Out of curiosity, how do you trigger this issue?
I am building it glibc and tests with this patch for some time and I didn't
see it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Makeconfig: Fix time64-compat.mk target
  2021-06-17 10:38 ` Adhemerval Zanella
@ 2021-06-17 10:49   ` Siddhesh Poyarekar
  0 siblings, 0 replies; 4+ messages in thread
From: Siddhesh Poyarekar @ 2021-06-17 10:49 UTC (permalink / raw)
  To: Adhemerval Zanella, libc-alpha

On 6/17/21 4:08 PM, Adhemerval Zanella wrote:
> Thanks for catching it.  Out of curiosity, how do you trigger this issue?
> I am building it glibc and tests with this patch for some time and I didn't
> see it.

It happens all the time, just that it does not terminate the build and 
hence would be nearly impossible to notice unless you read the full 
build messages line by line.  However, I have this curious habit of 
running the build as `make -j16 > /dev/null` due to which only stderr 
gets printed on the terminal.  The bright red error from gcc complaining 
about missing libc-modules.h was hard to miss :)

Siddhesh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-17 10:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  5:44 [PATCH] Makeconfig: Fix time64-compat.mk target Siddhesh Poyarekar
2021-06-17  8:36 ` Andreas Schwab
2021-06-17 10:38 ` Adhemerval Zanella
2021-06-17 10:49   ` Siddhesh Poyarekar

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).