Skip to content

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Oct 16, 2025

  • Remove duplicate git submodule initialization from Makefile header
  • Consolidate submodule init logic into $(KCONFIGLIB) target with proper error handling

Summary by cubic

Refined the build system by moving Kconfig submodule init into the KCONFIGLIB target with clear error handling, and fixed small toolchain/linker issues to prevent build failures.

  • Refactors

    • Consolidated Kconfig submodule init into $(KCONFIGLIB) with a .git check and explicit error on missing repo.
  • Bug Fixes

    • Added missing space in _cmd_link_so.cxx.host to avoid merged flags.
    • Simplified clang++ resolution: derive CXX by substituting in CC.
    • Corrected HOSTOBJCOPY typo (objcpy -> objcopy).

- Remove duplicate git submodule initialization from Makefile header
- Consolidate submodule init logic into $(KCONFIGLIB) target with proper
  error handling
@jserv jserv merged commit 2e75289 into main Oct 16, 2025
6 checks passed
@jserv jserv deleted the refine-build-system branch October 16, 2025 09:36
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="mk/toolchain.mk">

<violation number="1" location="mk/toolchain.mk:28">
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.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants