(04-16-2020, 01:21 PM)dstep Wrote: Hello Jan
Thank you for the share.I installed your binutils and gcc binaries for IRI 5.3 - all of them do Bus error. Its hard to investigate the reason via stack backtrack info in core (stripped). It seems you used nekoware to build it. I have not installed nekoware. Almost all of necoware and tgcware binaries do core dump on my system, despite of I installed IRIX patches Tom G. Christensen recommended.
Also original inst and swmgr of IRIX 5.3 do not understand nekoware distribution files and I can not find an IRIX patch which upgrade 5.3 swmgr. I have to unpack nekoware dist files by utility http://persephone.cps.unizar.es/~spd/src/other/mydb.c which I modified little bit.
IRIX 4 binutils om my 5.3 do not core dump but unfortunately do not work correctly (at least ar).
So I continue to try building binutils/gcc )
As said, Nekoware requires IRIX 6.5. However if all TGCware and my binaries bus error, I suspect an error on your side rather than mine.
You intended to build this on an old PowerSeries system with R3000 CPUs right? That's going to takes ages (days or weeks even), and unless you have maxed out RAM (256MB on these systems) you will probably simply run out of memory.
My preferred build environment for this is a chrooted IRIX 5.3 install (system files taken from a 4D/440 VGX) running on my Origin 350 with 8*R16K CPUs and 16GB RAM. I'm basically using a 5.3 system loaded with the last patches, the last IDO and WorkShop that will run on IRIX 5.3 plus TGCware for essentials like gzip and bash. I fired up the O350 and found an even newer GCC:
Code:
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gnu/libexec/gcc/mips-sgi-irix5.3/4.5.1/lto-wrapper
Target: mips-sgi-irix5.3
Configured with: /build53/gcc/release/gcc-4.5.1-r1/gcc-4.5.1/configure -v --enable-languages=c,ada,c++,fortran,objc,obj-c++ --prefix=/usr/local/gnu --enable-shared --disable-nls --with-gnu-as --with-as=/usr/local/gnu/mips-sgi-irix5.3/bin/as --without-gnu-ld --with-ld=/usr/bin/ld --with-mpfr=/usr/local/gnu --enable-checking=release --enable-obsolete
Thread model: single
gcc version 4.5.1 (GCC)
(Yeah, it does Ada too).
On this system it all works fine. It creates ELF 32-bit mips1 binaries so it should work on an R3000 too. There's only one problem: when I download the gcc tarball from my FTP to another system of mine, an R4400 IMPACT Indigo2 running IRIX 5.3, it fails the link step because the (IRIX) ld complains about the object file format (but it doesn't bus error). Now, this is a long time ago, but IIRC at some point there was a patch to the IRIX 5.3 IDO which replaced the linker with what was essentially a backport of the much newer MIPSpro linker. This patch was restricted to people with a support contract. At the time you had the somewhat bizarre choice between depending your "free software" compiler on a restricted patch which resulted in the best regression test results OR using GNU ld and suffer. It's obvious I chose the former but now I have to figure out what that patch was :( I sincerely doubt that anybody at whatever is left of SGI will care if I bundle that with the compiler.
Update: found it:
Code:
1.2 Supported_Software_Platforms
This patch contains an update for IDO (5.3) on a system
running IRIX 5.3. The software cannot be installed on other
configurations.
1.3 Bugs_Fixed_by_Patch_SG0001068
This patch contains a new linker which is now available for
IRIX 5.3. This linker provides link times which are often
much faster than the previous linker, particularly on large
programs. The IRIX 5.3 stock linker is still available via
use of the "-old_ld" flag, and is the default linker for C++
programs.
This patch also contains specific fixes for previous
patches. In particular, this patch supersedes both Patch
SG0000410 and Patch SG0000268.
Specific bugs fixed by this patch include fixes for -abi
operation (Ref #310776), and problems with strip (Ref
#321236).
Find it on my FTP:
patchSG0001068.tardist
Now it works on the Indigo2 as well:
Code:
mgras 1% uname -a
IRIX mgras 5.3 12201932 IP22 mips
mgras 2% /usr/local/gnu/bin/gcc -v
Using built-in specs.
Target: mips-sgi-irix5.3
Configured with: ../configure -v --enable-languages=c,ada,c++,fortran,objc,obj-c++ --prefix=/usr/local/gnu --enable-shared --enable-objc-gc --disable-nls --with-gnu-as --with-as=/usr/local/gnu/mips-sgi-irix5.3/bin/as --without-gnu-ld --with-ld=/usr/bin/ld --with-mpfr-include=/usr/local/gnu/include --with-mpfr-lib=/usr/local/gnu/lib --enable-checking=release
Thread model: single
gcc version 4.4.2 (GCC)
mgras 3% /usr/local/gnu/bin/gcc -o hello hello.c
mgras 4% file hello
hello: ELF 32-bit MSB dynamic executable MIPS - version 1
mgras 5% ./hello
Hello, IRIX world!
mgras 6%
When using these compiler binaries you might want to add /usr/local/gnu/lib to your LD_LIBRARY_PATH and /usr/local/gnu/bin to your PATH. That's all.