Page 1 of 1

building gcc-3.2.2

Posted: Thu Dec 16, 2004 1:12 pm
by radad
I am trying to build gcc-3.2.2 with cygwin.

I have checked it out from ps2dev.org.
I then ran "./configure".
Then "make".

I now get this error:

gcc.c: In function `process_command':
gcc.c:3735: error: assignment of read-only location
gcc.c:3737: error: assignment of read-only location

line 3735 looks like this (line 3737 is similar):

argv[i + 1] = convert_filename (argv[i + 1], ! have_c, 0);

It is trying to assign to argv when argv is defined as:

const char *const *argv

Am I doing this correctly? I believe what is on ps2dev is gcc with the ps2 patches applied. I assume this means I do not need the toolchain.sh script. Is this correct?

Anybody else get this error?

Posted: Thu Dec 16, 2004 2:00 pm
by Oobles
I think the easiest way to build gcc is using ooPo's toolchain.sh script. This nicely retrieves all the required parts and puts it all together for you. The point of placing gcc into CVS was to capture any future changes people make to the code.

Having said that. You should still be able to make gcc build from the version in CVS. I think you will find that you need to run configure with options specifically for PS2. Check the toolchain.sh script to see how its called.

Oobles.

Posted: Thu Dec 16, 2004 4:18 pm
by radad
I modified the toolchain.sh to use the cvs stuff instead and everything built fine. Thanks.