WANTED:GCC 4.0 Toolchain for windows (supporting C++, float)

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

edepot
Posts: 111
Joined: Sat Apr 09, 2005 3:39 pm

WANTED:GCC 4.0 Toolchain for windows (supporting C++, float)

Post by edepot »

Does anyone have the link to the new GCC 4.0 toolchain install program
that runs on windows? Exactly like Nem's GCC 3.2.2 toolchain installer
file, but it has GCC 4.0 compiler, and supports C++, float, double,
and all those stuff, and after typing pspdev.bat you can compile
away and make PSP homebrew software.
Warren
Posts: 175
Joined: Sat Jan 24, 2004 8:26 am
Location: San Diego, CA

Post by Warren »

Install cygwin then download and run the toolchain script from ooPo's site
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

I know this is an extremely noobish question, but hows does one run the toolchain script?
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

extract the toolchain by going:
tar zxvf psptoolchain(whatever the numbers are).tgz
... wait a second,
change to the directory that was created:
cd psptoolchain
make the toolchain.sh script executable:
chmod 755 toolchain.sh
run the script:
./toolchain.sh
watch the text fly by!
you should also read the readme in the psptoolchain directory.

(I just finished doing this... :)
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

^- of course, all this is assuming that you are in the bash prompt from cygwin...:)
MDave
Posts: 82
Joined: Mon May 09, 2005 10:43 pm

Post by MDave »

Yes, thanks for the help :) I'm not very familiar with unix commnds, hehe.
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

so it went ok?

BTW, a little help to get you started :)
http://www.google.ca/search?hl=en&q=bas ... ds&spell=1
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

remember to install wget when installing cygwin. or you may not be able to install the toolchain.
There are 10 types of people in the world: Those who understand binary, and those who don't...
Grifis
Posts: 5
Joined: Tue May 31, 2005 1:06 am

Post by Grifis »

I have to install wget like you said. I extracted the wget tar file and ran ./configure, but it still isnt fully installed according to the psptoolchain. What do I do from here?
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

install it through the cygwin setup. click on Full, under packages click on bin and src, and it should install it. anything else your missing(if they mention it), can be found there. hope this helps.
There are 10 types of people in the world: Those who understand binary, and those who don't...
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

make
make install

usually this is how to compile and install stuff in linux... type these in the directory you typed ./confugure in.

But before you do that, cygwin can install stuff like wget for you. when you install cygwin, you should choose "custom install"
or whatever the equivilant option, and scroll down the list of possible stuff to install, until you find wget.. of course, my instructions are probably not 100% accurate (as to where to find the options), because I use linux. (I've only set up cygwin a couple of times)

EDIT: ok, totally disregard everything in this post.. someone with a better idea of how to do it beat me to it...:)
Grifis
Posts: 5
Joined: Tue May 31, 2005 1:06 am

Post by Grifis »

thanks a lot guys
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

OK, now I have a question...

I know there is another thread (or two) on this, and I have read them,
but I am still haing trouble.
I am trying to compile Nem's helloWorld (as a test),
but I get this error:

startup.s: Assembler messages:
startup.s:17: Error: illegal operands `la $v0,_gp'
startup.s:18: Error: illegal operands `move'
startup.s:23: Error: illegal operands `li $v0,1'
startup.s:70: Warning: setting incorrect section attributes for .rodata.entrytable

I am using the new pspdev toolchain..
I am not sure how to properly include the regdef.h file

thanks in advance

EDIT: My question was answered in the "osx startup.s" thread. anyone who needs the answer should take a look :) sorry for topic duping.
Last edited by wulf on Fri Jun 17, 2005 5:54 am, edited 1 time in total.
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

Post by Thanhda »

i'm currently using the ps2sdk, not the psp. but! you will most likely have to modify the mk.bat file. i had to do that. just rename the bat file to a txt file.

c:\ps2dev\gcc\ee\bin\ee-gcc -march=r4000 -g -mgp32 -mlong32 -c hellopsp.c
c:\ps2dev\gcc\ee\bin\ee-gcc -march=r4000 -g -mgp32 -mlong32 -c pg.c
c:\ps2dev\gcc\ee\bin\ee-gcc -march=r4000 -g -mgp32 -c -xassembler -O -o startup.o startup.s
c:\ps2dev\gcc\ee\bin\ee-ld -O0 startup.o hellopsp.o pg.o -M -Ttext 8900000 -q -o out > hellopsp.map
outpatch
@echo you got outp as psp elf
Elf2pbp.exe outp Eboot

ps2dev - http://www.internalreality.com/PS2Dev_Setup.zip
toolchain was the

and used the ps2 toolchain. but its probably recomended that you use the new psp toolchain.
There are 10 types of people in the world: Those who understand binary, and those who don't...
myk
Posts: 6
Joined: Fri Jun 17, 2005 4:42 am

Post by myk »

Hi,
I'm trying to install the 4.0 toolchain as well and I am running into some problems. I ran the toolchain script but it generates an error when configuring BINUTILS. This is what it says

...

checking whether ln works... yes
checking whether ln -s works... yes
-v: not found
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
ERROR CONFIGURING BINUTILS (binutils-2.16 psp)

...

Thanks for the help, if there is anything else I need to post to help solve this problem just ask.
Thanks again,
Mike
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
How do you expect to compile the toolchain without a compiler installed?
myk
Posts: 6
Joined: Fri Jun 17, 2005 4:42 am

Post by myk »

Yea I just did some searching and found out that was the problem. I'm a real noob when it comes to this. Can you point me in the right direction on where to get gcc?
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

are you using cygwin? because if you are, and I'm betting that's the case,
you can simply install it from the cygwin installer.

look up a few posts in this thread.. someone else had to install cygwin stuff, so the info you need will be there.
myk
Posts: 6
Joined: Fri Jun 17, 2005 4:42 am

Post by myk »

wulf wrote:are you using cygwin? because if you are, and I'm betting that's the case,
you can simply install it from the cygwin installer.

look up a few posts in this thread.. someone else had to install cygwin stuff, so the info you need will be there.
yea I am, I should have said I was using cygwin. Thanks a lot.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

Just bypass cygwin altogether and install linux :)
User avatar
sq377
Posts: 87
Joined: Mon Apr 11, 2005 3:30 am

Post by sq377 »

heh, i've got a noob question for hte linux one. It said in the readme for the linux install to put a few lines in your startup. Where is that on linux... i seriously have no idea. most the internet has told me is fstab but that looks more like partition info.
0xdeadface
Posts: 62
Joined: Tue May 31, 2005 5:11 am

Post by 0xdeadface »

"Just bypass cygwin altogether and install linux :)"

Or just install cygwin, install the devkit, copy the cygwin dll's to your windows directory and the devkit then behaves like any other DOS app and you can use your favourite (well....) windows/dos editors and forget about *nix althogether.

0xdf
myk
Posts: 6
Joined: Fri Jun 17, 2005 4:42 am

Post by myk »

0xdeadface wrote:"Just bypass cygwin altogether and install linux :)"

Or just install cygwin, install the devkit, copy the cygwin dll's to your windows directory and the devkit then behaves like any other DOS app and you can use your favourite (well....) windows/dos editors and forget about *nix althogether.

0xdf
Thanks I might have to try that
MrHTFord
Posts: 35
Joined: Tue Feb 10, 2004 2:04 am
Location: England

Post by MrHTFord »

For those of you wishing to avoid Cygwin, GCC 4.0.0 *should* compile on an Msys/MinGW system out of the box.

Also, there are patches and a toolchain script on Oopos site to make 3.2.2 compile on Msys/MinGW.

Make sure you install the MSys dev toolkit too.
wulf
Posts: 81
Joined: Wed Apr 13, 2005 6:56 pm

Post by wulf »

re: where to put the exports:

if you take a look in your home directory, there are a number of "hidden" files.. they start with a period ie .somefile
look for the one that is called .bashrc
this is a text config file for the bash shell, so every time you use bash, this will be loaded.

you can put the exports here:

for example, mine now reads:

Code: Select all

# .bashrc

# User specific aliases and functions
 export PSPDEV="/usr/local/pspdev"
    export PSPSDK="$PSPDEV/pspsdk"
    export CVSROOT=":pserver:anonymous@cvs.ps2dev.org:/home/pspcvs"
    export PATH="$PATH:$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin"
    
# Source global definitions
if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi
even if you can't see the file, you can still open it by explicitly referencing it, ie:

nedit ~/.bashrc

*~/ is just a macro?ish thing that means /home/yourloginname[/code]
jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

Hmmm...anyone successfully install the psp toolchain on winblows machine? Worked fine on my linux box but I would like to set it up at work (we only have win32 here) but for some reason it chokes when building binutils.

Code: Select all

linking ../../intl/libgettext.h to libintl.h
c:\ps2dev\bin\make.exe[1]: Entering directory `C:/cygwin/tmp/pspdev/binutils-2.16/build-psp/intl'
gcc -c -DLOCALEDIR=\"/usr/local/pspdev/psp/share/locale\" -DGNULOCALEDIR=\"/usr/local/pspdev/psp/share/locale\
" -DLOCALE_ALIAS_PATH=\"/usr/local/pspdev/psp/share/locale:.\" -DHAVE_CONFIG_H -I. -I../../intl  -g -O2   ../.
./intl/intl-compat.c
gcc: no input files
c:\ps2dev\bin\make.exe[1]: *** [intl-compat.o] Error 1
c:\ps2dev\bin\make.exe[1]: Leaving directory `C:/cygwin/tmp/pspdev/binutils-2.16/build-psp/intl'
c:\ps2dev\bin\make.exe: *** [all-intl] Error 2
ERROR BUILDING BINUTILS (binutils-2.16 psp)
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

sq377 wrote:heh, i've got a noob question for hte linux one. It said in the readme for the linux install to put a few lines in your startup. Where is that on linux... i seriously have no idea. most the internet has told me is fstab but that looks more like partition info.
Sorry for not replying earlier, didn't see the quesation.

FStab is used to mount all partitions in linux, so if you wish to see that 2nd partition on your 3rd hard drive? It's in FStab. Want to mount a USB device at startup? Put it in FStab. I havn't read the read-me so I don't know what it's talking about with the "put a few lines in the startup", but that's what the FStab is for.
User avatar
cwbowron
Posts: 76
Joined: Fri May 06, 2005 4:22 am
Location: East Lansing, MI
Contact:

Post by cwbowron »

jboldiga wrote:Hmmm...anyone successfully install the psp toolchain on winblows machine? Worked fine on my linux box but I would like to set it up at work (we only have win32 here) but for some reason it chokes when building binutils.
I have.

I ran into some problems making s-macro_list at some point in the process but that was because c:\windows\system32 was ahead of c:\cygwin\bin in my path and there was a sort.exe in that directory that was getting executed instead of the cygwin sort. So I put c:\cygwin\bin first in my path and it worked.

You might check to see if you have a path order discrepency too.
jboldiga
Posts: 27
Joined: Mon Jun 20, 2005 10:16 am

Post by jboldiga »

Yeah I think your right, stupid RenderWare SDK (ps2 dev) has a make.exe in the path and it was screwing things up. Thanks.
Chrighton
Posts: 58
Joined: Wed Jun 15, 2005 8:24 pm

Post by Chrighton »

MrHTFord wrote:For those of you wishing to avoid Cygwin, GCC 4.0.0 *should* compile on an Msys/MinGW system out of the box.
Just tried that the other day as I'd prefer msys over cygwin env, but I had some probs. Can't remember what the error(s) was/were, so I'll have to go back and try and recompile it when I have some free time.
Post Reply