New comment by jjsullivan5196 on void-packages repository https://github.com/void-linux/void-packages/issues/24959#issuecomment-695852519 Comment: Alright, pretty sure I have the simplest way to accomplish this. It required a small patch to zig's cmake, to force using `llvm-config` to find llvm dependencies for the target. I can fully bootstrap the compiler for aarch64 on one x86_64 machine, and the ldd output is the same (minus offsets) now on aarch64: ``` linux-vdso.so.1 (0x0000007f86265000) libLLVM-10.so => /usr/lib/libLLVM-10.so (0x0000007f81486000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x0000007f81456000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0000007f811de000) libm.so.6 => /usr/lib/libm.so.6 (0x0000007f81135000) libc.so.6 => /usr/lib/libc.so.6 (0x0000007f80fc7000) libffi.so.7 => /usr/lib/../lib/libffi.so.7 (0x0000007f80fae000) libedit.so.0 => /usr/lib/../lib/libedit.so.0 (0x0000007f80f66000) libz.so.1 => /usr/lib/../lib/libz.so.1 (0x0000007f80f41000) libdl.so.2 => /usr/lib/../lib/libdl.so.2 (0x0000007f80f2d000) libncursesw.so.6 => /usr/lib/../lib/libncursesw.so.6 (0x0000007f80eb0000) libxml2.so.2 => /usr/lib/../lib/libxml2.so.2 (0x0000007f80d40000) libgcc_s.so.1 => /usr/lib/../lib/libgcc_s.so.1 (0x0000007f80d1c000) /lib/ld-linux-aarch64.so.1 => /usr/lib/ld-linux-aarch64.so.1 (0x0000007f86237000) libicui18n.so.67 => /usr/lib/../lib/libicui18n.so.67 (0x0000007f80a24000) libicuuc.so.67 => /usr/lib/../lib/libicuuc.so.67 (0x0000007f80836000) libicudata.so.67 => /usr/lib/../lib/libicudata.so.67 (0x0000007f80824000) liblzma.so.5 => /usr/lib/../lib/liblzma.so.5 (0x0000007f807ef000) ``` Check the template+patch [here](https://github.com/jjsullivan5196/void-packages/tree/zig-cross/srcpkgs/zig), I'll also submit this against zig master. If anyone has a better way to get around the ugly heredoc in the xbps template, feel free to correct me :^)