Building GCC 5 on IRIX
#1
Building GCC 5 on IRIX
I've been playing around with GCC 5 and I'm here to document my experience compiling it:

Library versions:
gmp-6.20
isl-0.18
mpc-1.1.0
mpfr-4.0.2

Binutils version 2.17

Bootstrap GCC: 4.7.4

There exist newer versions, but I'm not doing this because I want the full suite. I only want GCC5 to try against irix as/ld.

I used the didbs project by Daniel Hams to get patches and instructions/configure flags for all of these, though the lib builds are my own and were mostly carried out on MIPSPro 7.4.4m

Configure: ./configure --prefix=/opt/local/gcc5/ --libdir=/opt/local/gcc5/lib32 --disable-silent-rules --disable-nls --disable-multilib --enable-obsolete --enable-languages=c,c++ --disable-bootstrap --enable-shared --enable-static --enable-threads=posix --enable-tls=no --enable-lto --with-gmp=/usr/nekoware/ --with-gmp-lib=/usr/nekoware/lib32 --with-system-zlib LD=/opt/local/gcc-4.7.4/bin/ld AS=/opt/local/gcc-4.7.4/bin/as CC=/opt/local/gcc-4.7.4/bin/gcc CXX=/opt/local/gcc-4.7.4/bin/g++ CFLAGS=-O2 -mips4 CXXFLAGS=-O2 -mips4 CPPFLAGS='-I/usr/nekoware/include -I/usr/include' LDFLAGS='-L/usr/nekoware/lib32'

Other setup: The build box this is on only has 1.25G of RAM. This turned out to be not enough, so I added a 4g swap file to /var/tmp/moreswap and initialized it. 

To run, type "gmake -j<number of CPUS+1>"

Afterwards, run the testsuite: "gmake check"

In my case, it only partially ran because it wants guile, autogen etc. I'm not going to install those. But someone else is free to tell me what they got and if my guide works.

Also, if some tests fail but you know how to fix them, or know libs/features I missed that are important, don't hesitate to let me know. 

Pre-patched, MIPSIV source code: http://irix.cc/gcc5-mipsiv-irix.tar.gz 

Questions I got from people I discussed this with:

1.Will nekoware accept GCC builds? 

GCC builds are gonna happen. It's just the nature of things. A native mipspro build of a similar version and functionality will trump a GCC build in most cases, but assuming no other exists, why not? Just need that to be documented, and generally, though not required, I'd like people to give mipspro a shot and if you're skilled enough, try patching it. Don't be afraid, compilers do smell fear!

2. Will you release a tardist of this? 

Possibly, but probably not this build unless there's considerable demand and after further testing, and if I did, I'd want it to be standalone from nekoware or any other project, so I'd probably rebuild all the libs into their own directory.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
(This post was last modified: 03-17-2020, 11:25 PM by Raion.)
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
02-29-2020, 09:46 PM
#2
RE: Building GCC 5 on IRIX
Good work! A newer GCC is always a good thing if it helps with the porting of some newer utils.

Doubt I'll be compiling it myself mind you - think it might take rather long on a single CPU Fuel - and the less said about my Indigo2 the better for this Smile

Indigo2 R10000/IMPACT  R10000 195MHz, 384MB RAM, MaxIMPACT (1MB), 36GB 15k & 300GB 10k drives, new/quiet fans, 100Mb G160 NIC, IRIX 6.5.22&
[Image: Fuelb.png] R14000 600MHz, 4GB RAM, V10 Graphics, 72GB 15k & 300GB 10k drives, new/quiet fans, 1Gb NIC, IRIX 6.5.30
O2  in storage...
Trippynet
Indigo2 IMPACT

Trade Count: (0)
Posts: 304
Threads: 7
Joined: Dec 2017
Find Reply
03-01-2020, 09:44 AM
#3
RE: Building GCC 5 on IRIX
It only took about 12 hours on my single 400 Octane.

Honestly I don't really care how long something takes to compile.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
03-03-2020, 07:25 PM
#4
RE: Building GCC 5 on IRIX
Finally wikified: https://wiki.irixnet.org/GCC-on-IRIX

I'll probably refactor the entire article soon, I've been meaning to take didbs stuff and make my own spin for bootstrapping a GCC toolchain as part of a little convenience upgrade for some people - a tardist with several GCC versions and such. But I'm not sure how far I'll get with this immediately.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
07-24-2020, 06:58 PM
#5
RE: Building GCC 5 on IRIX
(03-01-2020, 09:44 AM)Trippynet Wrote:  A newer GCC is always a good thing if it helps with the porting of some newer utils.

Such as ?

I'm serious. I don't see the point in anything "newer".

What I would like would be more Motif applications. If someone would stuff Fontforge into Motif windows, that'd be lovely.

A simple Motif frame for MPlayer or VLC would be super.

Here's a couple real projects - take Inkscape and Blender and Scribus, (in two cases make them actually work before changing toolkits), then stuff them into real Irix packages.

Programs that we can use to do things, that's what I'd like. I don't mean to criticize people who want to play with gcc but to me, times have changed. There's no new exciting foss that's worth messing with. What would we do with gcc 5 ? Make gtk3 work ?

Be still, my heart.

To me, currently, all operating systems and software are such shit that it's a case of, pick what you like to use and be happy with it. Yup, an Octane is a slug. But it does everything I need to do. I don't need or care about virtual machines - what for ?  I'm not an ISP.  The rest of the crap being done now is like unto it - worthless.

I like to do some photo retouching sometimes - getting Creator to run would be great, a newer Blender for people who don't have or want Photoshop 3, a newer vector art package, being able to create sheet music, usb drivers, stuff like that would make life easier and more fun.  Lilypond would be hot. "Newer utilities", maybe not so much.

We've already got great cadcam, which Loonix does not even have. This is my major reason to stay here, forever. And the second, the desktop works. It's not shit, like everything else on the planet except the Workplace Shell.  Apple sucks balls, and Windows is even worse. And Loonix is a halfass merged copy of the scummy parts of both.

Anyway, dunno, but the need to "keep up" has sorta left the building, as far as I can see. Irix is never going to keep up. Either you like it or you don't. It is what it is. Making more software that works in Irix would be more my goal.

Real Irix, not a Loonix version that runs on an Octane.
(This post was last modified: 07-26-2020, 10:01 AM by hamei.)
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
07-26-2020, 09:57 AM
#6
RE: Building GCC 5 on IRIX
Hamei, I don't current possess the skills to do that. Documentation of any kind is helpful. Newer GCC doesn't really benefit me specifically but it's nice to know without having to rely on documentation from SGUG or other groups.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
07-26-2020, 03:56 PM
#7
RE: Building GCC 5 on IRIX
Raion Wrote:Hamei, I don't current possess the skills to do that.  Documentation of any kind is helpful. Newer GCC doesn't really benefit me specifically but it's nice to know without having to rely on documentation from SGUG or other groups.

Sorry, didn't mean to sound critical at all. It's just that for ages mostly what I've seen (not here necessarily, ahem) is an emphasis on "tools". At one time I believed in that too, but in the real world, it doesn't work that way. 95% of people will never try to run a compiler ... any compiler. So what good are these tools ? They sit out in the rain and rust.

To me, it seems like if we have X amount of effort to expend, putting it to work on stuff people will use would be better.  

I also kinda want to point out that when nekoware started, it was a different world. Fossy was actually improving and people at that time had a brain. Source was not always cross-platform but made an attempt. Projects were aimed at making good software.

Since then, times have changed. Open Sores in general is now shit. Cookbook crap, many places don't even have the source easily available, you have to hunt, it never says what the dependencies are, it only builds with one particular set of anything and half the time (gtk2-gtk3 I am looking at you) the stuff ends up not working anyway. Pure shit.

So, to me, any reason to keep up with what's happening in Linux is dead as a doornail. It's not worth chasing.

That means, again to me, that what we got is what we're gonna get. Just choose what we like, and make it into a real, native Irix program. Usable software, not utilities for building ever-more screwedup programs that no longer serve any useful purpose and go ever-farther off the track.

I'm not into this for stroking my peepee.  There's old programs out there we could use. Good programs. Can't be any harder to outwit Barco than it is to make gtk2 work (which it never did anyhow, even in Linux. So what's the point ?) Or like Fontforge, the toolkit is disgusting. That thing would be great in Motif. If even vishnu can do it, heck ... Tongue Any number of past open sores that, at one point, were okay. Pick that point, make it work right, and be happy with it.

This is all personal opinion, of course, no offense intended to anyone ... everybody has different goals for sgi boxes. But, I dunno, seems like people haven't noticed that the world has changed. What was great in 2005 is maybe not even useful in 2020.
(This post was last modified: 07-26-2020, 04:45 PM by hamei.)
hamei
broke-down old clunker

Trade Count: (0)
Posts: 380
Threads: 3
Joined: Jul 2019
Location: 上海
Find Reply
07-26-2020, 04:35 PM


Forum Jump:


Users browsing this thread: 1 Guest(s)