GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gcc

Modula-2 build: Replace bash with sh for portability

Modula-2 build process now uses 'sh' instead of 'bash' for wider compatibility.

The build process for the Modula-2 language support in GCC has been updated to use the POSIX-standard sh shell instead of bash. This change, addressing PR127359, improves portability by ensuring the build can succeed on systems where bash may not be installed or located in the default path.

In Details

This patch addresses PR modula2/127359 by replacing direct invocations of bash with sh in the Makefiles for the Modula-2 library (libgm2). This change enhances the build system's portability, allowing the Modula-2 support to be built on systems that may not have bash available in the standard PATH.

For Context
Modula-2
A procedural programming language designed by Niklaus Wirth, emphasizing structured programming and modularity. GCC includes support for this language.
bash
Bourne Again SHell. A widely used command-line interpreter and scripting language for Unix-like operating systems.
sh
Bourne Shell. The original Unix shell, often considered a more minimal and POSIX-compliant alternative to bash.
Makefile
A file used by the make build automation tool to define dependencies and commands for compiling and linking software projects.
libgm2
The library providing support for the Modula-2 language within the GCC compiler.
Filed Under: modula2buildportability