forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

psptoolchain gcc 4.3.1 & gdb 6.8 available

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Mon Aug 25, 2008 5:43 am    Post subject: psptoolchain gcc 4.3.1 & gdb 6.8 available Reply with quote

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
Back to top
View user's profile Send private message Send e-mail MSN Messenger
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Mon Aug 25, 2008 5:54 am    Post subject: Reply with quote

Quote:
$ 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. :)
Back to top
View user's profile Send private message Visit poster's website
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Mon Aug 25, 2008 5:57 am    Post subject: Reply with quote

yep at first sight it looks good. PSPSDK and my homebrews compiled and run without
problems so just see and wait
Back to top
View user's profile Send private message Send e-mail MSN Messenger
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Tue Aug 26, 2008 12:46 pm    Post subject: Reply with quote

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.)
Back to top
View user's profile Send private message
jube



Joined: 23 Oct 2007
Posts: 115

PostPosted: Tue Aug 26, 2008 4:38 pm    Post subject: Reply with quote

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" :)
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Tue Aug 26, 2008 5:06 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Tue Aug 26, 2008 5:09 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Tue Aug 26, 2008 10:42 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Wed Aug 27, 2008 12:15 am    Post subject: Reply with quote

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

http://forums.ps2dev.org/viewtopic.php?p=72235
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Wed Aug 27, 2008 1:19 am    Post subject: Reply with quote

Quote:
$ svn commit
Deleting patches/psplinkusb.patch
Sending scripts/009-psplinkusb.sh
Transmitting file data .
Committed revision 2428.

All done.
Back to top
View user's profile Send private message Visit poster's website
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Wed Aug 27, 2008 3:29 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail MSN Messenger
jube



Joined: 23 Oct 2007
Posts: 115

PostPosted: Thu Aug 28, 2008 5:54 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Aug 29, 2008 6:54 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
doggyworld



Joined: 14 Sep 2008
Posts: 1

PostPosted: Sun Sep 14, 2008 11:40 am    Post subject: Reply with quote

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:
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: Failed.
ERROR: Could not run the toolchain script.


Any ideas what I need to do to get it to work?
Back to top
View user's profile Send private message
sauron_le_noir



Joined: 05 Jul 2008
Posts: 229

PostPosted: Sun Sep 14, 2008 11:08 pm    Post subject: Reply with quote

psplinkusb has been already patched since i release the patch that's the reason
Back to top
View user's profile Send private message Send e-mail MSN Messenger
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Mon Sep 15, 2008 2:10 am    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Mon Sep 15, 2008 3:02 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group