Patchwork [build] Have s-macro_list depend on cc1

login
register
mail settings
Submitter Rainer Orth
Date March 21, 2014, 5:05 p.m.
Message ID <ydda9cjiit5.fsf@lokon.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/332684/
State New
Headers show

Comments

Rainer Orth - March 21, 2014, 5:05 p.m.
While looking at an unrelated issue, I noticed that the gcc/macro_list
file is empty.  In the build logs, I see

echo | /var/gcc/regression/trunk/10-gcc/build/./gcc/xgcc -B/var/gcc/regression/trunk/10-gcc/build/./gcc/ -E -dM - | \
          sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
                 -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \
          sort -u > tmp-macro_list
xgcc: error trying to exec 'cc1': execvp: No such file or directory

Unlike the other xgcc invocations, this one actually needs cc1 for gcc
-E to work, but lacks the appropriate dependency.

The following patch adds it and indeed macro_list now is non-empty, as
expected.  I'm just not sure if cc1 is the correct one in
gcc/Makefile.in, or if it should rather be $(COMPILERS) instead.

Anyway, with that patch a i386-pc-solaris2.10 bootstrap completed and
the testsuite is now running.

Ok for mainline?

	Rainer


2014-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* Makefile.in (s-macro_list): Depend on cc1.
Paolo Bonzini - March 22, 2014, 8:52 a.m.
Il 21/03/2014 18:05, Rainer Orth ha scritto:
> The following patch adds it and indeed macro_list now is non-empty, as
> expected.  I'm just not sure if cc1 is the correct one in
> gcc/Makefile.in, or if it should rather be $(COMPILERS) instead.
>
> Anyway, with that patch a i386-pc-solaris2.10 bootstrap completed and
> the testsuite is now running.

Can you also test it on a cross, just for the sake of thoroughness?

Paolo
Rainer Orth - March 23, 2014, 8:24 a.m.
Paolo Bonzini <bonzini@gnu.org> writes:

> Il 21/03/2014 18:05, Rainer Orth ha scritto:
>> The following patch adds it and indeed macro_list now is non-empty, as
>> expected.  I'm just not sure if cc1 is the correct one in
>> gcc/Makefile.in, or if it should rather be $(COMPILERS) instead.
>>
>> Anyway, with that patch a i386-pc-solaris2.10 bootstrap completed and
>> the testsuite is now running.
>
> Can you also test it on a cross, just for the sake of thoroughness?

Sure: I've tried a i386-pc-solaris2.11 x sparc-elf cross (binutils only,
not target headers/libs).  It fixed macro_list generation just the same.

	Rainer
Paolo Bonzini - March 23, 2014, 8:45 a.m.
Il 23/03/2014 09:24, Rainer Orth ha scritto:
>>> >> The following patch adds it and indeed macro_list now is non-empty, as
>>> >> expected.  I'm just not sure if cc1 is the correct one in
>>> >> gcc/Makefile.in, or if it should rather be $(COMPILERS) instead.
>>> >>
>>> >> Anyway, with that patch a i386-pc-solaris2.10 bootstrap completed and
>>> >> the testsuite is now running.
>> >
>> > Can you also test it on a cross, just for the sake of thoroughness?
> Sure: I've tried a i386-pc-solaris2.11 x sparc-elf cross (binutils only,
> not target headers/libs).  It fixed macro_list generation just the same.

Ok for trunk, thanks!

Paolo

Patch

# HG changeset patch
# Parent 89bcc5fc68b831f7502e5f546614f8e26010f233
Have s-macro_list depend on cc1

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2653,7 +2653,7 @@  install-gcc-tooldir:
 	$(mkinstalldirs) $(DESTDIR)$(gcc_tooldir)
 
 macro_list: s-macro_list; @true
-s-macro_list : $(GCC_PASSES)
+s-macro_list : $(GCC_PASSES) cc1$(exeext)
 	echo | $(GCC_FOR_TARGET) -E -dM - | \
 	  sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \
 		 -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \