diff --git a/gcc/cobol/.gitignore b/gcc/cobol/.gitignore index b9dc95a2c638e5e079083f39e7aa31e2b231989d..4c805d51bb19943e856904329ed2d078d304c0ce 100644 --- a/gcc/cobol/.gitignore +++ b/gcc/cobol/.gitignore @@ -10,5 +10,3 @@ nist/obj dump.txt .gawk_history .gawkrc -charmaps-dupe.cc -valconv-dupe.cc diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog index 620265df68eeee11497c362bcb614bf344908c12..1f507b1dda96a4ab98ee7ae7cb08a889db963145 100644 --- a/gcc/cobol/ChangeLog +++ b/gcc/cobol/ChangeLog @@ -1,3 +1,8 @@ +2025-02-25 Robert Dubner <rdubner@symas.com> + * Added -m32 error message processing to gcobolspec.cc + * Put charmaps-dupe.cc and valconv-dupe.cc into the repository + * Modify cobol/Make-lang.in comments to reflect -dupe changes + 2025-02-17 Robert Dubner <rdubner@symas.com> * Moved #include <math.h> from genapi.cc to cobol-system.h as #include <cmath> diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in index 4fb9f389dc92ab261b5d07e916979608bdd0c0ba..c26cb57a7bf848e0220032b476bd3fc760aeb890 100644 --- a/gcc/cobol/Make-lang.in +++ b/gcc/cobol/Make-lang.in @@ -82,24 +82,31 @@ cobol1_OBJS = \ cobol/symbols.o \ cobol/symfind.o \ cobol/util.o \ - cobol/charmaps-dupe.o \ - cobol/valconv-dupe.o \ + cobol/charmaps.o \ + cobol/valconv.o \ $(END) # -# There is source code in libgcobol/charmaps.cc and libgcobol/valconv.cc -# that needs to be compiled into both libgcobol and cobol1. The following -# recipes make copies of those two source code files from libgcobol to here in -# the gcc/cobol build tree. This avoids the nightmare of one file appearing in -# more than one place. +# There is source code in libgcobol/charmaps.cc and +# libgcobol/valconv.cc that needs to be compiled into both libgcobol +# and cobol1. We copy those two source code files from libgcobol to +# here to avoid the nightmare of one file appearing in more than one +# place. For simplicity, we make those compilations dependent on all +# of the libgcobol/*.h files, which might lead to the occasional +# unnecessary compilation. The impact of that is negligible. # -$(srcdir)/cobol/charmaps-dupe.cc: $(LIB_SOURCE)/charmaps.cc - echo "// DO NOT EDIT THIS FILE. It was copied from the libgcobol directory." > $@ - tail -n +2 $< >> $@ +cobol/charmaps.cc: $(LIB_SOURCE)/charmaps.cc + cp $^ $@ -$(srcdir)/cobol/valconv-dupe.cc: $(LIB_SOURCE)/valconv.cc - echo "// DO NOT EDIT THIS FILE. It was copied from the libgcobol directory." > $@ - tail -n +2 $< >> $@ +cobol/valconv.cc: $(LIB_SOURCE)/valconv.cc + echo "RUN IN CIRCLES SCREAM AND SHOUT**********************************" + cp $^ $@ + +LIB_SOURCE_H=$(wildcard $(LIB_SOURCE)/*.h) + +cobol/charmaps.o: cobol/charmaps.cc $(LIB_SOURCE_H) + +cobol/valconv.o: cobol/valconv.cc $(LIB_SOURCE_H) # # These are the object files for creating the gcobol.exe "driver" diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc index cdf811030b1ab6a5d218d4df726435216856bf45..1f612ca1865a93f5eeda5efa6fcea49e73d4c15d 100644 --- a/gcc/cobol/gcobolspec.cc +++ b/gcc/cobol/gcobolspec.cc @@ -571,6 +571,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, // Don't pass this one on to cobol1 break; + case OPT_m32: + error ( "unrecognized command-line option %<-%s%>; " + "(32-bit executables cannot be generated)", "m32"); + break; + default: append_arg(decoded_options[i]); break; diff --git a/libgcobol/ChangeLog b/libgcobol/ChangeLog index 196e0bcff8d9b54d6d655758f24cd09b0cfafc8f..aebc35e996d2c2848503ca531fa1067364715195 100644 --- a/libgcobol/ChangeLog +++ b/libgcobol/ChangeLog @@ -1,3 +1,7 @@ +2025-02-25 Robert Dubner <rdubner@symas.com> + * Fixed a bad $(wildcard ...) assigment in Makefile.in by including the + missing $(srcdir) prefix. + 2025-02-20 Robert Dubner <rdubner@symas.com> * Tweaked configure.tgt to not use ac_cv_sizeof_void_p , which is empty diff --git a/libgcobol/Makefile.in b/libgcobol/Makefile.in index a9c35deff4432361a42e412a54fc2534636255be..0ba769daae2e09f450f370026c9b941722f89bf2 100644 --- a/libgcobol/Makefile.in +++ b/libgcobol/Makefile.in @@ -105,7 +105,7 @@ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean #LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall -GCOBOL_HFILES=$(wildcard *.h) +GCOBOL_HFILES=$(wildcard $(srcdir)/*.h) VERSION_SUFFIX = $(shell echo $(LIBGCOBOL_VERSION) | tr ':' '.' ) @@ -139,8 +139,6 @@ OBJS = \ $(patsubst %.cc,%.lo,$(C_SOURCE_FILES)) -# $(OBJS) : $(GCOBOL_HFILES) - ## ## The rules to build ##