Commit Graph
3 Commits
Author SHA1 Message Date
lotherkandClaude Sonnet 5.5 73c9de51a6 licence: the CNCL line in every file Makronix wrote (tools, docs, www, mobile, top level)
consmirror.c: the BSD notice is replaced (Makronix's own file).  Files with
changes of other sessions pending are left for their commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 11:50:26 +00:00
lotherkandClaude Opus 5.5 f0f267eadf mobile: the phone's toolchain from src/ -- build.sh tools for aarch64-linux-gnu
make tooldir runs build.sh tools unchanged with -m evbarm64, the phone's
sysroot as -D, and -V MACHINE_GNU_PLATFORM=aarch64-linux-gnu (bsd.own.mk:1065
sets it with ?=): gcc 14.4.0 and binutils 2.46.0 of src/external/gpl3,
configured as NetBSD configures its own (c c++ objc fortran, no Ada), plus
nbmake, nbmtree, install for the host -- the phone no longer borrows the
desktop's tooldir nor Debian's cross compiler.

make targetlibs does what NetBSD does with its own Makefiles, and meets four
NetBSD particulars (PORTING-USERLAND.md section 8): gcc's headers are not
copied by NetBSD's gcc (Makefile.in:3308 "if false"); -DNETBSD_TOOLS needs
the -B/-L of src/tools/gcc/Makefile:162; the libstdc++ import has no "src"
in SUBDIRS and no po/; NetBSD's locale_facets_nonio.h:339 needs a locale
model glibc's "gnu" one is not -- libstdc++ uses "generic" (a finding).

The frame (mxmake.sh, mktoolchain.sh, mxcheck.sh) uses the tooldir's gcc,
binutils and make.  Measured: C and C++ run under qemu against the phone's
glibc 2.41 with libstdc++.so.6.0.33; all 28 ports rebuilt with it pass
28/28 under qemu and on the phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:12:15 +00:00
lotherkandClaude Opus 5.5 0d4901af1e mobile: the frame for porting src/ programs to the phone
NetBSD's own host-program machinery, with the phone as the host: build.sh
builds nbcat, nbsed ... for a Linux build host with src/tools/Makefile.host
and libnbcompat; tools/mxmake.sh runs the same with HOST_CC = an aarch64
compiler whose glibc is the phone's.

- tools/mksysroot.sh: the Void rootfs + base/void/sysroot-packages headers
- tools/mktoolchain.sh: Debian's aarch64 gcc, glibc only from the sysroot
  (--sysroot alone took Debian's glibc 2.42; the phone has 2.41)
- tools/mxmake.sh: the nbmake-<machine> of the phone (QEMU_LD_PREFIX lets
  configure run its tests through binfmt; INSTALL and HOST_MKDEP overrides)
- userland/Makefile: mtree hierarchy, libnbcompat for aarch64, every port
  found by its directory; make userland [PROG=x], make userland-test
- userland/mk/mx.prog.mk: two lines per port, Makefile.host unchanged
- tools/mxcheck.sh: no symbol version newer than the phone's libraries
- docs/PORTING-USERLAND.md: how to port one program, with the twelve
  pitfalls met on the first one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 17:07:07 +00:00