See: https://trac.macports.org/ticket/71165 Upstream did not accept this solution nor provided other useful comments and/or fix. --- mesonbuild/compilers/mixins/clike.py.orig 2026-01-06 09:36:39 +++ mesonbuild/compilers/mixins/clike.py 2026-01-06 09:47:23 @@ -1209,7 +1209,8 @@ commands = self.get_exelist(ccache=False) + ['-v', '-E', '-'] commands += self.get_always_args() # Add CFLAGS/CXXFLAGS/OBJCFLAGS/OBJCXXFLAGS from the env - commands += self.environment.coredata.get_external_args(self.for_machine, self.language) + # 'std=c++','std=gnu++' are valid for C++/ObjC++ but not for 'C' + commands += [x for x in self.environment.coredata.get_external_args(self.for_machine, self.language) if '-std=c++' not in x and '-std=gnu++' not in x] mlog.debug('Finding framework path by running: ', ' '.join(commands), '\n') os_env = os.environ.copy() os_env['LC_ALL'] = 'C'