diff --git a/.gitignore b/.gitignore index 49d6418cdc..0ec796976e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Cache files __pycache__/ .pyc +.DS_Store # Text editor remnants .vscode/ diff --git a/tools/m2ctx.py b/tools/m2ctx.py index 279209c709..7a35c0434c 100755 --- a/tools/m2ctx.py +++ b/tools/m2ctx.py @@ -25,7 +25,7 @@ def get_c_file(directory): def import_c_file(in_file): in_file = os.path.relpath(in_file, root_dir) - cpp_command = ["cpp", "-P", "-Iinclude", "-Isrc", "-undef", "-D__sgi", "-D_LANGUAGE_C", + cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-undef", "-D__sgi", "-D_LANGUAGE_C", "-DNON_MATCHING", "-D_Static_assert(x, y)=", "-D__attribute__(x)=", in_file] try: return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8")