From 8b7cdff18a63736903764038326ceb8ecda2286f Mon Sep 17 00:00:00 2001
From: mikee47 <mike@sillyhouse.net>
Date: Fri, 14 Oct 2022 09:34:30 +0100
Subject: [PATCH] Fix `make[1]: cc: Command not found` during clean

---
 Sming/Arch/Esp8266/Components/libc/component.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Sming/Arch/Esp8266/Components/libc/component.mk b/Sming/Arch/Esp8266/Components/libc/component.mk
index 930c83d177..8e5247d0f3 100644
--- a/Sming/Arch/Esp8266/Components/libc/component.mk
+++ b/Sming/Arch/Esp8266/Components/libc/component.mk
@@ -13,6 +13,8 @@ LIBDIRS					+= $(COMPONENT_PATH)/lib
 EXTRA_LIBS				+= microc microgcc setjmp
 endif
 
+ifndef MAKE_CLEAN
+
 # build customised libstdc++
 # https://github.com/esp8266/Arduino/blob/master/tools/sdk/lib/README.md
 LIBSTDCPP_SRC = $(call FixPath,$(shell $(CC) -print-file-name=libstdc++.a))
@@ -34,3 +36,5 @@ $(COMPONENT_RULE)$(LIBSTDCPP_DST): $(LIBSTDCPP_SRC)
 COMPONENT_TARGETS += $(LIBSTDCPP_DST)
 
 EXTRA_LIBS += stdc++
+
+endif