https://gcc.gnu.org/g:dcb7009efc5358207d1b0612732a0608915a3ef7

commit r15-9007-gdcb7009efc5358207d1b0612732a0608915a3ef7
Author: Richard Biener <rguent...@suse.de>
Date:   Fri Mar 28 13:48:36 2025 +0100

    bootstrap/119513 - fix cobol bootstrap with 
--enable-generated-files-in-srcdir
    
    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.
    
            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.

Diff:
---
 configure              | 1 +
 configure.ac           | 1 +
 gcc/cobol/Make-lang.in | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index e1063ccd9c3b..036142a8d061 100755
--- a/configure
+++ b/configure
@@ -20030,6 +20030,7 @@ compare_exclusions="gcc/cc*-checksum\$(objext) | 
gcc/ada/*tools/*"
 compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
 compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
 compare_exclusions="$compare_exclusions | gcc/m2/gm2version*"
+compare_exclusions="$compare_exclusions | gcc/cobol/parse\$(objext)"
 case "$target" in
   hppa*64*-*-hpux*) ;;
   powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | 
*libgomp*\$(objext)" ;;
diff --git a/configure.ac b/configure.ac
index eec6f817a4ba..6cf9893cab07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4207,6 +4207,7 @@ compare_exclusions="gcc/cc*-checksum\$(objext) | 
gcc/ada/*tools/*"
 compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
 compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
 compare_exclusions="$compare_exclusions | gcc/m2/gm2version*"
+compare_exclusions="$compare_exclusions | gcc/cobol/parse\$(objext)"
 case "$target" in
   hppa*64*-*-hpux*) ;;
   powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | 
*libgomp*\$(objext)" ;;
diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in
index 5b61ae912192..eb64554f33bc 100644
--- a/gcc/cobol/Make-lang.in
+++ b/gcc/cobol/Make-lang.in
@@ -272,7 +272,7 @@ cobol/scan.o: cobol/scan.cc                 \
 # output, and do not require those tools to be installed.
 #
 cobol.srcextra: cobol/parse.cc cobol/cdf.cc cobol/scan.cc
-       ln -f $^ cobol/parse.h cobol/cdf.h $(srcdir)/cobol/
+       -cp -p $^ cobol/parse.h cobol/cdf.h $(srcdir)/cobol/
 
 
 # And the cobol1 front end

Reply via email to