English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. General (http://eab.abime.net/forumdisplay.php?f=37)
-   -   Building WarpOS binaries on classic / 3.x (http://eab.abime.net/showthread.php?t=62946)

mousehouse 31 January 2012 11:07

Building WarpOS binaries on classic / 3.x
 
Hello fellow EAB'ers,

It seems most developers have left amiga.org, thus this long-time lurker comes running here ;-)

Finally I have succeeded in getting gcc 2.95.3 up and running and successfully compiling C code on 68K. Have not tried anything too fancy but it compiles, spits out an "a.out" binary that actually runs. Nice...

Now that I have that working I want to get the PPC/WarpOS part up and running. I have the 5 archives containing the add-ons installed successfully, meaning that I should have a compiler that can create PPC code running on 68K...

I can do a "ppc-amigaos-gcc -warpup --version" and it tells me nicely that it is 2.95.3 etc. Now when I actually try to compile my hello.c, it bails out on me... The 68K compiler runs fine, no issues there. I can run the first stage of the compiler just fine, after that 'ar' bails out on me with "as: unrecognized option 'u"...

Any clues? I've got the binutils from the latest GG snapshot on back2roots, it tells me it's version 2.91.

see:
http://www.sneeuwberg.com/posted_att...s/arhellno.jpg

phx 31 January 2012 12:08

Hard to say. When I should guess, I would say that your WarpOS-compiler still calls the 68k assembler? Or the compiler frontend expects a different assembler version?

Probably an installation problem. Try to find out with SnoopDos which binaries are really started. Maybe you get a clue from that.


My personal opinion is that you should look out for a real WarpOS compiler. Most of those gcc ports I have seen do neither support the WarpOS PowerOpen ABI nor do they create EHF object files.

Instead they will still generate ELF objects using the V.4-ABI. And to make that work they need a wrapper function for each WarpOS kernel call to fix the stack frame. But this doesn't help for callback functions, of course. So it might happen that your stack gets corrupted...

mousehouse 31 January 2012 12:24

Thanks!

What's the best way to create WarpOS binaries in your opinion? StormC 4.x? Or stick with my SAS/C 6.58 creating PowerUP code?

edit:
Correct, it seems the compiler calls the 68K assembler for creating a binary, which obviously fails. I checked the .S file and it looks like powerpc assembly compared to regular 68K assembly. Will do a snoopdos tonight to see what it is calling...

thomas 31 January 2012 12:45

I'd use VBCC. If you don't need C++ it's the best C compiler for all Amiga-like OSes (except AROS unfortunately). It runs on every Amiga OS and can create code for every other Amiga OS.

mousehouse 31 January 2012 14:03

I dislike C++ anyway, so I'll give VBCC a go... The version on Aminet is 0.8, on http://sun.hasenbraten.de/vbcc/index.php?view=download I can see 0.9b... any best/most-recently-updated/recommended version?

phx 31 January 2012 14:19

The most recent version is always the one on the vbcc home page:
http://sun.hasenbraten.de/vbcc/
It is V0.9b.

thomas 31 January 2012 14:58

Quote:

Originally Posted by phx (Post 799615)
It is V0.9b.

OT: are you aware already that the 68k binary of fd2pragma crashes in 0.9b? It runs well in 0.9a.

phx 31 January 2012 15:16

Quote:

Originally Posted by thomas (Post 799620)
OT: are you aware already that the 68k binary of fd2pragma crashes in 0.9b? It runs well in 0.9a.

Indeed, you're right! :shocked
I will check that and upload an update.
Thanks.

phx 31 January 2012 17:52

Done.


All times are GMT +2. The time now is 04:36.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.04125 seconds with 11 queries