[PATCH 3/9] clang: Don't look for libgcc

Tom Rini trini at konsulko.com
Thu Apr 6 01:48:53 CEST 2023


In the case of using clang to build, and having not already enabled the
private libgcc, do not look for it, as it will not be found nor
required.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 97a84ae3131e..b5063446ff85 100644
--- a/Makefile
+++ b/Makefile
@@ -894,8 +894,10 @@ u-boot-main := $(libs-y)
 ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
 PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
 else
+ifndef CONFIG_CC_IS_CLANG
 PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
 endif
+endif
 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 
 ifdef CONFIG_CC_COVERAGE
-- 
2.34.1



More information about the U-Boot mailing list