tl;dr: 16 Jan 2023 -- I'm dumb and screwed up updating the rpms in the below location, and did this in a hurry. Updated now! Correct latest version is 14.0.6 (not 14.0.0-pre6)
tl;dr: 31 Dec 2022 -- see later in thread for details, latest RPM builds based on llvm 14.0.6 are at:
https://misc.bitops.com/llvm-rpms/
There is also a yum repo available; the repo file is at:
https://misc.bitops.com/vlad-sgug-extras/vlad-sgug-extras.repo
----------------
tl;dr: 11 Oct 2021 -- see full thread for details, but latest builds are at:
http://misc.bitops.com/irix/llvm-irix-101121.tar.gz
http://misc.bitops.com/irix/llvm-gcc-includes.tar.gz
-----------------
Hey folks -- I've been continuing aurxenon's earlier work on getting LLVM 12 ported to IRIX, and wanted to post a quick update. Things have progressed to where LLVM/Clang can self-compile itself targeting IRIX, using libc++ and its own embedded compiler runtime & crt; in other words, no gcc or binutils. The new target is also relatively "clean". There are very few hacks involved, which should make it easy to maintain going forward.
Unfortunately there's currently what looks like a non-IRIX-specific mips codegen bug -- see https://bugs.llvm.org/show_bug.cgi?id=51958 for details. This ends up causing `lld` to crash on irix, because it happens to hit this exact situation. However, clang runs successfully to compile and assemble object files:
[sgugshell vladimir@tezro tmp]$ uname -a
IRIX64 tezro 6.5 07202013 IP35 mips IP35 Irix
[sgugshell vladimir@tezro tmp]$ /usr/sgug/llvm/bin/clang -O2 -c hello.c -v
IRIX clang version 12.0.0 (git@github.com:vvuk/llvm-project 5445a15e882693d643b55b7cf257b2c2f4d046b0)
Target: mips64-sgi-irix6.5
Thread model: posix
InstalledDir: /usr/sgug/llvm/bin
(in-process)
"/usr/sgug/llvm/bin/clang-12" -cc1 -triple mips64-sgi-irix6.5 -emit-obj --mrelax-relocations -disable-free -main-file-name hello.c -mrelocation-model pic -pic-level 1 -fhalf-no-semantic-interposition -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -mllvm -mmips-pc64-rel=false -fno-use-init-array -femulated-tls -target-cpu mips3 -target-feature -noabicalls -target-abi n32 -mfloat-abi hard -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/sgug/llvm/lib/clang/12.0.0 -internal-isystem /usr/sgug/llvm/lib/clang/12.0.0/include -internal-isystem /usr/lib/clang/mips64-sgi-irix6.5/include-fixed -internal-isystem /usr/lib/clang/mips64-sgi-irix6.5/include -internal-isystem /usr/include -O2 -fdebug-compilation-dir /usr/people/vladimir/tmp -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o hello.o -x c hello.c
clang -cc1 version 12.0.0 based upon LLVM 12.0.0 default target mips64-sgi-irix6.5
ignoring duplicate directory "/usr/sgug/llvm/lib/clang/12.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/sgug/llvm/lib/clang/12.0.0/include
/usr/lib/clang/mips64-sgi-irix6.5/include-fixed
/usr/lib/clang/mips64-sgi-irix6.5/include
/usr/include
End of search list.
Same bug may be lurking somewhere inside though; going to see if I get traction from LLVM folks to fix it. There's still a little more work to be done, mainly around cleaning up how the build is done and some aux things in libc++ but I expect there will be a working tarball and rpm build in the next few weeks. I have verified that LLVM properly generates multiple GOT tables, which means that compiling large software -- such as llvm itself -- will be possible without running into gcc/binutils bugs!
tl;dr: 31 Dec 2022 -- see later in thread for details, latest RPM builds based on llvm 14.0.6 are at:
https://misc.bitops.com/llvm-rpms/
There is also a yum repo available; the repo file is at:
https://misc.bitops.com/vlad-sgug-extras/vlad-sgug-extras.repo
----------------
tl;dr: 11 Oct 2021 -- see full thread for details, but latest builds are at:
http://misc.bitops.com/irix/llvm-irix-101121.tar.gz
http://misc.bitops.com/irix/llvm-gcc-includes.tar.gz
-----------------
Hey folks -- I've been continuing aurxenon's earlier work on getting LLVM 12 ported to IRIX, and wanted to post a quick update. Things have progressed to where LLVM/Clang can self-compile itself targeting IRIX, using libc++ and its own embedded compiler runtime & crt; in other words, no gcc or binutils. The new target is also relatively "clean". There are very few hacks involved, which should make it easy to maintain going forward.
Unfortunately there's currently what looks like a non-IRIX-specific mips codegen bug -- see https://bugs.llvm.org/show_bug.cgi?id=51958 for details. This ends up causing `lld` to crash on irix, because it happens to hit this exact situation. However, clang runs successfully to compile and assemble object files:
[sgugshell vladimir@tezro tmp]$ uname -a
IRIX64 tezro 6.5 07202013 IP35 mips IP35 Irix
[sgugshell vladimir@tezro tmp]$ /usr/sgug/llvm/bin/clang -O2 -c hello.c -v
IRIX clang version 12.0.0 (git@github.com:vvuk/llvm-project 5445a15e882693d643b55b7cf257b2c2f4d046b0)
Target: mips64-sgi-irix6.5
Thread model: posix
InstalledDir: /usr/sgug/llvm/bin
(in-process)
"/usr/sgug/llvm/bin/clang-12" -cc1 -triple mips64-sgi-irix6.5 -emit-obj --mrelax-relocations -disable-free -main-file-name hello.c -mrelocation-model pic -pic-level 1 -fhalf-no-semantic-interposition -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -mllvm -mmips-pc64-rel=false -fno-use-init-array -femulated-tls -target-cpu mips3 -target-feature -noabicalls -target-abi n32 -mfloat-abi hard -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/sgug/llvm/lib/clang/12.0.0 -internal-isystem /usr/sgug/llvm/lib/clang/12.0.0/include -internal-isystem /usr/lib/clang/mips64-sgi-irix6.5/include-fixed -internal-isystem /usr/lib/clang/mips64-sgi-irix6.5/include -internal-isystem /usr/include -O2 -fdebug-compilation-dir /usr/people/vladimir/tmp -ferror-limit 19 -fno-use-cxa-atexit -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -faddrsig -o hello.o -x c hello.c
clang -cc1 version 12.0.0 based upon LLVM 12.0.0 default target mips64-sgi-irix6.5
ignoring duplicate directory "/usr/sgug/llvm/lib/clang/12.0.0/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/sgug/llvm/lib/clang/12.0.0/include
/usr/lib/clang/mips64-sgi-irix6.5/include-fixed
/usr/lib/clang/mips64-sgi-irix6.5/include
/usr/include
End of search list.
Same bug may be lurking somewhere inside though; going to see if I get traction from LLVM folks to fix it. There's still a little more work to be done, mainly around cleaning up how the build is done and some aux things in libc++ but I expect there will be a working tarball and rpm build in the next few weeks. I have verified that LLVM properly generates multiple GOT tables, which means that compiling large software -- such as llvm itself -- will be possible without running into gcc/binutils bugs!
Last edited: