]> 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)
commite69e0690bfba94a54bdaeea30fa2f6cae11a5771
tree05ebd439ec20558e09320de293811213cbc20010
parent6cd3033ed5842a331c262f69ce794fad783ec1c3
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]