From 6a6f81518c9a2edf45bc656adeba778272c7cc8a Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Wed, 22 Feb 2023 17:15:34 +0100
Subject: [PATCH] [machdep] cleanup compilation artifacts in make_machdep
 script

---
 share/machdeps/make_machdep/make_machdep.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/share/machdeps/make_machdep/make_machdep.py b/share/machdeps/make_machdep/make_machdep.py
index 810acc91eb8..a5fbaa1eaea 100755
--- a/share/machdeps/make_machdep/make_machdep.py
+++ b/share/machdeps/make_machdep/make_machdep.py
@@ -245,6 +245,7 @@ for (f, typ) in source_files:
     if args.verbose:
         print(f"[INFO] running command: {' '.join(cmd)}")
     proc = subprocess.run(cmd, capture_output=True)
+    Path(f).with_suffix(".o").unlink(missing_ok=True)
     if typ == "has__builtin_va_list":
         # Special case: compilation success determines presence or absence
         machdep["has__builtin_va_list"] = proc.returncode == 0
-- 
GitLab