gcc: ldgram.c: No such file or directory [Was: gcc: arparse.c: No such file or directory]

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gcc: ldgram.c: No such file or directory [Was: gcc: arparse.c: No such file or directory]

Christian Joensson-2
2009/9/1 Christian Joensson <[hidden email]>:
> 2009/8/31 Ralf Wildenhues <[hidden email]>:
>
>> OK, thanks.  Can you try if the following patch fixes it?
>
> yep, works for me. thanks.

shoot, got bitten again, now at this place:

Making all in po
make[4]: Entering directory `/usr/local/src/trunk/objdir-binutils/ld/po'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/usr/local/src/trunk/objdir-binutils/ld/po'
make[4]: Entering directory `/usr/local/src/trunk/objdir-binutils/ld'
gcc -DHAVE_CONFIG_H -I. -I../../src/ld  -I. -I../../src/ld -I../bfd
-I../../src/ld/../bfd -I../../src/ld/../include  -g -O2
-DLOCALEDIR="\"/usr/local/gnu/share/locale\""  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -MT ldgram.o
-MD -MP -MF .deps/ldgram.Tpo -c -o ldgram.o ldgram.c -Wno-error
gcc: ldgram.c: No such file or directory
gcc: no input files
make[4]: *** [ldgram.o] Error 1
make[4]: Leaving directory `/usr/local/src/trunk/objdir-binutils/ld'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/src/trunk/objdir-binutils/ld'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/src/trunk/objdir-binutils/ld'
make[1]: *** [all-ld] Error 2
make[1]: Leaving directory `/usr/local/src/trunk/objdir-binutils'
make: *** [all] Error 2

--
Cheers,

/ChJ
Reply | Threaded
Open this post in threaded view
|

Re: gcc: ldgram.c: No such file or directory [Was: gcc: arparse.c: No such file or directory]

Ralf Wildenhues
* Christian Joensson wrote on Tue, Sep 01, 2009 at 07:17:48AM CEST:

> shoot, got bitten again, now at this place:
>
> gcc -DHAVE_CONFIG_H -I. -I../../src/ld  -I. -I../../src/ld -I../bfd
> -I../../src/ld/../bfd -I../../src/ld/../include  -g -O2
> -DLOCALEDIR="\"/usr/local/gnu/share/locale\""  -W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -MT ldgram.o
> -MD -MP -MF .deps/ldgram.Tpo -c -o ldgram.o ldgram.c -Wno-error
> gcc: ldgram.c: No such file or directory
> gcc: no input files
> make[4]: *** [ldgram.o] Error 1
> make[4]: Leaving directory `/usr/local/src/trunk/objdir-binutils/ld'

This patch (to be squashed in with the other) should fix the remaining
instances.  OK?

Thanks,
Ralf

gas/ChangeLog:
2009-09-01  Ralf Wildenhues  <[hidden email]>

        * Makefile.am (m68k-parse.o, bfin-lex.o, itbl-lex.o, itbl-parse.o):
        Supply correct source file name for generated files which may be
        in $(srcdir).
        * Makefile.in: Regenerate.

ld/ChangeLog:
2009-09-01  Ralf Wildenhues  <[hidden email]>

        * Makefile.am (ldgram.o, ldlex.o, deffilep.o): Supply correct
        source file name for generated files which may be in $(srcdir).
        * Makefile.in: Regenerate.

diff --git a/gas/Makefile.am b/gas/Makefile.am
index b8e86b1..a76860f 100644
--- a/gas/Makefile.am
+++ b/gas/Makefile.am
@@ -586,14 +586,14 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
 # yacc will produce working code which contain compile time warnings.
 m68k-parse.o: m68k-parse.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ m68k-parse.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c m68k-parse.c $(NO_WERROR)
+ $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
 endif
 
 # Don't let the .y.h rule clobber m68k-parse.h.
@@ -613,14 +613,14 @@ bfin-lex.c: $(srcdir)/config/bfin-lex.l
  $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE)
 bfin-lex.o: bfin-lex.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c bfin-lex.c $(NO_WERROR)
+ $(COMPILE) -c `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
 endif
 
 # The instruction table specification lexical analyzer and parser.
@@ -629,28 +629,28 @@ endif
 # yacc will produce working code which contain compile time warnings.
 itbl-lex.o: itbl-lex.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-lex.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c itbl-lex.c $(NO_WERROR)
+ $(COMPILE) -c `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
 endif
 
 # Disable -Werror, if it has been enabled, since old versions of bison/
 # yacc will produce working code which contain compile time warnings.
 itbl-parse.o: itbl-parse.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-parse.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c itbl-parse.c $(NO_WERROR)
+ $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
 endif
 
 itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 1469015..7c4444b 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -469,38 +469,38 @@ STAGESTUFF = *.o ldscripts/* e*.c
 # yacc will produce working code which contain compile time warnings.
 ldgram.o: ldgram.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ ldgram.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='ldgram.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c ldgram.c $(NO_WERROR)
+ $(COMPILE) -c `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
 endif
 
 ldlex.o: ldlex.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ ldlex.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldlex.c || echo $(srcdir)/`ldlex.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='ldlex.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c ldlex.c $(NO_WERROR)
+ $(COMPILE) -c `test -f ldlex.c || echo $(srcdir)/`ldlex.c $(NO_WERROR)
 endif
 
 deffilep.o: deffilep.c
 if am__fastdepCC
- $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ deffilep.c $(NO_WERROR)
+ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
  mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 else
 if AMDEP
  source='deffilep.c' object='$@' libtool=no @AMDEPBACKSLASH@
  DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 endif
- $(COMPILE) -c deffilep.c $(NO_WERROR)
+ $(COMPILE) -c `test -f deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
 endif
 
 # At the moment this is just a list of those emulation template files
Reply | Threaded
Open this post in threaded view
|

Re: gcc: ldgram.c: No such file or directory [Was: gcc: arparse.c: No such file or directory]

Alan Modra
On Tue, Sep 01, 2009 at 08:04:55AM +0200, Ralf Wildenhues wrote:
> This patch (to be squashed in with the other) should fix the remaining
> instances.  OK?

Yes.  Ralf, I think you should just commit any needed changes to
binutils makefiles under the obvious rule.

--
Alan Modra
Australia Development Lab, IBM
Reply | Threaded
Open this post in threaded view
|

Re: gcc: ldgram.c: No such file or directory [Was: gcc: arparse.c: No such file or directory]

Christian Joensson-2
In reply to this post by Ralf Wildenhues
FWIW, today's snapshot works fine for me.

2009/9/1, Ralf Wildenhues <[hidden email]>:

> * Christian Joensson wrote on Tue, Sep 01, 2009 at 07:17:48AM CEST:
>> shoot, got bitten again, now at this place:
>>
>> gcc -DHAVE_CONFIG_H -I. -I../../src/ld  -I. -I../../src/ld -I../bfd
>> -I../../src/ld/../bfd -I../../src/ld/../include  -g -O2
>> -DLOCALEDIR="\"/usr/local/gnu/share/locale\""  -W -Wall
>> -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -MT ldgram.o
>> -MD -MP -MF .deps/ldgram.Tpo -c -o ldgram.o ldgram.c -Wno-error
>> gcc: ldgram.c: No such file or directory
>> gcc: no input files
>> make[4]: *** [ldgram.o] Error 1
>> make[4]: Leaving directory `/usr/local/src/trunk/objdir-binutils/ld'
>
> This patch (to be squashed in with the other) should fix the remaining
> instances.  OK?
>
> Thanks,
> Ralf
>
> gas/ChangeLog:
> 2009-09-01  Ralf Wildenhues  <[hidden email]>
>
> * Makefile.am (m68k-parse.o, bfin-lex.o, itbl-lex.o, itbl-parse.o):
> Supply correct source file name for generated files which may be
> in $(srcdir).
> * Makefile.in: Regenerate.
>
> ld/ChangeLog:
> 2009-09-01  Ralf Wildenhues  <[hidden email]>
>
> * Makefile.am (ldgram.o, ldlex.o, deffilep.o): Supply correct
> source file name for generated files which may be in $(srcdir).
>         * Makefile.in: Regenerate.
>
> diff --git a/gas/Makefile.am b/gas/Makefile.am
> index b8e86b1..a76860f 100644
> --- a/gas/Makefile.am
> +++ b/gas/Makefile.am
> @@ -586,14 +586,14 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
>  # yacc will produce working code which contain compile time warnings.
>  m68k-parse.o: m68k-parse.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ m68k-parse.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f
> m68k-parse.c || echo $(srcdir)/`m68k-parse.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='m68k-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c m68k-parse.c $(NO_WERROR)
> + $(COMPILE) -c `test -f m68k-parse.c || echo $(srcdir)/`m68k-parse.c
> $(NO_WERROR)
>  endif
>
>  # Don't let the .y.h rule clobber m68k-parse.h.
> @@ -613,14 +613,14 @@ bfin-lex.c: $(srcdir)/config/bfin-lex.l
>   $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c --
> $(LEXCOMPILE)
>  bfin-lex.o: bfin-lex.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ bfin-lex.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f
> bfin-lex.c || echo $(srcdir)/`bfin-lex.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='bfin-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c bfin-lex.c $(NO_WERROR)
> + $(COMPILE) -c `test -f bfin-lex.c || echo $(srcdir)/`bfin-lex.c
> $(NO_WERROR)
>  endif
>
>  # The instruction table specification lexical analyzer and parser.
> @@ -629,28 +629,28 @@ endif
>  # yacc will produce working code which contain compile time warnings.
>  itbl-lex.o: itbl-lex.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-lex.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f
> itbl-lex.c || echo $(srcdir)/`itbl-lex.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='itbl-lex.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c itbl-lex.c $(NO_WERROR)
> + $(COMPILE) -c `test -f itbl-lex.c || echo $(srcdir)/`itbl-lex.c
> $(NO_WERROR)
>  endif
>
>  # Disable -Werror, if it has been enabled, since old versions of bison/
>  # yacc will produce working code which contain compile time warnings.
>  itbl-parse.o: itbl-parse.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ itbl-parse.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f
> itbl-parse.c || echo $(srcdir)/`itbl-parse.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='itbl-parse.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c itbl-parse.c $(NO_WERROR)
> + $(COMPILE) -c `test -f itbl-parse.c || echo $(srcdir)/`itbl-parse.c
> $(NO_WERROR)
>  endif
>
>  itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
> diff --git a/ld/Makefile.am b/ld/Makefile.am
> index 1469015..7c4444b 100644
> --- a/ld/Makefile.am
> +++ b/ld/Makefile.am
> @@ -469,38 +469,38 @@ STAGESTUFF = *.o ldscripts/* e*.c
>  # yacc will produce working code which contain compile time warnings.
>  ldgram.o: ldgram.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ ldgram.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldgram.c
> || echo $(srcdir)/`ldgram.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='ldgram.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c ldgram.c $(NO_WERROR)
> + $(COMPILE) -c `test -f ldgram.c || echo $(srcdir)/`ldgram.c $(NO_WERROR)
>  endif
>
>  ldlex.o: ldlex.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ ldlex.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f ldlex.c
> || echo $(srcdir)/`ldlex.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='ldlex.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c ldlex.c $(NO_WERROR)
> + $(COMPILE) -c `test -f ldlex.c || echo $(srcdir)/`ldlex.c $(NO_WERROR)
>  endif
>
>  deffilep.o: deffilep.c
>  if am__fastdepCC
> - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ deffilep.c
> $(NO_WERROR)
> + $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f
> deffilep.c || echo $(srcdir)/`deffilep.c $(NO_WERROR)
>   mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
>  else
>  if AMDEP
>   source='deffilep.c' object='$@' libtool=no @AMDEPBACKSLASH@
>   DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
>  endif
> - $(COMPILE) -c deffilep.c $(NO_WERROR)
> + $(COMPILE) -c `test -f deffilep.c || echo $(srcdir)/`deffilep.c
> $(NO_WERROR)
>  endif
>
>  # At the moment this is just a list of those emulation template files
>


--
Cheers,

/ChJ