gpc
gpc copied to clipboard
Errors Attempting to Build a Cross-Compiling GCC/GPC 3.4.6
I have been attempting to build a GPC cross-compiler (h8300-hitachi-coff) but thus far have been unsuccessful. Without GPC, I can successfully build binutils, gcc (including language support for C, C++, Ada, Fortran77, Java, and ObjectiveC), newlib, and gdb for the H8/300. The compilation instructions on the GNU Pascal website seemed largely similar to what one might expect for a non-GPC build of GCC.
I have setup a repository on GitHub and have Actions configured to execute the build using GitHub runners (OS: "Ubuntu-latest"), so ideally that should eliminate any machine-specific issues as being the culprit.
The following source packages and versions are used:
- Binutils 2.16.1 + patches from Debian (binutils-h8300-hms package) and a few fixes to get it to build
- GCC 3.4.6 + patches from Debian (gcc-h8300-hms package) and a few fixes to get it to build
- NewLib 1.19.0
Following the instructions in this repository, I applied the GPC patch for gcc 3.4.6 (which is just a link to the 3.4.4 patch file), the results of which can be seen at the commit linked here.
In the workflow for the GitHub action are 4 different, completely independent builds setup to execute;
- [SUCCEEDS] Build gcc+binutils+newlib+ada+f77+gcj+objc cross-compiler for the H8/300
- [FAILS] Build a GPC cross-compiler for the H8/300
- [FAILS] Build a GPC compiler (non-cross-compiling) – I set this up in case there might have been any quirks specific to cross-compiling
- [SUCCEEDS] Build GDB
Build log messages of potential interest from the failed GPC cross-compiler builds might include the following:
- make[1]: Circular libgcc.a <- pascal dependency dropped.
- https://github.com/BrickBot/h8300-coff-toolchain/actions/runs/10607727754/job/29400640144#step:8:51234
- configure: error: installation or configuration problem: C compiler cannot create executables.
- https://github.com/BrickBot/h8300-coff-toolchain/actions/runs/10607727754/job/29400640144#step:8:51462
I did come across some suggestions to execute two different runs in the same build folder (building gcc in the first run and gpc in the second), but that did not work, either.
Any advice or suggestions for how to build GPC?