TUESDAY, SEPTEMBER 29, 2026
cobol
Cobol: Disable lib{compat,posix} when requested
GCC's Cobol compiler now allows disabling libcompat and libposix.
The GCC Cobol compiler has been updated to allow disabling the libcompat and libposix libraries. Previously, while other standard libraries could be disabled, these two were not. This change ensures consistency in library management for Cobol projects.
In Details
This commit modifies gcobolspec.cc to respect existing driver options that disable standard libraries, now including libcompat and libposix. Previously, these were implicitly linked. This change aligns Cobol's library selection with other GCC language front-ends.
For Context
- libcompat
- A compatibility library for the GCC Cobol compiler, providing functions that may not be part of the standard but are expected by some applications.
- libposix
- A library for the GCC Cobol compiler that provides POSIX bindings, enabling Cobol programs to interact with POSIX-compliant operating system services.
- driver options
- Command-line flags passed to the GCC driver that control compiler behavior, library linking, and output generation.