Commit Graph
1910 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås d184afbf21 deps: Bump libunwind to a4523a9 2026-09-22 15:54:58 +02:00
Ole André Vadla Ravnås bf6bac3a71 deps: Bump QuickJS to 5925b48 2026-09-22 15:54:53 +02:00
Ole André Vadla Ravnås 1415e16c1f deps: Bump libffi to 3fe3257 2026-09-22 15:54:48 +02:00
Ole André Vadla Ravnås 963fe3826f deps: Bump lwIP to 9122f0d 2026-09-09 00:50:45 +02:00
Ole André Vadla Ravnås cbeb00e54c deps: Bump GLib to 129e8d9 2026-09-09 00:50:30 +02:00
Ole André Vadla Ravnås 4780992736 deps: Bump QuickJS to fd4842d 2026-09-09 00:50:19 +02:00
Ole André Vadla Ravnås d8cc0743d1 deps: Build a slimmer Capstone for Barebone SDKs
Registration is required and Gum registers the one it runs on, so the
other architectures were unreachable weight: 29 MB of archive down to
4.4. This only makes sense on non-Barebone, where we also build tools
that work cross-arch, such as gum-graft.
2026-09-08 17:07:11 +02:00
Ole André Vadla Ravnås f5f0a2edb0 Let GLib use the C library's printf
GLib cannot run its C99 probes when cross-compiling and falls back to
gnulib's printf, whose frames are 1.8 KiB where picolibc's are 240
bytes. Say what the freestanding libc offers, and ask picolibc for the
positional arguments GLib wants before it will take them.

Put GLib on a diet there too: it skips the locale conversion in
g_strerror() and the filename display in the file-error path, which is
what drags libiconv in.
2026-09-08 15:21:39 +02:00
Ole André Vadla Ravnås a317d0bc26 env: Sign pointers in a kernel SDK again
Rust signs no function pointer, so what is linked beside it was
built not to either. That left Gum unable to speak the ABI at all:
its trampolines returned to signed pointers as if they were plain,
and NativePointer#sign did nothing.

Sign, but leave out the type discrimination the kernel's own ABI
uses: a union of differently typed function pointers is how QuickJS
dispatches, and it cannot survive a discriminator per type. What
crosses to the kernel is signed where it crosses, as before.
2026-09-02 18:26:13 +02:00
Ole André Vadla Ravnås a489078862 deps: Bump compiler-rt to 6694311 2026-09-02 00:28:43 +02:00
Ole André Vadla Ravnås c43b80fe2d Support a bare ARMv7-A machine
The generic ARM flags name armv5t, which has neither Thumb-2 nor the
divide a Cortex-A7 has, and nothing took the float out of the ABI.
Clang also wants the eabi environment rather than elf.
2026-09-02 00:15:36 +02:00
Ole André Vadla Ravnås eadac6ee42 deps: Bump SQLite to ef9edc7 2026-09-01 21:37:07 +02:00
Ole André Vadla Ravnås 00feaf81eb deps: Bump lwIP to 971a7d0 2026-09-01 15:14:52 +02:00
Ole André Vadla Ravnås 7a6bf9e73b deps: Bump GLib to 35d30c9 2026-09-01 15:14:36 +02:00
Ole André Vadla Ravnås ad368d15e9 deps: Bump picolibc to e89d30c 2026-09-01 15:14:03 +02:00
Ole André Vadla Ravnås d883f2236e env: Leave stack probes out of kernel builds
Nothing a kext may link against exports ___chkstk_darwin, so a
kernel collection holding one that needs it will not build.
2026-08-27 19:41:15 +02:00
Ole André Vadla Ravnås b0109c235e deps: Bump lwIP to 2265eb7 2026-08-27 18:25:03 +02:00
Ole André Vadla Ravnås a3652ca930 deps: Bump GLib to 4b0af0a 2026-08-27 18:24:47 +02:00
Ole André Vadla Ravnås a62a9648b7 deps: Bump minizip-ng to 3a87bc9 2026-08-27 18:24:33 +02:00
Ole André Vadla Ravnås e6285c6d3c deps: Bump TinyCC to 3da7432 2026-08-27 18:24:25 +02:00
Ole André Vadla Ravnås f7d30a8ddb deps: Bump QuickJS to 080f16a 2026-08-27 18:24:24 +02:00
Ole André Vadla Ravnås 3cde13484b deps: Bump libiconv to cc24563 2026-08-27 18:24:17 +02:00
Ole André Vadla Ravnås 9600e26274 deps: Bump compiler-rt to 15e5d07 2026-08-27 18:24:15 +02:00
Ole André Vadla Ravnås 3d7da40367 deps: Bump picolibc to 901a484 2026-08-27 18:24:01 +02:00
Ole André Vadla Ravnås de49bff33d env: Keep -dead_strip off bare-metal links
The flavor is detected from the driver's own linker, which on macOS
is Apple's, while a bare-metal target links with LLD. LLD refuses
the option, so every link probe fails and each feature behind one
is detected as missing.
2026-08-27 17:46:13 +02:00
Ole André Vadla Ravnås 9cdc0c0e43 env: Drop pointer signing for a kernel SDK
Rust's arm64e signs no function pointer and authenticates none, so
what is linked beside it must not either. Sign what crosses to the
kernel where it crosses.
2026-08-27 17:46:13 +02:00
Ole André Vadla Ravnås 983eb7432a deps: Let an SDK be built for a Darwin kernel
Compile a machine whose config is kernel with the kernel's ABI,
against no system headers, and against the prefix being filled:
picolibc and the compiler-rt builtins are packages here, as they
are for a machine with no operating system at all.

Say the system is none, which is what a Darwin kernel is to
anything built here, and leave out the packages that belong to an
operating system.

Make a link work, since a build system asks its questions by
linking one: no dynamic linker, and the entry point named.
2026-08-27 17:45:36 +02:00
Ole André Vadla Ravnås 30a82e7a98 devkit: Carry GUnixFDMessage on POSIX
GIO's own gio.h pulls in the rest of the UNIX half but leaves this
one out, so a devkit had no way to hand a descriptor to a peer over
a socket.
2026-08-18 15:26:23 +02:00
Ole André Vadla Ravnås 0cb8c69c7c Make bare addressing an explicit config tag
Read the config as a set of tags, thus a bare flavor says in its name
whether its code is position-independent: softfloat becomes
softfloat_nopic, and softfloat_msabi becomes softfloat_pic_msabi. This
also gives x86 a position-independent flavor, which it had no way to
name before.

A bare target is soft-float in each case now, thus remove the newlib
path that the other targets took.
2026-08-17 11:58:21 +02:00
Ole André Vadla Ravnås de9af916dc deps: Bump TinyCC to ca5ee01 2026-08-16 22:22:11 +02:00
Ole André Vadla Ravnås f6b1b84279 Say what a bare-metal target needs to be built
The SDK that would have supplied a compiler is what is being built,
so either a triplet names the toolchain or the tools are named
outright. "No C compiler found" on a box full of them helps nobody.
2026-08-16 18:04:05 +02:00
Ole André Vadla Ravnås c17fd5c7c4 Add a bare x86_64 flavor for Windows kernels
The one we had suits a Linux module: System V, and not position
independent — the module loader resolves no GOT relocation, and the
kernel code model expects the top 2GB. A Windows kernel follows
another convention, and the agent's text is mapped a second time
into each instrumented process, shared, so that flavor is position
independent instead.

Soft float is what kernel mode means rather than what either
convention says, so both carry it. The convention is a property of
the machine rather than the toolchain, so it rides in the machine
file for whoever generates or inspects the code.
2026-08-16 18:03:59 +02:00
Ole André Vadla Ravnås 0ad9eef364 Link the bare soft-float flavor no-pie
Everything in it is built -fno-pic, so a distribution whose driver
defaults to PIE rejects the resulting R_386_32 relocations outright.
Only 32-bit x86 minds, its addressing having nowhere else to go.

Straight to the linker: clang swallows the driver spelling when it is
gcc doing the link.
2026-08-13 17:53:44 +02:00
Ole André Vadla Ravnås 96822d2d1f deps: Bump lwIP to 0217c5d 2026-08-13 16:19:09 +02:00
Ole André Vadla Ravnås aebf2c982f deps: Bump GLib to 9ba86ea 2026-08-13 16:18:51 +02:00
Ole André Vadla Ravnås b04f261133 deps: Bump lwIP to fed6118 2026-08-13 13:34:00 +02:00
Ole André Vadla Ravnås ffe2787c0b deps: Bump GLib to 90899c5 2026-08-13 13:33:47 +02:00
Ole André Vadla Ravnås a43eaeea59 deps: Bump libffi to 2b42587 2026-08-13 13:33:29 +02:00
Ole André Vadla Ravnås 133da80486 deps: Bump picolibc to d755323 2026-08-13 12:56:44 +02:00
Ole André Vadla Ravnås b2d3be9088 Add the none-x86-softfloat flavor
Share the soft-float flags both x86 bitnesses need and keep the
64-bit-only ones — the red zone, the kernel code model and the IBT
pair — with x86_64. clang has no i386 bare-metal triple under the
arch's own name, so map it to i686, and skip the hard-float arch
flags, which -mfpmath=sse would contradict.
2026-08-13 12:52:01 +02:00
Ole André Vadla Ravnås 8c538efb90 deps: Bump lwIP to 953b5a1 2026-08-13 00:17:37 +02:00
Ole André Vadla Ravnås 8de84b4d79 deps: Bump GLib to b9f6f85 2026-08-13 00:17:24 +02:00
Ole André Vadla Ravnås 26d4a545ef deps: Bump libffi to 816aca8 2026-08-13 00:17:04 +02:00
Ole André Vadla Ravnås 8d9cddd772 Compile x86_64 softfloat without jump tables
A jump table is reached by an indirect jump, which the compiler marks
notrack and an IBT kernel does not permit, having left NOTRACK_EN clear.
Its own C is compiled this way for the same reason.
2026-08-12 22:22:28 +02:00
Ole André Vadla Ravnås acaad16801 Add none-x86_64-softfloat support
Soft-float on x86_64 is LLVM's +soft-float feature, which is what Rust's
own x86_64-unknown-none turns on, so both halves of a kernel-mode build
agree on where a double travels. -mno-sse alone does not reach the ABI.
long double has to be narrowed as well: soft-float has no lowering for
x87's 80-bit format, and LLVM crashes selecting it.

Only clang's bare-metal driver searches the sysroot on its own, and it
picks that driver for arm64 but not for x86_64, hence spelling out both
paths.
2026-08-12 19:30:26 +02:00
Ole André Vadla Ravnås 478e0fe0e6 deps: Bump lwIP to 6cb7bc6 2026-08-11 11:35:49 +02:00
Ole André Vadla Ravnås fd85d6f7e9 deps: Bump GLib to 119122a 2026-08-11 11:35:33 +02:00
Ole André Vadla Ravnås 1d4d9efb76 deps: Bump QuickJS to 152f678 2026-08-11 11:35:15 +02:00
Ole André Vadla Ravnås c9cc18138b Keep the libc out of devkit headers
The SDK puts it inside the tree the devkit inlines from, so a bare-metal
target ended up with half of picolibc pasted into the header and the
other half missing. It is the consumer's libc to provide.
2026-08-04 14:13:09 +02:00
Ole André Vadla Ravnås 17698fb564 Use the SDK as sysroot when building softfloat
Only the roll had one, through the environment, so every other build
looked for the libc beside the compiler and found nothing.
2026-08-04 13:44:56 +02:00