public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
@ 2020-05-21 15:35 Romain Naour
  2020-05-21 17:31 ` Richard Biener
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Romain Naour @ 2020-05-21 15:35 UTC (permalink / raw)
  To: gcc-patches
  Cc: Romain Naour, Ben Dakin-Norris, Maxim Kochetkov,
	Thomas Petazzoni, Yann E . MORIN, Cc : David Malcolm

As reported by several Buildroot users [1][2][3], the gcc build
may fail while running selftests makefile target.

The problem only occurs when ccache is used with gcc 9 and 10,
probably due to a race condition.

While debuging with "make -p" we can notice that s-selftest-c target
contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS [4].

  s-selftest-c: cc1

While the build is failing, the s-selftest-c dependencies recipe is
still running and reported as a bug by make.

  "Dependencies recipe running (THIS IS A BUG)."

A change [5] in gcc 9 seems to introduce the problem since we can't
reproduce this problem with gcc 8.

As suggested by Yann E. MORIN [6], move SELFTEST_DEPS before
including language makefile fragments.

With the fix applied, the s-seltest-c dependency contains
SELFTEST_DEPS value.

  s-selftest-c: cc1 xgcc specs stmp-int-hdrs ../../gcc/testsuite/selftests

[1] http://lists.busybox.net/pipermail/buildroot/2020-May/282171.html
[2] http://lists.busybox.net/pipermail/buildroot/2020-May/282766.html
[3] https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
[4] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/Make-lang.in;h=bfae6fd2549c4f728816cd355fa9739dcc08fcde;hb=033eb5671769a4c681a44aad08a454e667e08502#l120
[5] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=033eb5671769a4c681a44aad08a454e667e08502
[6] http://lists.busybox.net/pipermail/buildroot/2020-May/283213.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Ben Dakin-Norris <ben.dakin-norris@navtechradar.com>
Cc: Maxim Kochetkov <fido_max@inbox.ru>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Cc: David Malcolm <dmalcolm@gcc.gnu.org>
---
This patch should be backported to gcc 10 and gcc 9.
---
 gcc/ChangeLog   | 5 +++++
 gcc/Makefile.in | 6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 977e7664b62..c3bb18f2afd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-21  Romain Naour <romain.naour@gmail.com>
+
+	* Makefile.in: move SELFTEST_DEPS before including language
+	makefile fragments.
+
 2020-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR target/95260
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 0fe2ba241e3..867a0fa8202 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1730,6 +1730,10 @@ $(FULL_DRIVER_NAME): ./xgcc
 	rm -f $@
 	$(LN_S) $< $@
 
+# SELFTEST_DEPS need to be set before including language makefile fragments.
+# Otherwise $(SELFTEST_DEPS) is empty when used from various <LANG>/Make-lang.in.
+SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs $(srcdir)/testsuite/selftests
+
 #\f
 # Language makefile fragments.
 
@@ -2006,8 +2010,6 @@ DEVNULL=$(if $(findstring mingw,$(build)),nul,/dev/null)
 SELFTEST_FLAGS = -nostdinc $(DEVNULL) -S -o $(DEVNULL) \
 	-fself-test=$(srcdir)/testsuite/selftests
 
-SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs $(srcdir)/testsuite/selftests
-
 # Run the selftests during the build once we have a driver and the frontend,
 # so that self-test failures are caught as early as possible.
 # Use "s-selftest-FE" to ensure that we only run the selftests if the
-- 
2.25.4


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-05-21 15:35 [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments Romain Naour
@ 2020-05-21 17:31 ` Richard Biener
  2020-05-21 17:41   ` Jeff Law
  2020-05-21 22:13 ` David Malcolm
  2020-06-03 18:33 ` Jeff Law
  2 siblings, 1 reply; 10+ messages in thread
From: Richard Biener @ 2020-05-21 17:31 UTC (permalink / raw)
  To: Romain Naour, Romain Naour via Gcc-patches, gcc-patches
  Cc: Yann E . MORIN, Maxim Kochetkov, Thomas Petazzoni,
	Ben Dakin-Norris, Cc : David Malcolm

On May 21, 2020 5:35:19 PM GMT+02:00, Romain Naour via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>As reported by several Buildroot users [1][2][3], the gcc build
>may fail while running selftests makefile target.
>
>The problem only occurs when ccache is used with gcc 9 and 10,
>probably due to a race condition.

Just as a note since a while I am regularly running into (the same?) issue when bootstrapping that xgcc is not yet built when self tests want to run and I stumbled across the very same dependency line. 

>While debuging with "make -p" we can notice that s-selftest-c target
>contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS [4].
>
>  s-selftest-c: cc1
>
>While the build is failing, the s-selftest-c dependencies recipe is
>still running and reported as a bug by make.
>
>  "Dependencies recipe running (THIS IS A BUG)."
>
>A change [5] in gcc 9 seems to introduce the problem since we can't
>reproduce this problem with gcc 8.
>
>As suggested by Yann E. MORIN [6], move SELFTEST_DEPS before
>including language makefile fragments.
>
>With the fix applied, the s-seltest-c dependency contains
>SELFTEST_DEPS value.
>
>s-selftest-c: cc1 xgcc specs stmp-int-hdrs
>../../gcc/testsuite/selftests
>
>[1] http://lists.busybox.net/pipermail/buildroot/2020-May/282171.html
>[2] http://lists.busybox.net/pipermail/buildroot/2020-May/282766.html
>[3]
>https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
>[4]
>https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/Make-lang.in;h=bfae6fd2549c4f728816cd355fa9739dcc08fcde;hb=033eb5671769a4c681a44aad08a454e667e08502#l120
>[5]
>https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=033eb5671769a4c681a44aad08a454e667e08502
>[6] http://lists.busybox.net/pipermail/buildroot/2020-May/283213.html
>
>Signed-off-by: Romain Naour <romain.naour@gmail.com>
>Cc: Ben Dakin-Norris <ben.dakin-norris@navtechradar.com>
>Cc: Maxim Kochetkov <fido_max@inbox.ru>
>Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>Cc: Yann E. MORIN <yann.morin.1998@free.fr>
>Cc: Cc: David Malcolm <dmalcolm@gcc.gnu.org>
>---
>This patch should be backported to gcc 10 and gcc 9.
>---
> gcc/ChangeLog   | 5 +++++
> gcc/Makefile.in | 6 ++++--
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
>diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>index 977e7664b62..c3bb18f2afd 100644
>--- a/gcc/ChangeLog
>+++ b/gcc/ChangeLog
>@@ -1,3 +1,8 @@
>+2020-05-21  Romain Naour <romain.naour@gmail.com>
>+
>+	* Makefile.in: move SELFTEST_DEPS before including language
>+	makefile fragments.
>+
> 2020-05-21  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	PR target/95260
>diff --git a/gcc/Makefile.in b/gcc/Makefile.in
>index 0fe2ba241e3..867a0fa8202 100644
>--- a/gcc/Makefile.in
>+++ b/gcc/Makefile.in
>@@ -1730,6 +1730,10 @@ $(FULL_DRIVER_NAME): ./xgcc
> 	rm -f $@
> 	$(LN_S) $< $@
> 
>+# SELFTEST_DEPS need to be set before including language makefile
>fragments.
>+# Otherwise $(SELFTEST_DEPS) is empty when used from various
><LANG>/Make-lang.in.
>+SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs
>$(srcdir)/testsuite/selftests
>+
> #\f>
> # Language makefile fragments.
> 
>@@ -2006,8 +2010,6 @@ DEVNULL=$(if $(findstring
>mingw,$(build)),nul,/dev/null)
> SELFTEST_FLAGS = -nostdinc $(DEVNULL) -S -o $(DEVNULL) \
> 	-fself-test=$(srcdir)/testsuite/selftests
> 
>-SELFTEST_DEPS = $(GCC_PASSES) stmp-int-hdrs
>$(srcdir)/testsuite/selftests
>-
># Run the selftests during the build once we have a driver and the
>frontend,
> # so that self-test failures are caught as early as possible.
> # Use "s-selftest-FE" to ensure that we only run the selftests if the


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-05-21 17:31 ` Richard Biener
@ 2020-05-21 17:41   ` Jeff Law
  2020-05-30 11:32     ` Romain Naour
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Law @ 2020-05-21 17:41 UTC (permalink / raw)
  To: Richard Biener, Romain Naour, Romain Naour via Gcc-patches
  Cc: Maxim Kochetkov, Cc : David Malcolm, Yann E . MORIN,
	Thomas Petazzoni, Ben Dakin-Norris

On Thu, 2020-05-21 at 19:31 +0200, Richard Biener via Gcc-patches wrote:
> On May 21, 2020 5:35:19 PM GMT+02:00, Romain Naour via Gcc-patches <
> gcc-patches@gcc.gnu.org> wrote:
> > As reported by several Buildroot users [1][2][3], the gcc build
> > may fail while running selftests makefile target.
> > 
> > The problem only occurs when ccache is used with gcc 9 and 10,
> > probably due to a race condition.
> 
> Just as a note since a while I am regularly running into (the same?) issue when
> bootstrapping that xgcc is not yet built when self tests want to run and I
> stumbled across the very same dependency line. 
My tester trips it once in a while too, so a big thanks to Romain for digging
into it.  It's definitely in my queue of things to review.

jeff
> 


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-05-21 15:35 [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments Romain Naour
  2020-05-21 17:31 ` Richard Biener
@ 2020-05-21 22:13 ` David Malcolm
  2020-05-27 12:04   ` Romain Naour
  2020-06-03 18:33 ` Jeff Law
  2 siblings, 1 reply; 10+ messages in thread
From: David Malcolm @ 2020-05-21 22:13 UTC (permalink / raw)
  To: Romain Naour, gcc-patches
  Cc: Ben Dakin-Norris, Maxim Kochetkov, Thomas Petazzoni,
	Yann E . MORIN, Cc : David Malcolm

On Thu, 2020-05-21 at 17:35 +0200, Romain Naour wrote:
> As reported by several Buildroot users [1][2][3], the gcc build
> may fail while running selftests makefile target.
> 
> The problem only occurs when ccache is used with gcc 9 and 10,
> probably due to a race condition.
> 
> While debuging with "make -p" we can notice that s-selftest-c target
> contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS
> [4].
> 
>   s-selftest-c: cc1
> 
> While the build is failing, the s-selftest-c dependencies recipe is
> still running and reported as a bug by make.
> 
>   "Dependencies recipe running (THIS IS A BUG)."
> 
> A change [5] in gcc 9 seems to introduce the problem since we can't
> reproduce this problem with gcc 8.

Sorry about introducing the breakage.  The patch looks sane to me,
though I don't know if I can formally approve it (and I'm now doubting
my "make" skills...)

Dave


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-05-21 22:13 ` David Malcolm
@ 2020-05-27 12:04   ` Romain Naour
  0 siblings, 0 replies; 10+ messages in thread
From: Romain Naour @ 2020-05-27 12:04 UTC (permalink / raw)
  To: David Malcolm, gcc-patches
  Cc: Ben Dakin-Norris, Maxim Kochetkov, Thomas Petazzoni,
	Yann E . MORIN, Cc : David Malcolm

Hi All,

Le 22/05/2020 à 00:13, David Malcolm a écrit :
> On Thu, 2020-05-21 at 17:35 +0200, Romain Naour wrote:
>> As reported by several Buildroot users [1][2][3], the gcc build
>> may fail while running selftests makefile target.
>>
>> The problem only occurs when ccache is used with gcc 9 and 10,
>> probably due to a race condition.
>>
>> While debuging with "make -p" we can notice that s-selftest-c target
>> contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS
>> [4].
>>
>>   s-selftest-c: cc1
>>
>> While the build is failing, the s-selftest-c dependencies recipe is
>> still running and reported as a bug by make.
>>
>>   "Dependencies recipe running (THIS IS A BUG)."
>>
>> A change [5] in gcc 9 seems to introduce the problem since we can't
>> reproduce this problem with gcc 8.
> 
> Sorry about introducing the breakage.  The patch looks sane to me,
> though I don't know if I can formally approve it (and I'm now doubting
> my "make" skills...)

No problem, the issue is not obvious at all.
My intention is to help people to backport the patch to previous gcc version.

Best regards,
Romain


> 
> Dave
> 


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-05-21 17:41   ` Jeff Law
@ 2020-05-30 11:32     ` Romain Naour
  0 siblings, 0 replies; 10+ messages in thread
From: Romain Naour @ 2020-05-30 11:32 UTC (permalink / raw)
  To: law, Richard Biener, Romain Naour via Gcc-patches
  Cc: Maxim Kochetkov, Cc : David Malcolm, Yann E . MORIN,
	Thomas Petazzoni, Ben Dakin-Norris

Hi Jeff,

Le 21/05/2020 à 19:41, Jeff Law a écrit :
> On Thu, 2020-05-21 at 19:31 +0200, Richard Biener via Gcc-patches wrote:
>> On May 21, 2020 5:35:19 PM GMT+02:00, Romain Naour via Gcc-patches <
>> gcc-patches@gcc.gnu.org> wrote:
>>> As reported by several Buildroot users [1][2][3], the gcc build
>>> may fail while running selftests makefile target.
>>>
>>> The problem only occurs when ccache is used with gcc 9 and 10,
>>> probably due to a race condition.
>>
>> Just as a note since a while I am regularly running into (the same?) issue when
>> bootstrapping that xgcc is not yet built when self tests want to run and I
>> stumbled across the very same dependency line. 
> My tester trips it once in a while too, so a big thanks to Romain for digging
> into it.  It's definitely in my queue of things to review.

You're welcome :)

Did you have time to review the patch ?
I can provide a way to reproduce easily the issue by using Buildroot.

Do you need something else ?

Best regards,
Romain


> 
> jeff
>>
> 


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-05-21 15:35 [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments Romain Naour
  2020-05-21 17:31 ` Richard Biener
  2020-05-21 22:13 ` David Malcolm
@ 2020-06-03 18:33 ` Jeff Law
  2020-06-03 19:56   ` Romain Naour
  2 siblings, 1 reply; 10+ messages in thread
From: Jeff Law @ 2020-06-03 18:33 UTC (permalink / raw)
  To: Romain Naour, gcc-patches
  Cc: Yann E . MORIN, Maxim Kochetkov, Thomas Petazzoni,
	Ben Dakin-Norris, Cc : David Malcolm

On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote:
> As reported by several Buildroot users [1][2][3], the gcc build
> may fail while running selftests makefile target.
> 
> The problem only occurs when ccache is used with gcc 9 and 10,
> probably due to a race condition.
> 
> While debuging with "make -p" we can notice that s-selftest-c target
> contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS [4].
> 
>   s-selftest-c: cc1
> 
> While the build is failing, the s-selftest-c dependencies recipe is
> still running and reported as a bug by make.
> 
>   "Dependencies recipe running (THIS IS A BUG)."
> 
> A change [5] in gcc 9 seems to introduce the problem since we can't
> reproduce this problem with gcc 8.
> 
> As suggested by Yann E. MORIN [6], move SELFTEST_DEPS before
> including language makefile fragments.
> 
> With the fix applied, the s-seltest-c dependency contains
> SELFTEST_DEPS value.
> 
>   s-selftest-c: cc1 xgcc specs stmp-int-hdrs ../../gcc/testsuite/selftests
> 
> [1] http://lists.busybox.net/pipermail/buildroot/2020-May/282171.html
> [2] http://lists.busybox.net/pipermail/buildroot/2020-May/282766.html
> [3] https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
> [4] 
> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/Make-lang.in;h=bfae6fd2549c4f728816cd355fa9739dcc08fcde;hb=033eb5671769a4c681a44aad08a454e667e08502#l120
> [5] 
> https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=033eb5671769a4c681a44aad08a454e667e08502
> [6] http://lists.busybox.net/pipermail/buildroot/2020-May/283213.html
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Ben Dakin-Norris <ben.dakin-norris@navtechradar.com>
> Cc: Maxim Kochetkov <fido_max@inbox.ru>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Cc: David Malcolm <dmalcolm@gcc.gnu.org>
> ---
> This patch should be backported to gcc 10 and gcc 9.
> ---
>  gcc/ChangeLog   | 5 +++++
>  gcc/Makefile.in | 6 ++++--
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 977e7664b62..c3bb18f2afd 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2020-05-21  Romain Naour <romain.naour@gmail.com>
> +
> +	* Makefile.in: move SELFTEST_DEPS before including language
> +	makefile fragments.
THanks.  I've installed this on the trunk.

jeff
> 


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-06-03 18:33 ` Jeff Law
@ 2020-06-03 19:56   ` Romain Naour
  2020-06-03 20:24     ` Jeff Law
  0 siblings, 1 reply; 10+ messages in thread
From: Romain Naour @ 2020-06-03 19:56 UTC (permalink / raw)
  To: law, gcc-patches
  Cc: Yann E . MORIN, Maxim Kochetkov, Thomas Petazzoni,
	Ben Dakin-Norris, Cc : David Malcolm

Hi Jeff,

Le 03/06/2020 à 20:33, Jeff Law a écrit :
> On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote:
>> As reported by several Buildroot users [1][2][3], the gcc build
>> may fail while running selftests makefile target.
>>
>> The problem only occurs when ccache is used with gcc 9 and 10,
>> probably due to a race condition.
>>
>> While debuging with "make -p" we can notice that s-selftest-c target
>> contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS [4].
>>
>>   s-selftest-c: cc1
>>
>> While the build is failing, the s-selftest-c dependencies recipe is
>> still running and reported as a bug by make.
>>
>>   "Dependencies recipe running (THIS IS A BUG)."
>>
>> A change [5] in gcc 9 seems to introduce the problem since we can't
>> reproduce this problem with gcc 8.
>>
>> As suggested by Yann E. MORIN [6], move SELFTEST_DEPS before
>> including language makefile fragments.
>>
>> With the fix applied, the s-seltest-c dependency contains
>> SELFTEST_DEPS value.
>>
>>   s-selftest-c: cc1 xgcc specs stmp-int-hdrs ../../gcc/testsuite/selftests
>>
>> [1] http://lists.busybox.net/pipermail/buildroot/2020-May/282171.html
>> [2] http://lists.busybox.net/pipermail/buildroot/2020-May/282766.html
>> [3] https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
>> [4] 
>> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/Make-lang.in;h=bfae6fd2549c4f728816cd355fa9739dcc08fcde;hb=033eb5671769a4c681a44aad08a454e667e08502#l120
>> [5] 
>> https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=033eb5671769a4c681a44aad08a454e667e08502
>> [6] http://lists.busybox.net/pipermail/buildroot/2020-May/283213.html
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Ben Dakin-Norris <ben.dakin-norris@navtechradar.com>
>> Cc: Maxim Kochetkov <fido_max@inbox.ru>
>> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
>> Cc: Cc: David Malcolm <dmalcolm@gcc.gnu.org>
>> ---
>> This patch should be backported to gcc 10 and gcc 9.
>> ---
>>  gcc/ChangeLog   | 5 +++++
>>  gcc/Makefile.in | 6 ++++--
>>  2 files changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>> index 977e7664b62..c3bb18f2afd 100644
>> --- a/gcc/ChangeLog
>> +++ b/gcc/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2020-05-21  Romain Naour <romain.naour@gmail.com>
>> +
>> +	* Makefile.in: move SELFTEST_DEPS before including language
>> +	makefile fragments.
> THanks.  I've installed this on the trunk.

Many thanks for merging the patch!

But I don't see the commit log I've written to explain the issue.
Was there a reason to drop it?

Best regards,
Romain

> 
> jeff
>>
> 


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-06-03 19:56   ` Romain Naour
@ 2020-06-03 20:24     ` Jeff Law
  2020-07-08 19:41       ` Romain Naour
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Law @ 2020-06-03 20:24 UTC (permalink / raw)
  To: Romain Naour, gcc-patches
  Cc: Yann E . MORIN, Maxim Kochetkov, Thomas Petazzoni,
	Ben Dakin-Norris, Cc : David Malcolm

On Wed, 2020-06-03 at 21:56 +0200, Romain Naour wrote:
> Hi Jeff,
> 
> Le 03/06/2020 à 20:33, Jeff Law a écrit :
> > On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote:
> > > As reported by several Buildroot users [1][2][3], the gcc build
> > > may fail while running selftests makefile target.
> > > 
> > > The problem only occurs when ccache is used with gcc 9 and 10,
> > > probably due to a race condition.
> > > 
> > > While debuging with "make -p" we can notice that s-selftest-c target
> > > contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS [4].
> > > 
> > >   s-selftest-c: cc1
> > > 
> > > While the build is failing, the s-selftest-c dependencies recipe is
> > > still running and reported as a bug by make.
> > > 
> > >   "Dependencies recipe running (THIS IS A BUG)."
> > > 
> > > A change [5] in gcc 9 seems to introduce the problem since we can't
> > > reproduce this problem with gcc 8.
> > > 
> > > As suggested by Yann E. MORIN [6], move SELFTEST_DEPS before
> > > including language makefile fragments.
> > > 
> > > With the fix applied, the s-seltest-c dependency contains
> > > SELFTEST_DEPS value.
> > > 
> > >   s-selftest-c: cc1 xgcc specs stmp-int-hdrs ../../gcc/testsuite/selftests
> > > 
> > > [1] http://lists.busybox.net/pipermail/buildroot/2020-May/282171.html
> > > [2] http://lists.busybox.net/pipermail/buildroot/2020-May/282766.html
> > > [3] https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
> > > [4] 
> > > https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/Make-lang.in;h=bfae6fd2549c4f728816cd355fa9739dcc08fcde;hb=033eb5671769a4c681a44aad08a454e667e08502#l120
> > > [5] 
> > > https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=033eb5671769a4c681a44aad08a454e667e08502
> > > [6] http://lists.busybox.net/pipermail/buildroot/2020-May/283213.html
> > > 
> > > Signed-off-by: Romain Naour <romain.naour@gmail.com>
> > > Cc: Ben Dakin-Norris <ben.dakin-norris@navtechradar.com>
> > > Cc: Maxim Kochetkov <fido_max@inbox.ru>
> > > Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > > Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> > > Cc: Cc: David Malcolm <dmalcolm@gcc.gnu.org>
> > > ---
> > > This patch should be backported to gcc 10 and gcc 9.
> > > ---
> > >  gcc/ChangeLog   | 5 +++++
> > >  gcc/Makefile.in | 6 ++++--
> > >  2 files changed, 9 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> > > index 977e7664b62..c3bb18f2afd 100644
> > > --- a/gcc/ChangeLog
> > > +++ b/gcc/ChangeLog
> > > @@ -1,3 +1,8 @@
> > > +2020-05-21  Romain Naour <romain.naour@gmail.com>
> > > +
> > > +	* Makefile.in: move SELFTEST_DEPS before including language
> > > +	makefile fragments.
> > THanks.  I've installed this on the trunk.
> 
> Many thanks for merging the patch!
> 
> But I don't see the commit log I've written to explain the issue.
> Was there a reason to drop it?
As a project we're still trying to sort out the right level of verbosity of the
commit log.  I tend to use short ones.

jeff
> 


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

* Re: [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments
  2020-06-03 20:24     ` Jeff Law
@ 2020-07-08 19:41       ` Romain Naour
  0 siblings, 0 replies; 10+ messages in thread
From: Romain Naour @ 2020-07-08 19:41 UTC (permalink / raw)
  To: law, gcc-patches
  Cc: Yann E . MORIN, Maxim Kochetkov, Thomas Petazzoni,
	Ben Dakin-Norris, Cc : David Malcolm

Le 03/06/2020 à 22:24, Jeff Law a écrit :
> On Wed, 2020-06-03 at 21:56 +0200, Romain Naour wrote:
>> Hi Jeff,
>>
>> Le 03/06/2020 à 20:33, Jeff Law a écrit :
>>> On Thu, 2020-05-21 at 17:35 +0200, Romain Naour via Gcc-patches wrote:
>>>> As reported by several Buildroot users [1][2][3], the gcc build
>>>> may fail while running selftests makefile target.
>>>>
>>>> The problem only occurs when ccache is used with gcc 9 and 10,
>>>> probably due to a race condition.
>>>>
>>>> While debuging with "make -p" we can notice that s-selftest-c target
>>>> contain only "cc1" as dependency instead of cc1 and SELFTEST_DEPS [4].
>>>>
>>>>   s-selftest-c: cc1
>>>>
>>>> While the build is failing, the s-selftest-c dependencies recipe is
>>>> still running and reported as a bug by make.
>>>>
>>>>   "Dependencies recipe running (THIS IS A BUG)."
>>>>
>>>> A change [5] in gcc 9 seems to introduce the problem since we can't
>>>> reproduce this problem with gcc 8.
>>>>
>>>> As suggested by Yann E. MORIN [6], move SELFTEST_DEPS before
>>>> including language makefile fragments.
>>>>
>>>> With the fix applied, the s-seltest-c dependency contains
>>>> SELFTEST_DEPS value.
>>>>
>>>>   s-selftest-c: cc1 xgcc specs stmp-int-hdrs ../../gcc/testsuite/selftests
>>>>
>>>> [1] http://lists.busybox.net/pipermail/buildroot/2020-May/282171.html
>>>> [2] http://lists.busybox.net/pipermail/buildroot/2020-May/282766.html
>>>> [3] https://github.com/cirosantilli/linux-kernel-module-cheat/issues/108
>>>> [4] 
>>>> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/c/Make-lang.in;h=bfae6fd2549c4f728816cd355fa9739dcc08fcde;hb=033eb5671769a4c681a44aad08a454e667e08502#l120
>>>> [5] 
>>>> https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=033eb5671769a4c681a44aad08a454e667e08502
>>>> [6] http://lists.busybox.net/pipermail/buildroot/2020-May/283213.html
>>>>
>>>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>>>> Cc: Ben Dakin-Norris <ben.dakin-norris@navtechradar.com>
>>>> Cc: Maxim Kochetkov <fido_max@inbox.ru>
>>>> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
>>>> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
>>>> Cc: Cc: David Malcolm <dmalcolm@gcc.gnu.org>
>>>> ---
>>>> This patch should be backported to gcc 10 and gcc 9.
>>>> ---
>>>>  gcc/ChangeLog   | 5 +++++
>>>>  gcc/Makefile.in | 6 ++++--
>>>>  2 files changed, 9 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>>>> index 977e7664b62..c3bb18f2afd 100644
>>>> --- a/gcc/ChangeLog
>>>> +++ b/gcc/ChangeLog
>>>> @@ -1,3 +1,8 @@
>>>> +2020-05-21  Romain Naour <romain.naour@gmail.com>
>>>> +
>>>> +	* Makefile.in: move SELFTEST_DEPS before including language
>>>> +	makefile fragments.
>>> THanks.  I've installed this on the trunk.
>>
>> Many thanks for merging the patch!
>>
>> But I don't see the commit log I've written to explain the issue.
>> Was there a reason to drop it?
> As a project we're still trying to sort out the right level of verbosity of the
> commit log.  I tend to use short ones.

This patch should be backported to gcc 10 and 9.

Best regards,
Romain

> 
> jeff
>>
> 


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

end of thread, other threads:[~2020-07-08 19:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 15:35 [PATCH] gcc/Makefile.in: move SELFTEST_DEPS before including language makefile fragments Romain Naour
2020-05-21 17:31 ` Richard Biener
2020-05-21 17:41   ` Jeff Law
2020-05-30 11:32     ` Romain Naour
2020-05-21 22:13 ` David Malcolm
2020-05-27 12:04   ` Romain Naour
2020-06-03 18:33 ` Jeff Law
2020-06-03 19:56   ` Romain Naour
2020-06-03 20:24     ` Jeff Law
2020-07-08 19:41       ` Romain Naour

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