diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index b81e61fdb7..a639792504 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -560,7 +560,7 @@ python () {
             if re.match(need_machine, m):
                 break
         else:
-            raise bb.parse.SkipRecipe("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE'))
+            raise bb.parse.SkipRecipe(f"incompatible with machine {d.getVar('MACHINE')} (not in COMPATIBLE_MACHINE), mc: {d.getVar('BB_CURRENT_MC')}")

     source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False) or d.getVar('PARSE_ALL_RECIPES', False)
     if not source_mirror_fetch:
diff --git a/meta/lib/oeqa/selftest/cases/multiconfig.py b/meta/lib/oeqa/selftest/cases/multiconfig.py
index f509cbf607..c74bbd2fcf 100644
--- a/meta/lib/oeqa/selftest/cases/multiconfig.py
+++ b/meta/lib/oeqa/selftest/cases/multiconfig.py
@@ -85,3 +85,24 @@ BBMULTICONFIG = "muslmc"

         # Build a core-image-minimal, only dry run needed to check config is present
         bitbake('mc:muslmc:bash -n')
+
+    def test_multiconfig_skip_recipe(self):
+        config = """
+BBMULTICONFIG = "musl"
+"""
+        self.write_config(config)
+
+        muslconfig = """
+MACHINE = "qemumips"
+DISTRO = "poky"
+TCLIBC = "musl"
+TMPDIR = "${TOPDIR}/tmp-mc-musl"
+"""
+        self.write_config(muslconfig, 'musl')
+
+        # Write a recipe that is not compatible with qemux86-64
+        self.write_recipeinc('m4', 'COMPATIBLE_MACHINE="qemuarm"')
+
+        m = bitbake("m4 -n")
+        m = [line for line in m.output.splitlines() if "MACHINE=" in line]
+
