Skip to content

Improve cross-compilation argument - #5

Merged
jserv merged 1 commit into
sysprog21:mainfrom
rota1001:main
Mar 21, 2026
Merged

Improve cross-compilation argument#5
jserv merged 1 commit into
sysprog21:mainfrom
rota1001:main

Conversation

@rota1001

@rota1001 rota1001 commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

Previously, the arguments for cross-compilation were not intuitive, requiring users to read the build script to figure them out.

For example, the aarch target has to be built with the following commands, which is exhausting:

$ scripts/fetch-lkl.sh aarch64
$ make LKL_DIR=`pwd`/lkl-aarch64 CC=aarch64-linux-gnu-gcc BUILD=release
$ make ALPINE_ARCH=aarch64 rootfs

This changes it to a simple ARCH argument, and the same thing can be done by the following commands:

$ make ARCH=aarch64 CC=aarch64-linux-gnu-gcc
$ make ARCH=aarch64 CC=aarch64-linux-gnu-gcc rootfs

Summary by cubic

Simplified cross-compilation by adding a single ARCH make variable that defaults to uname -m and flows through build, LKL fetch, and rootfs. Building targets like aarch64 is now a one-liner; host builds are unchanged.

  • New Features
    • Plumbed ARCH into LKL_DIR, fetch-lkl.sh (including the fetch-lkl target), and ALPINE_ARCH for mkrootfs.sh.
    • Updated README.md with ARCH/CC examples and Quick Start notes for host vs target rootfs.

Written for commit 535544f. Summary will update on new commits.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="README.md">

<violation number="1" location="README.md:89">
P2: Cross-compilation example omits `BUILD=release`, but default debug build enables ASAN/UBSAN, which can break cross-linking when target sanitizer runtimes are unavailable.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread README.md Outdated

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rebase latest 'main' branch to resolve CI breakage.

Previously, the arguments for cross-compilation were not intuitive,
requiring users to read the build script to figure them out.

This changes it to a simple ARCH argument and updates the document.

Change-Id: Ic1f33fa27e41ed00de1f6e837fea6e9feeffff72
@jserv
jserv merged commit 906cfbb into sysprog21:main Mar 21, 2026
3 checks passed
@jserv

jserv commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Thank @rota1001 for contributing!

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