[Toybox] [PATCH] Fix toysh build on OpenBSD

Avery Terrel averymt at proton.me
Sun Sep 28 23:53:01 PDT 2025


This fixes building, at least, toysh on OpenBSD (7.7) with
allnoconfig+CONFIG_SH=y. Some other toys are broken currently as
documented in PR #505. Hopefully this is more acceptable since
it touches far fewer files.
As an aside, building with both the default CC=`clang` (16.0.6) and
CC=`clang-19` (19.1.7) result in stripped toybox not being recognized
as executable, but I didn't investigate further. It's unlikely,
but possible, that my system is subtly broken and causing this.

# ./toybox sh
exec: Failed to execute process: './toybox' the file could not be run by the operating system.
exec: Maybe the interpreter directive (#! line) is broken?
# ldd toybox
toybox:
toybox: Exec format error
toybox: exit status 1
# file toybox
toybox: ELF 64-bit LSB shared object, x86-64, version 1
# generated/unstripped/toybox sh
$
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-toysh-build-on-OpenBSD.patch
Type: application/octet-stream
Size: 1875 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20250929/aa60f913/attachment.obj>


More information about the Toybox mailing list