https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119337
Bug ID: 119337
Summary: cobol: gcobc wrapper should deduce output name
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: cobol
Assignee: unassigned at gcc dot gnu.org
Reporter: simonsobisch at gnu dot org
Target Milestone: ---
gcobol default to an output name of a.out, which is totally fine.
cobc defaults to an output name of
* basename from first source file
* extension matching the other command line options: -C -> basename.$OBJEXT, -x
basename$EXEEXT, -m basename.$DLLEXT, -S basename.s [that last part also works
with cobol1/gcobc]
* only exception: if the first source is stdin "-", then the output name is
"a.out" (and of course: any given -o overrides the default)
To be able to swap cobc with gcobc, the driver script needs to deduce the
output -name the same way.