42 Commits
Author SHA1 Message Date
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 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 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 7b03781b5e Keep arm64->x86 Windows build cross
An arm64 build machine only runs x86/x86_64 under emulation, so
adapting it to the host collapsed the compat build into an emulated
native build using the x64 toolchain. Keep it a real cross build so
build-time tools stay native arm64.
2026-07-16 13:23:03 +02:00
Ole André Vadla Ravnås 938651d1e8 machine_spec: Fix cross-compilation on Windows
When potentially adapting the build machine to the host machine, make
sure the host machine's operating system is the same.
2026-01-15 14:46:58 +01:00
Cheng Yang ac3224e8e3 Add support for VisionOS (#17) 2025-07-25 09:43:36 +02:00
zetier-hg 90a7f7e4f1 Support 'armv6kz-' prefixed toolchains (#12) 2025-07-06 16:24:00 +02:00
Ori Perry a62d71df97 Fix typings for Python < 3.9 (#14) 2025-07-06 16:21:49 +02:00
Ole André Vadla Ravnås e10baa39a2 machine_spec: Fix Windows architecture detection
We cannot rely on the Python process' architecture, as it might be
an x86_64 build running emulated on an arm64 system.
2025-06-05 13:42:03 +02:00
Ole André Vadla Ravnås b0c1fdab06 machine_spec: Support armbe8 in the triplet logic 2025-03-18 07:24:40 +01:00
Ole André Vadla Ravnås cf556a7f42 machine_spec: Fix the arm64beilp32 logic
To account for ILP32 actually being specified by the system part.
2025-03-17 23:24:42 +01:00
Ole André Vadla Ravnås 623fa742d4 machine_spec: Fix armhf triplet parsing for musl 2025-03-15 21:19:57 +00:00
WorksButNotTested 4f2bf8ca1b Add support for arm64beilp32 (#10) 2025-03-12 13:39:58 +01:00
WorksButNotTested 0107acaf0b Add support for arm64be (#9) 2025-03-12 08:57:51 +01:00
Ole André Vadla Ravnås b35f35262c machine_spec: Detect musl when running on Linux 2025-03-04 14:06:23 +00:00
WorksButNotTested 846ba5012a machine_spec: Fix support for ARM BE8 (#8) 2025-01-05 21:52:33 +01:00
WorksButNotTested 05df68cf21 Support PowerPC 2024-11-14 00:25:14 +01:00
Ole André Vadla Ravnås 43b24d329f machine_spec: Consider x86* as native on Windows
In case of arm64 we assume that we're building on Windows >= 11, which
means that the OS supports emulation.
2024-07-19 11:25:38 +02:00
Ole André Vadla Ravnås 9ba3c20d55 machine_spec: Fix msvc_platform computed for arm64 2024-07-18 11:38:36 +02:00
Ole André Vadla Ravnås 10eebbf030 machine_spec: Adapt to host when equal and triplet set
So the triplet is used for the build machine when not cross-compiling.
This is important so we use the correct toolchain in such cases.
2024-05-14 11:27:49 +00:00
Ole André Vadla Ravnås d48dfa2ebe machine_spec: Fix architecture detection on Linux/ARM 2024-05-14 06:46:32 +02:00
Ole André Vadla Ravnås 1a1ffeba9c machine_spec: Tweak ordering of module members 2024-04-19 10:46:11 +02:00
Ole André Vadla Ravnås eda85082a3 machine_spec: Adapt Windows build machine to host if arch matches
Differences in only the config, i.e. the particular C runtime, don't
matter. There's no need for a cross-compilation setup in such cases.
2024-04-17 14:02:50 +02:00
Ole André Vadla Ravnås ce647a1446 machine_spec: Add meson_optimization_options
To avoid duplicating defaults in two different places.
2024-04-16 12:12:47 +02:00
Ole André Vadla Ravnås 9466dc1c3b machine_spec: Fold vscrt into config
To simplify things.
2024-04-16 12:12:47 +02:00
Ole André Vadla Ravnås d50f40293c machine_spec: Remove default config logic from factory methods
As it will be applied by a later call to default_missing().
2024-04-16 10:56:53 +02:00
Ole André Vadla Ravnås ca584e1b1b machine_spec: Add default_missing()
To consolidate handling of default config and vscrt.
2024-04-16 10:55:18 +02:00
Ole André Vadla Ravnås c09386382e machine_spec: Tweak method ordering 2024-04-16 10:49:35 +02:00
Ole André Vadla Ravnås 3e27e7f0df machine_spec: Add vscrt to identifier when using MSVC 2024-04-15 23:48:10 +02:00
Ole André Vadla Ravnås e548eb35d4 machine_spec: Add evolve()
Inspired by Meson's OptionKey.evolve().
2024-04-15 23:13:48 +02:00
Ole André Vadla Ravnås 1a3c46446d machine_spec: Add vscrt property to MachineSpec 2024-04-15 23:00:18 +02:00
Ole André Vadla Ravnås 16c0b3d332 machine_spec: Tweak naming and style 2024-04-15 22:51:33 +02:00
Ole André Vadla Ravnås 244660ee78 configure: Move build machine adaptation logic to MachineSpec 2024-04-06 00:31:13 +02:00
Ole André Vadla Ravnås 301bba416b machine_spec: Improve type annotation coverage 2024-04-06 00:30:05 +02:00
Ole André Vadla Ravnås c0d33960ae machine_spec: Remove msvs_platform property 2024-04-05 23:58:47 +02:00
Ole André Vadla Ravnås 69810fbb9b machine_spec: Add toolchain_can_strip property 2024-04-04 21:36:50 +00:00
Ole André Vadla Ravnås 5eae88029b machine_spec: Change MinGW config name to mingw
Regardless of architecture.
2024-04-04 21:36:50 +00:00
Ole André Vadla Ravnås 67c9b414cd env: Move detect_machine() to MachineSpec 2024-04-04 21:36:50 +00:00
Ole André Vadla Ravnås f446c42cbf env: Move libdatadir logic to MachineSpec 2024-04-03 13:16:14 +02:00
Ole André Vadla Ravnås b129340883 machine_spec: Add pointer_size property 2024-03-27 13:38:10 +01:00
Ole André Vadla Ravnås 441d32997c machine_spec: Fix handling of aarch64 triplets 2024-02-12 22:19:34 +00:00
Ole André Vadla Ravnås 10392268ce Refactor to improve portability
- Add modules to assist with autoconf-style CLI wrappers.
- Implement deps.sync() for non-Windows.
- Improve devkit.py to support using pkg-config on Windows.
2024-02-12 14:13:47 +01:00