psptoolchain gcc 4.3.1 & gdb 6.8 available

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

Moderators: cheriff, TyRaNiD

Post Reply
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

psptoolchain gcc 4.3.1 & gdb 6.8 available

Post by sauron_le_noir »

I've just uploaded on http://194.7.150.2/psptoolchain431.tgz
a update of the toolchain for linux
gcc 4.3.1 and GDB 6.8
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

$ svn commit
Deleting patches/gcc-4.3.0-PSP.patch
Adding patches/gcc-4.3.1-PSP.patch
Deleting scripts/002-gcc-4.3.0-stage1.sh
Adding scripts/002-gcc-4.3.1-stage1.sh
Deleting scripts/005-gcc-4.3.0-stage2.sh
Adding scripts/005-gcc-4.3.1-stage2.sh
Transmitting file data ...
Committed revision 2424.
Committed, now lets see if people complain. :)
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

yep at first sight it looks good. PSPSDK and my homebrews compiled and run without
problems so just see and wait
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

Something is up with 4.3.x that causes binaries to ~double in size, I vaguely recall something from a mailing list that it's linking in code that is never used or doesn't need to be in the bin but I'll be darned if I can find the specifics again (I'm going by heimdall's win build specifically, though.)
jube
Posts: 115
Joined: Tue Oct 23, 2007 2:26 am

Post by jube »

prob a good idea to add the new mathlib dependencies to the toolchain read-me, save a flood of posts about "toolchain fails to compile" :)
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

I only suggest one final fix!

Since you used my patches you can reduce 1 patch that if it is applied to the correct project and you don't need to maintain it anymore.

trunk/psptoolchain/scripts/009-psplinkusb.sh

This was a patch from a older thread on this forum that i made to get psplinkusb to work better on the slims. If you apply it directly to the psplinkusb project then is one less patch.

And you forgot to remove gcc-4.1.0-PSP.patch, it still remains there but is kind of junk.
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

About the "double size" my guess is that it is not related with GCC itself but with binutils.

Anyway did you try to strip your app after the linking is done?

strip -s yourproject.elf

this usually reduces the size of your binaries...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Heimdall:

I'm hesitant to apply the patch to psplinkusb quite yet, its not my project and I'd like to make sure everything works fine before changing it.

I also left the old patch there just in case someone needed it, again until I'm sure everything works fine.
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

Ok fair enough, just for reference here's the thread that made me create the patch:

http://forums.ps2dev.org/viewtopic.php?p=72235
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

$ svn commit
Deleting patches/psplinkusb.patch
Sending scripts/009-psplinkusb.sh
Transmitting file data .
Committed revision 2428.
All done.
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

Still no problem with the 4.3.1 the path for psplinkusb isn't correct anymore with the release
present int the svn.
As said by heimdall:
at psptoolchain/build/psplinkusb/boot271
edit Makefile
ADD PSP_LARGE_MEMORY = 1
and use
mksfoex -d MEMSIZE=1 'PSPLink v3.0 OE' PARAM.SFO in place of mksfo

in main.c in the same directory add
PSP_HEAP_SIZE_KB(-64);

So we have a homebrew that use the extra memory if launched on a slim
jube
Posts: 115
Joined: Tue Oct 23, 2007 2:26 am

Post by jube »

just built the updated toolchain on ubuntu 8, compiles perfect, FLAWLESS.
Wanted to post my thanks to all the people who continually work to improve this jem of a toolchain. And also thanks to H for maintaining the win32 version, which i also use.
I believe most of the homebrew community present on other sites have no idea how much effort has gone into this, which is a shame!
cory1492
Posts: 216
Joined: Fri Dec 10, 2004 1:49 pm

Post by cory1492 »

Heimdall wrote:About the "double size" my guess is that it is not related with GCC itself but with binutils.

Anyway did you try to strip your app after the linking is done?

strip -s yourproject.elf

this usually reduces the size of your binaries...
Yeah, the makefile templates take care of stripping the binaries. As far as I can tell, GCC is the bit that changed between versions and if I'm remembering the commit notice right it has something to do with std stuffs.

Any rate, here is an example along with the cli output (with gcc -v output as well - back when I had the cygwin toolchain working correctly it's final stripped binaries were identical in size/form to the dkpro ones.)

Notably, the build I just did of the same app (hello world elf template) with a dated linux toolchain with gcc 4.1.0 showed a <4k size diff to your 4.3.1 build (I can infer then something was fixed between 4.1.0 and 4.1.2, which was then lost in 4.3.1 - or was never present to begin with in the default ps2dev toolchains.) Hope it helps more than my poor memory and near utter lack of knowledge of what is going into making the toolchains tick.

btw: (doubled binary size) vs. (NULL pointers and the inability to reliably use switch()) = no contest in my book. Thanks for the GCC updates.
doggyworld
Posts: 1
Joined: Sun Sep 14, 2008 11:37 am

Post by doggyworld »

Edit: Nevermind.. I took a look at the patch file and I think I see the problem. :)

Sorry if this has already been ask.. I'm new to PSP development and wanted to just get my environment setup. I was able to get all the libraries and a new GCC 4.3.1 on my Ubuntu 8.04 box. I ran the toolchain-sudo.sh and it ran through mostly, but it exited with this error:

Code: Select all

At revision 2431.
patching file boot271/Makefile
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 13.
2 out of 2 hunks FAILED -- saving rejects to file boot271/Makefile.rej
../scripts/009-psplinkusb.sh&#58; Failed.
ERROR&#58; Could not run the toolchain script.
Any ideas what I need to do to get it to work?
sauron_le_noir
Posts: 203
Joined: Sat Jul 05, 2008 8:03 am

Post by sauron_le_noir »

psplinkusb has been already patched since i release the patch that's the reason
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

You didn't honestly add PSP_HEAP_SIZE_KB(-64); to the main.c of psplinkusb did you? You are lucky psplink doesn't use the heap at all otherwise that would have fucked everything up :)
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

The latest version of psptoolchain shouldn't be attempting to patch psplinkusb anymore, it was added to the psplinkusb source instead.

The changes that were added can be seen here: http://forums.ps2dev.org/viewtopic.php?p=73773#73773
Post Reply