https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116378
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Gaius Mulley <ga...@gcc.gnu.org>: https://gcc.gnu.org/g:5a809d4196577bb9f0c18d6f569acade6d1541f9 commit r14-10989-g5a809d4196577bb9f0c18d6f569acade6d1541f9 Author: Gaius Mulley <gaiusm...@gmail.com> Date: Tue Nov 26 15:56:48 2024 +0000 [PATCH] PR modula2/116378 m2 bootstrap fails on x86_64-darwin This patch fixes m2 bootstrap failure on x86_64-darwin. libc_open is defined with three parameters the last of which is an int for portability (rather than a vararg). This avoids portability problems by promoting mode_t to an int. In the future it could be tidied up by using the m2 optarg extension. gcc/m2/ChangeLog: PR modula2/116378 * gm2-libs-iso/TermFile.mod (termOpen): Add third argument for open. * gm2-libs/libc.def (open): Remove vararg and use INTEGER for mode parameter three. * mc-boot-ch/Glibc.c (tracedb_open): Replace mode_t with int. (libc_open): Rewrite without varargs. * mc-boot/Glibc.h (libc_open): Replace varargs with int mode. * pge-boot/Glibc.cc (libc_open): Rewrite. * pge-boot/Glibc.h (libc_open): Replace varargs with int mode. gcc/testsuite/ChangeLog: PR modula2/116378 * gm2/extensions/run/pass/testopen.mod: Add third argument for open. * gm2/isolib/run/pass/openlibc.mod: Ditto. * gm2/pim/run/pass/testaddr3.mod: Ditto. (cherry picked from commit 9cdde72d1cefdf2ffff52ad2eec1ff465dccb3ab) Signed-off-by: Gaius Mulley <gaiusm...@gmail.com>