Skip to content

build_config: drop the host build from the IntelEdison config - #7247

Merged
matz merged 1 commit into
mruby:masterfrom
takumin:intel-edison-drop-host
Aug 18, 2026
Merged

build_config: drop the host build from the IntelEdison config#7247
matz merged 1 commit into
mruby:masterfrom
takumin:intel-edison-drop-host

Conversation

@takumin

@takumin takumin commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

build_config/IntelEdison.rb opens an anonymous MRuby::Build ahead of its CrossBuild, and an unnamed build is called host (lib/mruby/build.rb:114). The build tree is keyed by that name (:127), so MRUBY_CONFIG=IntelEdison aims a build carrying MRB_USE_READLINE and mruby-hs-regexp at build/host, on top of whatever a default build has left there. This is the same shape as #7195, #7197, #7199 and #7200, on a config none of them touches, and the last of the cross configs to have it.

Where the block comes from

It dates from a27426a (2016), when a cross build took its mrbc from MRuby.targets['host'] and nowhere else, so every cross config declared a host build to have one. 1520c97 (2020) made that unnecessary and deleted the block from the eight other cross configs of the time (ArduinoDue, IntelGalileo, RX630, three android configs, chipKITMax32, dreamcast_shelf); this one, the only one with a comment header above the block rather than the block at line 1, kept it. Nothing here has needed it since: the cross build carries default.gembox, and with mruby-bin-mrbc in it, CrossBuild#bind_mrbc_host generates an mrbc build of its own where the config declares no host (:712). Every other cross config in build_config/ is written that way.

So rather than naming a host build that has nothing left to do, this deletes it, as 1520c97 did.

What the block does on master

Run from a clean tree, the config does not get past it. The host build defines MRB_USE_READLINE, which mirb has not taken since 527018c, and aborts before the cross target is reached:

$ MRUBY_CONFIG=IntelEdison rake -j16
...
CPP   mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.c -> build/host/mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.pi
mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.c:45:10: error: #include expects "FILENAME" or <FILENAME>
   45 | #include MRB_READLINE_HEADER
      |          ^~~~~~~~~~~~~~~~~~~
rake aborted!
$ ls build/
core2-32-poky-linux  host  repos

Verified

Without it, the same run reaches the cross target and stops where a machine without the Edison SDK has to stop, on the cross compiler, and build/host is not created:

$ MRUBY_CONFIG=IntelEdison rake -j16
GIT   https://github.com/pbosetti/mruby-hs-regexp.git -> build/repos/core2-32-poky-linux/mruby-hs-regexp
CPP   mrbgems/mruby-bigint/core/bigint.c -> build/core2-32-poky-linux/mrbgems/mruby-bigint/core/bigint.pi
sh: 1: /opt/poky-edison/1.7.2/sysroots/i386-pokysdk-darwin/usr/bin/i586-poky-linux/i586-poky-linux-gcc: not found
rake aborted!
$ ls build/
core2-32-poky-linux  repos

The mrbc the cross target compiles its Ruby with is the generated one, built with the host gcc into the directory that mechanism names:

$ MRUBY_CONFIG=IntelEdison rake -j16 "$PWD/build/mrbc/default/bin/mrbc"   # exit 0
...
LD    build/mrbc/default/bin/mrbc
$ ls build/
core2-32-poky-linux  mrbc  repos

The cross target itself still carries MRB_USE_READLINE, and will fail on the same mirb line once the SDK is present; that is the target's own define, and out of the scope of removing a host build that duplicated it.

Environment

Details
OS Ubuntu 24.04.4 LTS
Kernel Linux 7.0.0-29-generic x86_64
CPU AMD Ryzen 9 5950X, 16 cores / 32 threads
C compiler gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
binutils GNU ld (GNU Binutils) 2.47.20260726
CRuby running rake ruby 4.0.6 (2026-07-14 revision 03b6d3f889) +PRISM

The one build that compiles here is the generated mrbc/default; the line it gives mrbgems/mruby-compiler/src/codegen.c, read off the .flags record beside the object, the -I list and -o dropped:

# mrbc/default
gcc -std=gnu99 -g -O3 -Wall -Wundef -Werror-implicit-function-declaration -Wwrite-strings -DMRB_NO_GEMS -DPRISM_XALLOCATOR -DPRISM_DEPTH_MAXIMUM=256 -DPRISM_BUILD_MINIMAL -DMRBGEM_MRUBY_COMPILER_VERSION=0.0.0 -MMD -c mrbgems/mruby-compiler/src/codegen.c

Summary by CodeRabbit

  • Chores
    • Removed the standalone default GCC build configuration.
    • Retained support for Intel Edison cross-builds.

build_config/IntelEdison.rb opened an anonymous `MRuby::Build` ahead of
its `CrossBuild`, and an unnamed build is called 'host'
(lib/mruby/build.rb:114).  The build tree is keyed by that name (:127),
so MRUBY_CONFIG=IntelEdison aimed a build carrying `MRB_USE_READLINE`
and mruby-hs-regexp at build/host, on top of whatever a default build
had left there.

The block dates from a27426a (2016), when a cross build took its mrbc
from `MRuby.targets['host']` and nowhere else, so every cross config
declared a host build to have one.  1520c97 (2020) made that
unnecessary and deleted the block from the eight other cross configs of
the time; this one, the only one with a comment header above the block
rather than the block at line 1, kept it.  Nothing here has needed it
since: the cross build carries `default.gembox`, and with `mruby-bin-mrbc`
in it, `CrossBuild#bind_mrbc_host` generates an mrbc build of its own
where the config declares no host (:712).  Every other cross config in
build_config/ is written that way.

Delete the block, as 1520c97 did.  On master, run from a clean tree, the
config does not get past it: the host build defines `MRB_USE_READLINE`,
which mirb has not taken since 527018c, and aborts before the cross
target is reached:

    $ MRUBY_CONFIG=IntelEdison rake -j16
    ...
    CPP   mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.c -> build/host/mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.pi
    mrbgems/mruby-bin-mirb/tools/mirb/mirb_completion.c:45:10: error: #include expects "FILENAME" or <FILENAME>
       45 | #include MRB_READLINE_HEADER
    rake aborted!
    $ ls build/
    core2-32-poky-linux  host  repos

Without it, the same run reaches the cross target and stops where a
machine without the Edison SDK has to stop, on the cross compiler, and
build/host is not created:

    $ MRUBY_CONFIG=IntelEdison rake -j16
    GIT   https://github.com/pbosetti/mruby-hs-regexp.git -> build/repos/core2-32-poky-linux/mruby-hs-regexp
    CPP   mrbgems/mruby-bigint/core/bigint.c -> build/core2-32-poky-linux/mrbgems/mruby-bigint/core/bigint.pi
    sh: 1: /opt/poky-edison/1.7.2/sysroots/i386-pokysdk-darwin/usr/bin/i586-poky-linux/i586-poky-linux-gcc: not found
    rake aborted!
    $ ls build/
    core2-32-poky-linux  repos

The mrbc the cross target compiles its Ruby with is the generated one,
built with the host gcc into the directory that mechanism names:

    $ MRUBY_CONFIG=IntelEdison rake -j16 "$PWD/build/mrbc/default/bin/mrbc"
    ...
    LD    build/mrbc/default/bin/mrbc
    $ ls build/
    core2-32-poky-linux  mrbc  repos

The cross target itself still carries `MRB_USE_READLINE`, and will fail
on the same mirb line once the SDK is present; that is the target's own
define, out of the scope of removing a host build that duplicated it.
@takumin
takumin requested a review from matz as a code owner August 18, 2026 00:54
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5c6b1dcc-e4ea-40d1-be90-553e5b2d7312

📥 Commits

Reviewing files that changed from the base of the PR and between 1ae98a3 and 1ef6b0c.

📒 Files selected for processing (1)
  • build_config/IntelEdison.rb
💤 Files with no reviewable changes (1)
  • build_config/IntelEdison.rb

Included review availability: Your plan includes up to 8 reviews per rolling hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

Removed the standalone default GCC MRuby::Build configuration from build_config/IntelEdison.rb. The Intel Edison cross-build configuration remains.

Changes

Cohort / File(s) Summary
Build configuration cleanup
build_config/IntelEdison.rb
Removes the default GCC build, readline defines, duplicate default gembox setup, and mruby-hs-regexp declaration.
Estimated code review effort: 1 (Trivial) ~2 minutes

Merge Risk: ⚪ Minimal · up to 1ef6b

This localized build-configuration change removes an obsolete host build while preserving the cross-target build path; no actionable merge-blocking risk remains after normal checks.

Suggested labels: build

Suggested reviewers: matz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the removal of the host build from the Intel Edison configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the build label Aug 18, 2026
@matz
matz merged commit 0122b45 into mruby:master Aug 18, 2026
20 of 21 checks passed
@takumin
takumin deleted the intel-edison-drop-host branch August 18, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants