stmp-build-gcc-target is, from what I can tell, bootstrapping a cross compiler to build the target libraries such as libstdc++, libgcc, etc. In the last few days, I was able to get the target libraries to compile and have made some working installers with Wix. I had to patch the gcc source and the headers coming from gccdist. The toolchain works with the exception of the "Relocation value does not fit in 24 bits" error on 8 slot cRIOs, which is due to libraries linked in which are not being built with -mlongcall; on Arch Linux, it was libstdc++ and libgcc, but I'm still trying to find the library responsible for this particular failure. The final installation doesn't have anything in /mingw/include and has no gccdist headers in /mingw/powerpc-wrs-vxworks/include (only c++ standard includes and the WPILib folder). I've submitted a pull request to the windows-toolchain-environment repo which has the patch files and other fixes. These are my modified gccdist recipes:
Code:
stmp-gccdist-scripts: stmp-gccdist-directories
- cp -R $(GCCDIST_ARCHIVE_BASE)/host $(WIND_BASE)
+ cp -dpr --no-preserve=ownership $(GCCDIST_ARCHIVE_BASE)/host $(WIND_BASE)
touch stmp-gccdist-scripts
stmp-gccdist-headers: stmp-gccdist-directories
- cp -R $(GCCDIST_ARCHIVE_BASE)/target/h/. $(TOOL_DIR)/sys-include
- cp -R $(GCCDIST_ARCHIVE_BASE)/target/h/wrn/coreip/. $(WIND_BASE)/target/h
+ cp -dpr --no-preserve=ownership $(GCCDIST_ARCHIVE_BASE)/target/h/. $(WIND_BASE)/target/h
+ cp -r $(WIND_BASE)/target/h/. $(TOOL_DIR)/sys-include
+ cp -r $(WIND_BASE)/target/h/wrn/coreip/. $(WIND_BASE)/target/h
touch stmp-gccdist-headers
In short, I recommend seeing if some of the patches and modifications to linux.mk in the pull request help. Try changing the gccdist copying first though since that fixed a lot of weird errors for me like the C preprocessor being identified as "/lib/cpp" and failing a sanity check.