Compile GCC for Puppy
In order to compile GCC, at least the following APIs are missing:
- dup2
- alarm
- execvp
In file included from ../../gcc-7.2.0/gcc/c/c-lang.c:22:0:
../../gcc-7.2.0/gcc/system.h:221:11: fatal error: algorithm: No such file or directory
# include <algorithm>
^~~~~~~~~~~
compilation terminated.
Alas, while we do have the C++ <EASTL/algorithm.h>
This problem is a fair bit more subtle than just make a custom
/bin/bash ../../gcc-7.2.0/gcc/mkconfig.sh bconfig.h
g++ -c -DIN_GCC -DGENERATOR_FILE -I. -Ibuild -I../../gcc-7.2.0/gcc -I../../gcc-7.2.0/gcc/build -I../../gcc-7.2.0/gcc/../include -I../../gcc-7.2.0/gcc/../libcpp/include \
-o build/genmddeps.o ../../gcc-7.2.0/gcc/genmddeps.c
In file included from ../../gcc-7.2.0/gcc/genmddeps.c:19:
../../gcc-7.2.0/gcc/system.h:236:11: fatal error: EASTL/new: No such file or directory
# include <EASTL/new>
^~~~~~~~~~~
compilation terminated.
For some reason, this part of the g++ build process is using the system's g++ and not build/g++.sh; which means one probably needs to point the build process at the system GCC but configured for 32-bit
The technical part of this problem can be solved by bootstrapping - but doing that requires an intermediate step where one patches GCC to configure it to work for Puppy.