Some suggestion about toolchain

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
ChocoT
Posts: 5
Joined: Thu Jul 15, 2004 6:01 pm

Some suggestion about toolchain

Post by ChocoT »

Hi all,

First big thanx goes to the community to have done the packages for the EE and IOP compilers.

I Am currently using the may-2004 rar self-install script, correctly confiured (PS2GCC set up from ps2env.bat) for my own Cygwin intall. I compiled the project for measuring the speed of network done by 606u.

I have the following questions / remarks on it:

- There are some duplicate include file for the compiler between EE and IOP compilers (such as stddef.h). I suppose this is because ee-gcc and iop-gcc have different version (3.2.2 and 2.9.5), am I right ?

- The path for the include are not hardcoded at least in the iop-gcc. Therefore one must add each time it's own -I<path> in order to get the project to build. Would it be possible to incorporate into the build of iop-gcc.exe a default path like: $(PS2GCC)/include ? (I do mean that the env variable get resolved when the user invoke iop-gcc, not at the time iop-gcc.exe is build).

- I could not compile my .irx, because the iop-gcc uses the assembler, and it finds the default as.exe, not the iop-as.exe. So I made a symbolic link (ln -s) from as.exe ---> iop-as.exe in the $(PS2GCC)/iop/bin directory in order to compile the module correctly. Same goes for ld.exe --> iop-ld.exe.

Once again thanx to all,
Tof.

PS: My env are the following in case I mess-up something:

PS2GCC=/cygdrive/e/cbi/ps2/compiletool/
PS2SDK=/cygdrive/e/cbi/ps2/sdk

(I put an extra carriage return for the post)
PATH=/cygdrive/e/cbi/modulesPS2/:/cygdrive/e/cbi/ps2/compiletool//share:
/cygdrive/e/cbi/ps2/compiletool//ee:/cygdrive/e/cbi/ps2/compiletool//ee/bin:/cygdrive/e/cbi/ps2/compiletool//iop:
/cygdrive/e/cbi/ps2/compiletool//iop/bin:/cygdrive/e/cbi/ps2/compiletool//iop/lib/gcc-lib/iop/2.8.1-ps2dev:
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:
+blah blah blah
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Re: Some suggestion about toolchain

Post by pixel »

ChocoT wrote:- There are some duplicate include file for the compiler between EE and IOP compilers (such as stddef.h). I suppose this is because ee-gcc and iop-gcc have different version (3.2.2 and 2.9.5), am I right ?

- The path for the include are not hardcoded at least in the iop-gcc. Therefore one must add each time it's own -I<path> in order to get the project to build. Would it be possible to incorporate into the build of iop-gcc.exe a default path like: $(PS2GCC)/include ? (I do mean that the env variable get resolved when the user invoke iop-gcc, not at the time iop-gcc.exe is build).
This is twice the same issue. By default the "system" include path are inside ps2dev/MACHINE/..., and this is hardcoded into each MACHINE-gcc. So, yeah, we could do some more fine tuned tweaks about default system-include path. We only are lazy bastards :P so, until somebody suggest (read: submit) a patch to the current toolchain, we still will need to add some -I into our makefiles.
ChocoT wrote:- I could not compile my .irx, because the iop-gcc uses the assembler, and it finds the default as.exe, not the iop-as.exe. So I made a symbolic link (ln -s) from as.exe ---> iop-as.exe in the $(PS2GCC)/iop/bin directory in order to compile the module correctly. Same goes for ld.exe --> iop-ld.exe.
Blame the packager of your cygwin package... this shouldn't happen. Well, thanks for reporting, but, could you exactly precise where you downloaded that file ? There are a bit too much toolchain packages around (and I am not really into the cygwin part of them...) So we can spank the right people :P
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Is there any reason why you're not using 3.2.2 for both EE and IOP?
ChocoT
Posts: 5
Joined: Thu Jul 15, 2004 6:01 pm

Post by ChocoT »

Thanx for the reply.

For the first idea of embedding a $PS2GCC into the build of gcc, it seems impossible. When compiling GCC (running ./configure), all the path seems to be expand and compiled inside GCC as "hardcoded".

For the iop-compiler, I used the .exe named ee-may-2004.exe and iop-may2004.exe. The ee part used GCC 3.2.2 and iop uses GCC 2.8.1-ps2dev.

I downloaded both files from
http://www.lukasz.dk/ps2toolchain.html

I checked with 'strings' command that iop-gcc.exe doesn't contain any reference to iop-as.exe, but contains ref to as.exe. Hence the trick with symbolic link.


HTH,
Tof.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Okay, time to give lzk a good spank :P

Anyway, can you retry with the compiler suite located at http://ps2dev.org/kb.x?T=1081 ? Thanks for reporting any problem :)
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ChocoT
Posts: 5
Joined: Thu Jul 15, 2004 6:01 pm

Post by ChocoT »

Thanx Pixel for pointing me out to the "official" ps2dev env. Now all my problem of path are gone, that is:
- Includes are correctly loaded from the expected location (determined dynamically by the path where iop-gcc was invoked),
- iop-as.exe / iop-ld.exe is correctly called when needed.
- IOP compiler is now 3.2.2

However I had the following problem while intalling PS2Dev_Setup.exe:

- It completly suppressed my PATH (ouch !), replacing it with the some
%PS2GCC%\blah\blah

- The path is not correctly handled by my cygwin env. That is I start a new cygwin window, and I issue the following command:
env | grep PATH

Gives me something like:
PATH=%PS2GCC%\blah\blah;%PS2GCC%...

=> this doesn't work very good. Therefore I replaced it in my PATH the
%PS2GCC% by a $PS2GCC which works great in cygwin. I did not tried however in a 'cmd'.

(I am using Windows 2000 not XP).

However when I fixed manually those problems, everything is ok.

Big thanx to the community for making this installer,
Tof.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post by pixel »

Interesting variable problem. Thanks for reporting. Well, I say that, but I can't do anything about it :) I just hope the owner of that package get that report. Anyway, this is not a very difficult problem.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Post Reply