From 3d1acf4de2b11f4109ad6a342813512c2054ec8d Mon Sep 17 00:00:00 2001 From: tannevaled Date: Thu, 11 Jun 2026 21:04:43 +0200 Subject: [PATCH 1/2] new(acpica.org): iasl ACPI compiler ACPICA provides iasl, the ASL+ compiler EDK II shells out to when turning .asl ACPI tables into .aml during firmware builds. It is not in the pantry yet, so packaging it as a standalone build-time dependency. Darwin/arm64 needs -Wl,-no_fixup_chains: ACPICA keeps unaligned function pointers in __DATA,__const tables that the mach-o chained-fixups format rejects ("pointer not aligned in '_AcpiExDumpNode'"). Co-Authored-By: Claude Opus 4.8 (1M context) --- projects/acpica.org/package.yml | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 projects/acpica.org/package.yml diff --git a/projects/acpica.org/package.yml b/projects/acpica.org/package.yml new file mode 100644 index 0000000000..6c6f5b90d1 --- /dev/null +++ b/projects/acpica.org/package.yml @@ -0,0 +1,57 @@ +# ACPICA — Intel's ACPI Component Architecture. +# +# We package it for one tool in particular: `iasl`, the ASL+ optimizing +# compiler/disassembler. EDK II (tianocore.org/edk2) shells out to it to +# turn `.asl` ACPI tables into `.aml` during firmware builds, so it is a +# build-time dependency there rather than a user-facing package. +# +# Upstream tags switched from `R20YY_MM_DD` to a clean `YYYYMMDD` scheme +# around mid-2025; we only match the latter. + +distributable: + url: git+https://github.com/acpica/acpica + ref: '{{version.raw}}' + +versions: + github: acpica/acpica/tags + match: /^\d{8}$/ + +build: + dependencies: + github.com/westes/flex: '*' + gnu.org/bison: '*' + gnu.org/make: '*' + linux: + gnu.org/gcc: '*' + script: + - run: | + set -e + case "$(uname -s)" in + Darwin) + # ACPICA keeps function pointers in `__DATA,__const` tables + # that aren't 8-byte aligned. The arm64 mach-o linker's + # chained-fixups format requires that alignment and aborts + # with "pointer not aligned in '_AcpiExDumpNode'". Disabling + # chained fixups sidesteps it (lld emits the same advice). + make iasl CC=clang OPT_LDFLAGS="-Wl,-no_fixup_chains" + ;; + *) + # CC defaults to gcc (from gnu.org/gcc above). + make iasl + ;; + esac + mkdir -p "{{prefix}}/bin" + install -m 0755 generate/unix/bin/iasl "{{prefix}}/bin/iasl" + +provides: + - bin/iasl + +test: + - iasl -v + # Compile a trivial SSDT and confirm an .aml falls out. + - | + cat > t.asl <<'ASL' + DefinitionBlock ("", "SSDT", 2, "TEST", "T", 0x1) { Name (X, 0x42) } + ASL + iasl t.asl + test -s t.aml From 5f0f4237d55c3fc0ddc3b4e8e31ffd6fefc04548 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 12 Jun 2026 14:43:38 -0400 Subject: [PATCH 2/2] cleanup --- projects/acpica.org/package.yml | 46 ++++++++++++--------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/projects/acpica.org/package.yml b/projects/acpica.org/package.yml index 6c6f5b90d1..950c8fcbb0 100644 --- a/projects/acpica.org/package.yml +++ b/projects/acpica.org/package.yml @@ -10,7 +10,7 @@ distributable: url: git+https://github.com/acpica/acpica - ref: '{{version.raw}}' + ref: "{{version.tag}}" versions: github: acpica/acpica/tags @@ -18,30 +18,18 @@ versions: build: dependencies: - github.com/westes/flex: '*' - gnu.org/bison: '*' - gnu.org/make: '*' + github.com/westes/flex: "*" + gnu.org/bison: "*" linux: - gnu.org/gcc: '*' + gnu.org/gcc: "*" + env: + darwin: + EXTRA_MAKEFLAGS: + - CC=clang + - OPT_LDFLAGS="-Wl,-no_fixup_chains" script: - - run: | - set -e - case "$(uname -s)" in - Darwin) - # ACPICA keeps function pointers in `__DATA,__const` tables - # that aren't 8-byte aligned. The arm64 mach-o linker's - # chained-fixups format requires that alignment and aborts - # with "pointer not aligned in '_AcpiExDumpNode'". Disabling - # chained fixups sidesteps it (lld emits the same advice). - make iasl CC=clang OPT_LDFLAGS="-Wl,-no_fixup_chains" - ;; - *) - # CC defaults to gcc (from gnu.org/gcc above). - make iasl - ;; - esac - mkdir -p "{{prefix}}/bin" - install -m 0755 generate/unix/bin/iasl "{{prefix}}/bin/iasl" + - make iasl $EXTRA_MAKEFLAGS + - install -Dm0755 generate/unix/bin/iasl "{{prefix}}/bin/iasl" provides: - bin/iasl @@ -49,9 +37,9 @@ provides: test: - iasl -v # Compile a trivial SSDT and confirm an .aml falls out. - - | - cat > t.asl <<'ASL' - DefinitionBlock ("", "SSDT", 2, "TEST", "T", 0x1) { Name (X, 0x42) } - ASL - iasl t.asl - test -s t.aml + - run: cp $FIXTURE t.asl + fixture: + extname: asl + content: DefinitionBlock ("", "SSDT", 2, "TEST", "T", 0x1) { Name (X, 0x42) } + - iasl t.asl + - test -s t.aml