On Fri, Mar 28, 2025 at 01:51:23PM +0100, Richard Biener wrote:
> This adds gcc/cobol/parse.o to compare_exclusions and makes sure to
> ignore errors when copying generated files, like it's done when
> copying gengtype-lex.cc.
> 
> Bootstrapped on x86_64-unknown-linux-gnu.
> 
> OK?
> 
>       PR bootstrap/119513
>       * configure.ac (compare_exclusions): Add gcc/cobol/parse\$(objext).
>       * configure: Regenerated.
> 
> gcc/cobol/
>       * Make-lang.in (cobol.srcextra): Use cp instead of ln, ignore
>       errors.

IMHO sed would still be better, but because we don't do that for
gengtype-lex.{l,cc} either, this is ok for now.

Looking at the gcc-14.2.0 tarball (which was rolled by me), I see
/d/gcc-14.2.0/gcc-14.2.0
paths (I use -d /d so that it is short where /d is just a symlink somewhere
/else), the only place where
/d/gcc-14.2.0/gcc-14.2.0
appears in the tarball is 59x in gcc/gengtype-lex.cc
all in
#line NN "/d/gcc-14.2.0/gcc-14.2.0/gcc/gengtype-lex.l"
So, changing that to
#line NN "gengtype-lex.l"
would be IMHO quite useful.
For cobol/parse.cc perhaps go with
#line NN "cobol/parse.y"
and similarly for cobol/cdf.cc and cobol/scan.cc.

Maybe best to do that in the
gcc.srcextra: gengtype-lex.cc
        -cp -p $^ $(srcdir)
and
cobol.srcextra: cobol/parse.cc cobol/cdf.cc cobol/scan.cc
        -cp -p $^ cobol/parse.h cobol/cdf.h $(srcdir)/cobol/
rules?

The relative or absolute paths from build directories to source directories
perhaps make sense in the build directories, but certainly not in the source
directories.

        Jakub

Reply via email to