Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Ensure tools/kconfig submodule is initialized
ifeq ($(wildcard tools/kconfig/menuconfig.py),)
$(shell git submodule update --init tools/kconfig)
endif

-include .config

check_goal := $(strip $(MAKECMDGOALS))
Expand Down Expand Up @@ -189,7 +184,12 @@ endif

KCONFIGLIB := tools/kconfig/kconfiglib.py
$(KCONFIGLIB):
git submodule update --init tools/kconfig
@if [ -d .git ]; then \
git submodule update --init tools/kconfig; \
else \
echo "Error: Kconfig tools not found"; \
exit 1; \
fi

# Load default configuration
.PHONY: defconfig
Expand Down
2 changes: 1 addition & 1 deletion mk/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ _cmd_compile.cxx.host = $(HOSTCXX) $(__HOSTARCHFLAGS) $(__CXXFLAGS) $($1_arc
$$($1_$$<_cxxflags-y) $($1_includes) -c -o $$@ $$<
_cmd_link.cxx.host = $(HOSTCXX) $(__HOSTARCHFLAGS) $(__CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends_y),$$^) \
$($1_archflags) $($1_ldflags) $(__LDFLAGS)
_cmd_link_so.cxx.host = $(HOSTCXX) $(__HOSTARCHFLAGS) $(__CXXFLAGS)$($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends_y),$$^) \
_cmd_link_so.cxx.host = $(HOSTCXX) $(__HOSTARCHFLAGS) $(__CXXFLAGS) $($1_libraries) -o $$@ $$(filter-out __FORCE $($1_depends_y),$$^) \
$($1_archflags) $($1_ldflags) $$(filter-out -static,$(__LDFLAGS)) -shared $$(if $($1_soname-y),-Wl$$(comma)-soname$$(comma)$($1_soname-y),)

_cmd_ar = $(AR) rcs $$@ $$(filter-out __FORCE $($1_depends_y),$$^)
Expand Down
4 changes: 2 additions & 2 deletions mk/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ifndef CXX
CXX := $(CROSS_COMPILE)g++
endif
ifeq ("$(CC_IS_CLANG)", "1")
override CXX := $(dir $(CC))$(subst clang,clang++,$(notdir $(CC)))
override CXX := $(subst clang,clang++,$(CC))
Copy link

@cubic-dev-ai cubic-dev-ai bot Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substituting "clang" across the full CC path rewrites directory components (e.g. /usr/local/clang+llvm/bin/clang becomes /usr/local/clang+++llvm/bin/clang++), so clang++ cannot be located on such installations; please limit the substitution to the basename.

Prompt for AI agents
Address the following comment on mk/toolchain.mk at line 28:

<comment>Substituting &quot;clang&quot; across the full CC path rewrites directory components (e.g. `/usr/local/clang+llvm/bin/clang` becomes `/usr/local/clang+++llvm/bin/clang++`), so clang++ cannot be located on such installations; please limit the substitution to the basename.</comment>

<file context>
@@ -25,7 +25,7 @@ ifndef CXX
 endif
 ifeq (&quot;$(CC_IS_CLANG)&quot;, &quot;1&quot;)
-override CXX := $(dir $(CC))$(subst clang,clang++,$(notdir $(CC)))
+override CXX := $(subst clang,clang++,$(CC))
 endif
 
</file context>
Suggested change
override CXX := $(subst clang,clang++,$(CC))
override CXX := $(dir $(CC))$(subst clang,clang++,$(notdir $(CC)))
Fix with Cubic

endif

ifndef CPP
Expand Down Expand Up @@ -81,5 +81,5 @@ HOSTSTRIP := $(HOST_COMPILE)strip
endif

ifndef HOSTOBJCOPY
HOSTOBJCOPY:= $(HOST_COMPILE)objcpy
HOSTOBJCOPY := $(HOST_COMPILE)objcopy
endif