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 

PS2SDK Bugfix marathon

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



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Wed Jul 07, 2004 2:32 pm    Post subject: PS2SDK Bugfix marathon Reply with quote

There will be a PS2SDK bug squashing marathon starting Monday, July 12th.

Please list any known bugs in this thread and indicate whether or not you can help.

Bugs:
- Lack of proper C++ support
- Depenancy on newlib (mrbrown can you help here?)
- $(PS2LIB) still being used in places
- things break when using an installed version of ps2sdk vs stuff compiled in ps2sdk source dir
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Wed Jul 07, 2004 2:57 pm    Post subject: Reply with quote

When ps2sdk was being discussed, Oobles was going to copy the ps2lib and ps2drv files on the CVS server to preserve CVS history. This didn't happen, instead he imported the sources from a checked out copy. He and Lukasz also redid the build system. There are a lot of hacks in the source and Makefiles related to this.

If the files are matched 1:1 and the build system restored, everything should work as it did in ps2lib and ps2drv. The ps2drv build system should be used instead of ps2lib's build system.

As far as C++ support goes, it works, I'm not sure what's not "proper" about it. Our crt0.s is not compliant with how ELF/SysV wants to do program initialization, so adding calls to _init() before the call to main() and _fini() after main() (before exit()) should do the trick. There are plenty of non-MIPS crt0's or crt1's to use as examples (see the directory newlib/libc/sys/ in newlib).

Anyway, I committed something that should hopefully take care of the dependency on newlib problem.

As far as $(PS2LIB)/$(PS2DRV) being used in other projects - leave them be. Don't force ps2sdk down folks throats, especially when it isn't ready yet.
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Wed Jul 07, 2004 3:01 pm    Post subject: Re: PS2SDK Bugfix marathon Reply with quote

Warren wrote:

- things break when using an installed version of ps2sdk vs stuff compiled in ps2sdk source dir

This has been a peive of mine as well. My understanding is that nothing should be using $(PS2SDKSRC) unless it's part of ps2sdk, yet I've seen numerous things using it that are not in ps2sdk. Granted, at least a couple of them are intended for inclusion in ps2sdk once they are finished, But I still felt this worth bitching about..

Another problem is the permissions that are chmod'd to by make dist are wrong. They should be 644 not 622. I'm fixing that right now.
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
Warren



Joined: 24 Jan 2004
Posts: 173
Location: San Diego, CA

PostPosted: Thu Jul 08, 2004 6:43 am    Post subject: Reply with quote

So I cheated and started early last night.

I fixed all the $(PS2LIB) references and fixed the library link order in the makefile.eeglobal_cpp in ps2sdk/samples to compile things with oopo's beta toolcahin build script.

Current .cpp linkage is:
EE_LIBS += -lc -lkernel -lstdc++ -lc -lkernel -lsyscall

Right now it still relies of libstdc++ (is this newlib?) and takes the crt0.o from newlib (I had to overwrite it with ps2sdk's).

I was also talking to loser about cpp stuff and he was saying he had to manually link in ctri and crtn but then something else didn't work.

I don't know a whole lot about compilers and such but I'm willing to give getting this stuff working a shot if someone can point me in the right direction.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Jul 08, 2004 7:09 am    Post subject: Reply with quote

Newlib is a C library. Gcc provides its own C++ library called libstdc++.
Back to top
View user's profile Send private message Visit poster's website
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Thu Jul 08, 2004 7:17 am    Post subject: Reply with quote

And libstdc++ requires newlib. At least, for some parts.
_________________
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.
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Thu Jul 08, 2004 7:20 am    Post subject: Reply with quote

If libsyscall is put back into libkernel where it's supposed to be, you should be able to simplify the library line to "-lstdc++ -lc -lkernel". If no one else gets to it I'll look at it tonite.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 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