]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
fix: Bash cross-compilation for i686-adros toolchain
authorTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 06:54:09 +0000 (03:54 -0300)
committerTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 06:54:09 +0000 (03:54 -0300)
commitf2506b750de91549d96d0a097aa29d1454cfe16b
tree31882a5f81e8049c77aa525492975c4c0bd33fc1
parent5d3b4f28d24a317bdba7d425e7dfbb44805abe1b
fix: Bash cross-compilation for i686-adros toolchain

- build.sh: remove ulibc header install (conflicts with newlib POSIX headers)
- build.sh: add sys/ioctl.h, sys/termios.h, sys/dirent.h stubs to sysroot
- build.sh: add libgloss build step (crt0.o + libadros.a with posix_stubs)
- build.sh: add GCC specs file creation (--start-group/-lc/-ladros/--end-group)
- build.sh: comprehensive Bash cross-compile config.cache (types, headers, funcs)
- build.sh: use -D_POSIX_VERSION=200112L and --allow-multiple-definition
- syscalls.c: remove rename() (provided by newlib libc.a)
- posix_stubs.c: new file with POSIX function stubs for Bash linking
  (dup2, fcntl, pipe, select, pselect, tcgetattr, sigaction, sigprocmask,
   getcwd, waitpid, getpwnam, opendir, access, chdir, umask, sleep, etc.)

Bash 5.2.21 now cross-compiles as a static ELF 32-bit i386 binary.
newlib/libgloss/adros/posix_stubs.c [new file with mode: 0644]
newlib/libgloss/adros/syscalls.c
toolchain/build.sh