]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
feat: i686-adros cross-toolchain infrastructure + kernel test expansion
authorTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 01:19:19 +0000 (22:19 -0300)
committerTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 01:19:19 +0000 (22:19 -0300)
commit9b3281522b5fc89cf6ad98551ca47143d236acbe
tree96cc3ed75f221311329f0ab62c3d6b161f6e0188
parent9b56e33725a387882e42233bea50ca9539caf5f8
feat: i686-adros cross-toolchain infrastructure + kernel test expansion

Toolchain Build System (toolchain/):
- toolchain/build.sh: Automated 5-stage build script
  Stage 1: Binutils 2.42 (i686-adros assembler/linker)
  Stage 2: GCC 13.2 bootstrap (C only, no libc)
  Stage 3: Newlib 4.4.0 (C library with libgloss/adros stubs)
  Stage 4: GCC 13.2 full rebuild (C/C++ with Newlib sysroot)
  Stage 5: Bash 5.2.21 cross-compilation (optional, static)

- toolchain/patches/binutils-adros.patch:
  config.sub, bfd/config.bfd, gas/configure.tgt, ld/configure.tgt
  Adds i686-adros as ELF32 target using i386 backend

- toolchain/patches/gcc-adros.patch:
  config.sub, gcc/config.gcc, gcc/config/i386/adros.h,
  libgcc/config.host, crti-adros.S, crtn-adros.S
  Defines __adros__, __unix__, ELF32 format, crt0.o startup,
  -lc -ladros -lgcc link spec, i386 wchar/size/ptrdiff types

- toolchain/patches/newlib-adros.patch:
  config.sub, newlib/configure.host, newlib/libc/include/sys/config.h,
  libgloss/configure.in, libgloss/adros/configure.in+Makefile.in,
  newlib/libc/sys/adros/ stubs
  SIGNAL_PROVIDED, MALLOC_PROVIDED, HAVE_OPENDIR flags

- toolchain/README.md: Build prerequisites, usage, sysroot layout,
  troubleshooting guide

ulibc Enhancements:
- errno.h: Full POSIX errno set (sorted, no duplicates), matches kernel
- ctype.h: Added iscntrl, isgraph, ispunct, isascii, isblank, toascii
- signal.h: Added SA_RESTART, SA_NOCLDSTOP, SA_NOCLDWAIT, SA_NODEFER,
  SA_RESETHAND, SIG_ERR, sighandler_t typedef, signal() declaration

Kernel Test Expansion:
- fulltest.c: 3 new syscall tests
  - gettimeofday: verify epoch timestamp > 1e9
  - mprotect: brk page, write, mprotect RW, verify success
  - getrlimit/setrlimit: get RLIMIT_NOFILE, set lower, read back, restore
- smoke_test.exp: 3 new patterns (100 total)

100/100 smoke tests pass (11 sec), cppcheck clean.
tests/smoke_test.exp
toolchain/README.md [new file with mode: 0644]
toolchain/build.sh [new file with mode: 0755]
toolchain/patches/binutils-adros.patch [new file with mode: 0644]
toolchain/patches/gcc-adros.patch [new file with mode: 0644]
toolchain/patches/newlib-adros.patch [new file with mode: 0644]
user/fulltest.c
user/ulibc/include/ctype.h
user/ulibc/include/errno.h
user/ulibc/include/signal.h