IRC channel logs

2026-01-17.log

back to list of logs

<aleksih>FYI nixpkgs is pretty close to integrating a hex0-to-hero (through stage0-posix->mes->tinycc->gcc) bootstrap into stdenv and thus the full package set (:
<aleksih>I'm wondering, how is the AArch64 support in Mes? If I understood correctly, there's only an armv4 backend, though most AArch64 processors can run that, right?
<aggi>aleksih: there's been a transition with aarch64 (armv8 -> armv9 or however that's labeled), and the latest aarch64 systems phased out aarch32 compatibility
<aggi>furthermore, aarch64->aarch32 required a compatibility layer with linux-kernel for example, aarch64 devices typically need an aarch64 kernel and uboot-firmare atop which aarch32 may userspace may or may not work
<aggi>"backwards compatibility" with ARM is a little different compared to X86_64->32
<aggi>i kept one system-profile/cross-compilation variant in maintenace with a GNU armv6 userspace spawn atop a linux-5/aarch64 kernel
<aggi>aarch32 SBC (real hardware for practical daily use) are rarely available nowadays
<aggi>then, with tinycc involved (which i'm using to drive a complete system integration with instead of bootstrapping)
<aggi>tinycc support is mostly complete with x86_32 "only"; all other x86_64/aarch32/aarch64/riscv-4 inline assembly support is incomplete and/or absent for example
<aggi>which implies for any other than x86_32 assembly support you would need to pull the gigantic dependency graph of binutils/as rather early
<aggi>so, imo, for any other than x86_32 bootstrapping the proposed solution would be to bootstrap with x86_32 and then cross-compile towards any other ARCH
<aggi>that's another reason why i've been working on this:
<aggi> http://tinyfront.mooo.com/docs.html
<aggi>which relies upon bootstrapping x86_32 as acceptance criteria, but focuses on full c-toolchain portability with tinycc
<aggi>to provide a complete and powerful development host with it, for mentioned cross-compilation scenarios
<aggi>with various of those cross-compilation scenarios situation is complicated further, because GCC-versions up until gcc-4.X did NOT support aarch64/riscv
<aggi>so, with a complete tinycc-driven distribution available, any gcc-4.x/binutils toolchain can be bootstrapped, then used to compile any later version supporting any desired ARCH, and finally cross-compile towards whatever aarch32/64 riscv/64 etc.
<aggi>of cause, you may handle those cross-compilation scenarios with guix/nixpkg; it's dependency graph is just a tad bit bigger than a complete tinycc-driven distribution
<aggi>long story short, current situation is bootstrapping is covered with x86_32, and this can be used as initial development host to cross-compile towards any other ARCH
<aggi>and it's a complete bootstrapped tinycc-driven i586-tcc-linux2-musl.iso distribution i would recomend for this as a fallback option
<aggi>that's why i forked and patched linux-2.4 kernel, backported drivers and security extensions to it, backported a complete userspace of most recent software versions onto
<aggi>which is portable towards both linux2 and linux5 sysv kernel abi, got full cross-compilation support hacked, static linking
<aggi>containing _all_ required development utilities (including gdb, strace, whatever else for example), driven by tinycc
<aggi>tinycc-related regressions were coped with it's latest master/HEAD, it's published by tinycc-devel (which was a question raised few days ago if bootstrapping could or should rebase itself with it instead of several different tinycc versions/branches involved)
<aggi>the linux-tcc kernel fork is uploaded with sufficient hardware support at latest HEAD too
<aggi>it's all compile-time and run-time alpha-tested extensively, passing self-hosting compilation already
<stikonas>aleksih: in general 64-bit support in mes is poor
<stikonas>riscv64 has the best support so far there
<stikonas>that's the only one that can reach tcc (and hence gcc) on 64-bits
<stikonas>there is some recent work on improving amd64 I think
<stikonas>but it's not released
<stikonas>and probably not even all patches are cleaned up yet
<stikonas>janneke might know its status better
<janneke>aggi: yeah, arm support should be OK but was halted waiting for the risc-v bootstrap revamp in guix
<janneke>that /msg chanserv deop #bootstrappable
<janneke>that should also fix arm
<janneke>ACTION hasn't seen any aarch64 efforts just yet
<janneke>we're planning to fix the amd64/x86_64 bootstrap, yes; that's mainly work on mescc
<janneke>aarch64 would probably also profit from that
<aggi>i'm merely having a look at this form the perspective of c-toolchain portability re-confirmed with tinycc for x86_32 to drive a complete development host with it
<aggi>and currently, i see no perspective for any other than x86_32/tcc as initial bootstrapped development to cross-compile towards any other
<aggi>because, for various reasons i tried to summarize, i preferred to broaden the scope of tinycc involved
<aggi>the question to begin with is, if a full bootsrapping dependency chain for any other than x86 was reasonable
<janneke>we have riscv working, in prototype; it hasn't been upstreamed to guix just yet
<aggi>although it is complete with x86_32/bootstrappable/guix, i would consider this a little unstable still
<aggi>of cause, i am NOT opposed to any approach with riscv for example - who am i to tell anyway
<janneke>yes, we'd like to improve that
<aggi>but i am aware of the limitations with regards to c-toolchain portability with any other than ARCH=x86_32
<janneke>also, performance is being worked on
<aggi>kernel support will give you a painful bite, just to mention one "minor" issue, and all absent hardware support following with any kernel you may choose