Jump to content
IGNORED

GCC for the TI


insomnia

Recommended Posts

On 7/19/2024 at 2:37 PM, jedimatt42 said:

People have had success in the past building tms-9900-gcc on Raspberry PI OS. There might have been a few additional prerequisites to install. I haven't heard of anyone trying on Bookworm. This and Ubuntu are both downstream consumers of Debian and the prerequisites are not really architecture specific. 

I've tested on bookworm and haven't had any issues.  I think the issue here is the "aarch64" architecture when building for arm 64, since it wouldn't have existed in the gcc-4.4 timeframe.  I'm waiting on delivery of an rpi5 to try it out for myself.

 

I've also resumed work on the latest gcc (14.1.0) which may solve the problem for us.  I'll start a new thread with details of how to build / download when I finish some more testing.

  • Like 5
  • Thanks 3
Link to comment
Share on other sites

20 hours ago, MarkB said:

I've tested on bookworm and haven't had any issues.  I think the issue here is the "aarch64" architecture when building for arm 64, since it wouldn't have existed in the gcc-4.4 timeframe.  I'm waiting on delivery of an rpi5 to try it out for myself.

 

I've also resumed work on the latest gcc (14.1.0) which may solve the problem for us.  I'll start a new thread with details of how to build / download when I finish some more testing.

I have a rpi5 and can run the test later today. This gcc port is an impressive project! I recently installed the gcc with your install script on my rpi4, an Ubuntu box and WSL2 (I booted my Windows box for the first time in months to try it out). My test case has been compiling the Ghostbusters game - another great project. Compiling it has required some fiddling with Makefiles and paths but none of that is gcc related.

 

Sorry if this information is already available, but I was wondering if this port of gcc works on apple silicon Macs with current macOS releases? That would be great for me. I tried to compile the earlier versions of the gcc for macOS a while ago with limited success.

  • Like 4
Link to comment
Share on other sites

1 hour ago, speccery said:

Sorry if this information is already available, but I was wondering if this port of gcc works on apple silicon Macs with current macOS releases? That would be great for me. I tried to compile the earlier versions of the gcc for macOS a while ago with limited success.

I'm not a Mac user myself and have never tried it.  I think it can be done but it may run into similar issues with arm 64 support.

  • Like 2
Link to comment
Share on other sites

@MarkB I forgot to test this when I said I was going to do it.. sorry. Anyway, I just tested this with my rpi5. It's running the raspberry pi OS bookworm. Another thing I forgot was that I already was testing compiling using your install.sh and it did not work out of the box due to the aarch64 issue you mentioned. However, I already solved this earlier. The issue is that the configuration script config.guess doesn't know how to deal with aarch64. So I downloaded a new version of config.guess (I don't remember from where but I think it was from here:

https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD

I will anyway attach the version I used here. These were the steps I took:

# run installation
cd tms9900-gcc
./install.sh ~/ti/compiled # use here whatever installation directory you want
# The install.sh step above will fail but it also sets things up for the following.

# find where config.guess files are:
find . -iname config.guess

# assume new config.guess is downloaded to the tms9900-gcc directory. Copy it over.
cp config.guess build/binutils-2.19.1/config.guess
cp config.guess build/gcc-4.4.0/
# rerun install, it succeeded for me now
./install.sh ~/ti/compiled

With this stuff I was able to compile libti99 with the resulting gcc toolchain. I will next try to compile ghostbusters as my test case.

config.guess

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

2 hours ago, speccery said:

@MarkB After once more wresting with Makefile paths with vgmcomp2 and ghostbusters, I did get it compiled on the RPI5 and it runs under js99er.net on the RPI5!

Excellent.  Are you running raspbian or ubuntu on your PI5?

Link to comment
Share on other sites

Before I start on the aarch64 testing, I rebuilt for bookworm / amd64 and it seems gcc4 has some bitrot.  I was getting build errors in various *.texi files that I hadn't seen before.  I've fixed these locally.  I'll push a 1.31 release once I finish the rpi testing.

In the meantime, to make installing a little easier for Linux users, and hopefully Windows WSL users, I've created a repo at https://ti99ers.com/tigcc (thanks @Gary from OPA)

If anyone wants to try this out on bookworm amd64, the instructions are as follows.  A little more complicated than I'd like due to the deprecation of apt-key but this is as simple as I have found a way to make it:
 

(these steps don't work - refer to the new gcc thread for proper instructions)

 

Just to add the advantage of doing the above means any updates will be automatically picked up.  For a once-off install you can also just fetch the deb directly from https://ti99ers.com/tigcc/pool/main/t/tms9900-gcc/tms9900-gcc_1.30_amd64.deb

 

 

Edited by MarkB
deleted broken repo add steps
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

17 hours ago, MarkB said:

Before I start on the aarch64 testing, I rebuilt for bookworm / amd64 and it seems gcc4 has some bitrot.  I was getting build errors in various *.texi files that I hadn't seen before.  I've fixed these locally.  I'll push a 1.31 release once I finish the rpi testing.

I indeed forgot to mention that when compiling on rpi5 I set an environment variable first before running install.sh:

export MAKEINFO=missing

This fixed the *.texi issues as they were not used but great that you have fixed it. Compiling on WSL worked for me. I don't mind building gcc myself but great to have apt support! Related to building gcc, I am not sure if your build script invokes make with the -j option to run on multiple cores in parallel. By habit I normally do that with something like -j7 to run 7 jobs in parallel.

  • Like 3
Link to comment
Share on other sites

5 hours ago, speccery said:

I am not sure if your build script invokes make with the -j option to run on multiple cores in parallel. By habit I normally do that with something like -j7 to run 7 jobs in parallel.

It doesn't use parallel build but yes it would be a good feature to add.
I'm trying to do the opposite right now as my rpi5 build keeps crashing when it draws too much current from my makeshift PSU 🙂

  • Like 3
Link to comment
Share on other sites

17 minutes ago, MarkB said:

It doesn't use parallel build but yes it would be a good feature to add.
I'm trying to do the opposite right now as my rpi5 build keeps crashing when it draws too much current from my makeshift PSU 🙂

Sorry to hear about the power issue, I went with the official rpi5 PSU since I've had my share issues with raspberry pi4s in the past. The official power supplies seem to work well.

Link to comment
Share on other sites

5 hours ago, speccery said:

Sorry to hear about the power issue, I went with the official rpi5 PSU since I've had my share issues with raspberry pi4s in the past. The official power supplies seem to work well.

Thanks yeah I have one ordered.  I did a DIY job in the meantime but it isn't easy to supply enough current voltage through the IO header.

 

(actually my iPhone 20W charger works fine too - didn't think of that before)

  • Like 2
Link to comment
Share on other sites

On 7/27/2024 at 2:39 PM, speccery said:

With this stuff I was able to compile libti99 with the resulting gcc toolchain. I will next try to compile ghostbusters as my test case.

Did you add back in the tms9900 targets?  I had to manually add those in to the new config.sub file.  Or maybe it wasn't necessary to upgrade config.sub, just config.guess is enough?

  • Like 1
Link to comment
Share on other sites

9 hours ago, MarkB said:

Did you add back in the tms9900 targets?  I had to manually add those in to the new config.sub file.  Or maybe it wasn't necessary to upgrade config.sub, just config.guess is enough?

I only updated the config.guess file, that was the source of some definitions which derailed the compilation. I did not touch config.sub. I have to say that I don’t have a deep understanding how these work, I just followed what caused some definitions to not be there and config.guess was the problem.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...