On Wed, Mar 16, 2022 at 02:34:09PM -0400, James K. Lowden wrote: > [I sent this to gcc-help by mistake. I'm reposting it here in case > anyone has a suggestion. I did take dje's advice, and deleted the build > directory, except that I preserved config.status and regenerated > Makefile. The observed behavior remains unchanged. TIA.] > > https://git.symas.net:443/cobolworx/gcc-cobol/ > > My first question regards command-line options. I've had no trouble > defining switches (-f-foo), but no luck defining an option that takes > an argument. The latter are accepted by gcobol and not passed to > cobol1.
Let's avoid -f-foo; use -ffoo instead, like the rest of GCC. > In cobol/lang.opt, I have: > > indicator-column Make this 'findicator-column='. Does that help? > Cobol Joined Separate UInteger Var(indicator_column) Init(0) > IntegerRange(0, 8) -indicator-column=<n> Column after which > Region B begins > > strace(1) shows the problem: > > [pid 683008] execve("../../../build/gcc/gcobol", > ["../../../build/gcc/gcobol", "-main", "-o", "obj/SG105A", "-B", > "../../../build/gcc/", "-f-flex-debug", "-f-yacc-debug", > "-indicator-column", "1", "cbl/SG105A.cbl", "-lgcobol", "-lm", "-ldl"], > 0x55a19b487940 /* 36 vars */ <unfinished ...> > > gcobol is being invoked with 3 options used by cobol1: > "-f-flex-debug", "-f-yacc-debug", "-indicator-column", "1" > > where -indicator-column takes an argument, "1". But it's not passed to > cobol1: > > [pid 683008] <... execve resumed>) = 0 > [pid 683009] execve("../../../build/gcc/cobol1", > ["../../../build/gcc/cobol1", "cbl/SG105A.cbl", "-quiet", "-dumpbase", > "SG105A.cbl", "-main", "-mtune=generic", "-march=x86-64", "-auxbase", > "SG105A", "-f-flex-debug", "-f-yacc-debug", "-o", "/tmp/ccIBQZv1.s"], > 0x1578290 /* 40 vars */ <unfinished ...> > > The stanza in cobol/lang.opt looks similar to others in > fortran/lang.opt. The gcc internals don't mention anything else that I > could find that needs to be done. I've done a complete rebuild after > "make distclean". And still no joy. doc/options.texi describes options relative well, I think. > We are working with a gcc fork of 10.2. Our log message says (in part): > > The "tiny" branch was started with the 10.2.1 > origin/releases/gcc-10 branch> c806314b32987096d79de21e72dc0cf783e51d57) > > What am I missing, please? > > --jkl > Marek