GCC: Difference between revisions

From TechPubs Wiki

Created page with "The GNU Compiler Collection is officially supported on IRIX through GCC 4.7. Unofficial support by various groups has resulted in versions as high as 9.5 being successfully built. Officially Supported Versions GCC 3.4.6 is in the Nekoware collection, and is one of the older versions to survive linkrot. GCC 3.3 was distributed via SGI freeware. 4.x versions include 4.6.3 in Nekomimiware (A play on Nekoware's name), and GCC 4.7.1 is packaged by Nekoware as well. An olde..."
 
No edit summary
 
Line 1: Line 1:
The GNU Compiler Collection is officially supported on IRIX through GCC 4.7. Unofficial support by various groups has resulted in versions as high as 9.5 being successfully built.
The GNU Compiler Collection is officially supported on [[IRIX 6.5]] through GCC 4.7. Unofficial support by various groups has resulted in versions as high as 15.x being successfully built.  


== History ==
GCC has been a target of IRIX support since the 1990s. Older IRIX versions of IRIX had GCC 1.x and 2.x support in particular. As [[MIPSPro]] and [[IRIS Development Option]] were neither open source nor free to purchase, it was a vital tool for early development.


Officially Supported Versions
GCC support for IRIX 6.5 was maintained through the 4.7 branch, after which the maintainer removed it due to IRIX's discontinuation and obsolescence.


GCC 3.4.6 is in the Nekoware collection, and is one of the older versions to survive linkrot. GCC 3.3 was distributed via SGI freeware. 4.x versions include 4.6.3 in Nekomimiware (A play on Nekoware's name), and GCC 4.7.1 is packaged by Nekoware as well. An older version supported GNAT and GNU Java (4.4.x)
== Caveats with GCC ==
GCC has a number of incompatibilities and bugs, many of which remain unfixed:


Unofficial Versions
* GCC on IRIX uses the [[Itanium]] C++ ABI, which is both incompatible with libC.so (SGI's C++ library) and object files generated by CC/MIPSPro, including Viewkit, libFAM, and other system libraries. This complicates building on GCC and necessitates C++ library reduplication.
* GCC's Ada, Java and Go compilers have been broken on GCC for a long time. Ada's last known version was 4.2.
* Object C and C++ build fine, but remain untested. Fortran builds and passes most tests.
* GCC will sometimes break C binaries for unknown/hard to debug reasons, therefore it's preferable to build the C libraries with MIPSPro in most cases.
* GCC does not output proper DWARF debug format for [[dbx]] (The IRIX debugger) to work correctly, and gdb has known problems on IRIX (no threads, incorrect stack traces etc.)


GCC 4.7.4 is cross-compilable as is 8.2 and 9.2 (via SGUG RSE). Raion has made GCC 6.5.0 with C, C++ and Fortran available with fixes applied to improve the compiler. He also released an experimental GCC 9.5.0 in February of 2025.
== Known Distributions ==
 
GCC 6.5.0 Build
 
A minimum compiler version of approximately GCC 4.4.x is required to build GCC 6.5.0 successfully on IRIX, this has not been thoroughly tested. Raion reports using GCC 4.7.4 with fixincludes applied to build IRIX.
 
Requirements:
 
GCC 4.4.x or later
 
GMP 6.x
 
MPC 1.x
 
MPFR 3.1.x
 
ISL 0.18 (for Graphite Loop Optimization.
 
Binutils 2.23.2 (Link to the prepatched code)
 
zlib 1.x
 
libffi version 3.3.1
 
Bash, any version for compiling GCC
 
star or libarchive tar or gnu tar to extract.
 
Build zlib and libffi into the prefix for GCC. Make sure they're in the search paths to get picked up.
 
Per the relnotes, build binutils with the specific commands.
 
Per the relnotes, prepare the build environment for GCC. Make sure the system ncargs are set appropriately as well. get into bash, set the env up, and run the build and checks.
 
### TEST RESULTS
 
                === gcc Summary ===
 
# of expected passes            81595
# of unexpected failures        470
# of unexpected successes      15
# of expected failures          171
# of unresolved testcases      17
# of unsupported tests          1806
 
Failures: https://pastebin.com/eKwMrgUT
                === g++ Summary ===                                                                                                                                                                                                             
 
# of expected passes            93269
# of unexpected failures        14
# of expected failures          313
# of unsupported tests          4151
 
Failures: https://pastebin.com/mHunc8bD
                === libstdc++ Summary ===
 
# of expected passes            9471
# of unexpected failures        119
# of expected failures          66
# of unresolved testcases      2
# of unsupported tests          967
 
Failures: https://pastebin.com/a0vnnMQi
                === gfortran Summary ===
 
# of expected passes            42294
# of unexpected failures        124
# of expected failures          78
# of unsupported tests          97
 
Failures: https://pastebin.com/C30hwj0a
 
GCC 9.5.0 Build
 
A minimum compiler version of approximately GCC 4.6.x is required to build GCC 9.5.0 successfully on IRIX, this has not been thoroughly tested. Raion reports using GCC 6.5.0 with fixincludes applied to build IRIX.
 
Requirements:
 
GCC 4.4.x or later
 
GMP 6.x
 
MPC 1.0.x
 
MPFR 3.1.x
 
ISL 0.18 (for Graphite Loop Optimization.
 
Binutils 2.23.2 (Link to the prepatched code)
 
zlib 1.x
 
libffi version 3.3.1
 
Bash, any version for compiling GCC
 
star or libarchive tar or gnu tar to extract.
 
Raion's 9.5.0 Patch
 
Build zlib and libffi into the prefix for GCC. Make sure they're in the search paths to get picked up.
 
Per the 6.5.0 relnotes, build binutils with the specific commands.
 
Make sure the system ncargs are set appropriately as well. get into bash, set the env up, and run the build. Testsuites skipped for time reasons.
 
Seemed to work fine on first glance.

Latest revision as of 04:19, 17 November 2025

The GNU Compiler Collection is officially supported on IRIX 6.5 through GCC 4.7. Unofficial support by various groups has resulted in versions as high as 15.x being successfully built.

History

GCC has been a target of IRIX support since the 1990s. Older IRIX versions of IRIX had GCC 1.x and 2.x support in particular. As MIPSPro and IRIS Development Option were neither open source nor free to purchase, it was a vital tool for early development.

GCC support for IRIX 6.5 was maintained through the 4.7 branch, after which the maintainer removed it due to IRIX's discontinuation and obsolescence.

Caveats with GCC

GCC has a number of incompatibilities and bugs, many of which remain unfixed:

  • GCC on IRIX uses the Itanium C++ ABI, which is both incompatible with libC.so (SGI's C++ library) and object files generated by CC/MIPSPro, including Viewkit, libFAM, and other system libraries. This complicates building on GCC and necessitates C++ library reduplication.
  • GCC's Ada, Java and Go compilers have been broken on GCC for a long time. Ada's last known version was 4.2.
  • Object C and C++ build fine, but remain untested. Fortran builds and passes most tests.
  • GCC will sometimes break C binaries for unknown/hard to debug reasons, therefore it's preferable to build the C libraries with MIPSPro in most cases.
  • GCC does not output proper DWARF debug format for dbx (The IRIX debugger) to work correctly, and gdb has known problems on IRIX (no threads, incorrect stack traces etc.)

Known Distributions