From 1a60ff057a783fef576b44eee3f970207e9291e9 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 18:23:33 +0100 Subject: [PATCH] Package the AArch64 GCC compiler with Vinix runtime paths --- BOOTSTRAP.md | 4 ++++ gcc/PKGBUILD.vile | 16 ++++++++++++---- release-recipes/reuse.tsv | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index aed5a3a..017cf16 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -29,6 +29,10 @@ A fresh signed installation of that GCC revision, `build-base`, BusyBox init and The x86_64 release kernel booted the signed toolchain root from ext2 in QEMU. It compiled and ran all six fixtures with the packaged GCC and Make, including the LTO archive, OpenMP and atomics, transaction total of 128 and Graphite report. The test verified `c89` and `c99` modes and the disk identity. See `tests/toolchain/guest.sh` and `gnu/receipts/native-toolchain-guest-01`, receipt SHA-256 `5e0d737c1243dc8548fb9d905e09b058f637b768343ab49a1665bdd6261e27d5`. +The AArch64 bootstrap ran the built `cc1plus` through the signed musl SDK in QEMU user mode. It compiled a C++17 template and checked a compile-time assertion. The build worksheet supplies the cross-toolchain `objdump` for libcc1 and sets `override SELFTEST_TARGETS :=` in a file passed through GNU Make's `MAKEFILES`. The separate C++ probe uses the target frontend directly. The recursive GCC self-test otherwise invokes the C-only bootstrap driver. See `gnu/arm/build/gcc-r85-retry/cross-selftest`, receipt SHA-256 `c7e4649eef18f5472e7430a50e063addd4717a7a52eb5fa253ec58e02b8393e0`. + +The AArch64 packaging retry uses the signed `gcc-libs` package for the driver check and moves bootstrap-created `usr/lib64` files into `usr/lib` before assigning the runtime files to `gcc-libs`. It compared the unchanged preparation and build recipe phases against the previous checkpoint and reused its objects. The archive contains the GCC and G++ drivers, the libstdc++ development archive and linker symlink, and GCC's `libitm.spec`. The archive `gcc-14.2.0-2-aarch64.pkg.tar.zst` has SHA-256 `0c011186076066158a1c57c968d74c7f97556ad9cc0c2b74e64a5f9d2a7a2ec2`. The clean, signed toolchain install and native QEMU fixture follow this build check. + The static x86_64 `busybox-bootstrap` archive built against the signed musl and Linux headers. A cold signed install verified the one owned ELF and ran its `uname -o` applet. See `foundation/busybox-bootstrap-x86-release-01`, receipt SHA-256 `d6364f5f04fb271a612608121388f5dfef71ece56d5b9bf3371c2223f96a5ad5`. Installing `build-base` by name from a signed x86_64 repository brought in 17 packages. The installed-root audit checked 3,196 owned files and links and 95 target ELFs. ALPM gives the metapackage a zero-byte file list. The auditor checked its archive manifest for package metadata and also rejected an empty file list substituted for the installed musl record. See `foundation/installed-root-meta-02`, receipt SHA-256 `0632e6ff628e031080655367caa4aa01df213d328e32c1bae77a82bd766330f2`. diff --git a/gcc/PKGBUILD.vile b/gcc/PKGBUILD.vile index 151183a..3e84537 100644 --- a/gcc/PKGBUILD.vile +++ b/gcc/PKGBUILD.vile @@ -116,9 +116,8 @@ defpkgbuild(gcc, driver := string-append(build-dir(), "/gcc/xgcc") binaries := string-append("-B", build-dir(), "/gcc/") if cross { - runtime := string-append(build-dir(), "/", triplet) - libraries := string-append(runtime, "/libstdc++-v3/src/.libs:", runtime, "/libgcc") - run("vinix-run", "--library-path", libraries, driver, binaries, "-dumpmachine") + ; Test with the signed gcc-libs dependency used by the installed compiler. + run("vinix-run", driver, binaries, "-dumpmachine") } else { run(driver, binaries, "-dumpmachine") } @@ -127,9 +126,18 @@ defpkgbuild(gcc, run("make", "-C", build-dir(), string-append("DESTDIR=", pkgdir()), "install-gcc", "install-libcc1", "install-lto-plugin", "install-target-libgcc", "install-target-libstdc++-v3", "install-target-libatomic", "install-target-libgomp") run("make", "-C", build-dir(), string-append("DESTDIR=", pkgdir()), itm-compiler(), "install-target-libitm") + libdir := string-append(pkgdir(), "/usr/lib/") + ; The cross bootstrap driver can configure libstdc++ to install in lib64. + ; The target GCC and musl use /usr/lib. + alternate := string-append(pkgdir(), "/usr/lib64") + if cross { + if file-exists?(alternate) { + for-each(fn(file) { run("mv", "-n", "--", file, libdir) }, glob(string-append(alternate, "/*"))) + run("rmdir", "--", alternate) + } + } ; gcc-libs owns the versioned ELF files. Point the development links at ; their SONAMEs so they work with that package's installed filenames. - libdir := string-append(pkgdir(), "/usr/lib/") for-each(fn(lib, version) { linker := string-append(libdir, lib, ".so") soname := string-append(lib, ".so.", version) diff --git a/release-recipes/reuse.tsv b/release-recipes/reuse.tsv index 601edf8..e0d0f45 100644 --- a/release-recipes/reuse.tsv +++ b/release-recipes/reuse.tsv @@ -4,6 +4,7 @@ aarch64 ncurses af06960c8943e24fdeb59c1e56e828fb95fbef75 935eb4b6ad50debef3e9694 aarch64 openssh-client 1a5c5fc72dfb376fb3dfad8efe6d8317a4364116 993696d6bead7720c823066b9f8f5ef8e0351cdb7b287bea1f3f1a04b800959f - x86_64 attr 531f568431d48e58b92aba78e967b072d04e7a32 2d0561ccf3abed59e04add43857597cf3c1ed6ff9382e00f19e208287cd298ad - x86_64 bdftopcf f95b117d87d5b2818ea811f9c66f3e0a1da13762 2758236232776c8d8f14bf3254b298fee19faa6b367e0b7acfe36b0be9ba9a2e - +x86_64 gcc 30b9b0751f5ecfb96915cd7dce26cc6c10e9a5ab 43707cb20382af01b6110142cf8435f82a244125ced46f5ed94419a22bc3e5a1 - x86_64 gcc-libs 9dc6de9af9e346da27b593c74109e3eb040897cd 34ea8cdd36b59c1f274a521e2e4ce04c899ebf4b4f372a4229c0f737824c8ba4 release-recipes/gcc-libs-x86_64-14.2.0-1.patch x86_64 git 73ce2171ae35895d87442ccbc8f43104ce63a4fc 3f0cd86ed8595642a7d80946f73589dd01dc0396c7c193bca78cf4731f776382 - x86_64 isl25 704e7dee1b6b27840f3eb83a02f28e853435c47f f61d3d79ce052ff555c8315c51cc5d29b0213c691e395ea33d86e13a655f850c - -- 2.56.1