]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
toolchain: native GCC/Binutils Canadian cross build support
authorTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 11:11:46 +0000 (08:11 -0300)
committerTulio A M Mendes <[email protected]>
Sat, 14 Mar 2026 11:11:46 +0000 (08:11 -0300)
commit3b82c29c0f3448fd235119e879ef32ee47637a87
treea67117e3b807c5bf4a7d646d4dd9f4df755af024
parent6241577c2ab2ea342dffa858698e67261ba0c530
toolchain: native GCC/Binutils Canadian cross build support

- posix_compat.c: add ioctl, ftw, nftw, dlopen/dlsym/dlclose/dlerror,
  pathconf/fpathconf, execv stubs needed by native Binutils and GCC
- sysroot headers: add extern "C" guards to sys/mman.h, sys/ioctl.h,
  sys/dirent.h for C++ compatibility (prevents mangled symbol mismatches)
- build.sh: add patches for GCC prerequisites (GMP/MPFR/MPC/ISL config.sub),
  libcody removal from host_libs, Binutils tc-i386.c uint32_t type fix
- toolchain/patches/native-toolchain.patch: document all native build patches

Native toolchain produces ELF32 i686 static binaries:
  Binutils 2.42: ar, as, ld, objdump
  GCC 13.2.0: xgcc (2.3MB), cc1 (27MB), cpp, gcov, gcov-tool
  libstdc++: 809 headers + libstdc++.a (built with --with-newlib)
newlib/libgloss/adros/posix_compat.c
newlib/sysroot_headers/sys/dirent.h
newlib/sysroot_headers/sys/ioctl.h
newlib/sysroot_headers/sys/mman.h
toolchain/build.sh
toolchain/patches/native-toolchain.patch [new file with mode: 0644]