Skip to content

builder: honor caller-supplied cross toolchain and PKG_CONFIG - #36

Merged
l5yth merged 2 commits into
l5yth:mainfrom
rgrizzell:cross-toolchain-env
Aug 24, 2026
Merged

l5yth merged 2 commits into
l5yth:mainfrom
rgrizzell:cross-toolchain-env

Conversation

@rgrizzell

@rgrizzell rgrizzell commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Read TARGET_* from the environment and override the SCons defaults when set, so external build systems (OpenWRT, Yocto, Debian rules) can cross-compile ArduLinux with their own toolchain. Resolve pkg-config via $PKG_CONFIG so libgpiod is detected against the target sysroot rather than the build host. All overrides are optional; host builds are unaffected.

rgrizzell and others added 2 commits July 26, 2026 00:02
Read TARGET_CC/TARGET_CXX/TARGET_AR/TARGET_RANLIB from the environment and
override the SCons defaults when set, so external build systems (OpenWRT,
Yocto, Debian rules) can cross-compile ArduLinux with their own toolchain.
Resolve pkg-config via $PKG_CONFIG so libgpiod is detected against the target
sysroot rather than the build host. All overrides are optional; host builds
are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The v2 getLine() paths returned the result of gpiod_chip_request_lines()
without checking for NULL, so a line that cannot be acquired (already held by
another process or a kernel driver) surfaced later as an assertion failure in
gpiod_line_request_reconfigure_lines() rather than a clear error. Mirror the v1
path: throw std::invalid_argument naming the line and chip so the caller sees
"cannot acquire GPIO line N on <chip> (already in use?)".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@l5yth
l5yth merged commit a16aafc into l5yth:main Aug 24, 2026
4 checks passed
@rgrizzell
rgrizzell deleted the cross-toolchain-env branch August 24, 2026 16:18
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