Poster | Thread |
broadblues
| |
Setting up VBCC for 68k and OS4 developement Posted on 25-Feb-2019 13:26:57
| | [ #1 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| I'm looking inot setting up VBCC initially as a cross compiler to 68k on my X1000 but potentially also to compile certain projects to AmigaOS4 with it.
The basic install is trivail but I'm not sure how and where to put includes for the likes of AmiTCP / RoadShow , AmiSSL etc. And for any other third party libs (libjpeg. etc)
Anyone have a working setup? _________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|
matthey
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 25-Feb-2019 16:43:39
| | [ #2 ] |
|
|
|
Elite Member |
Joined: 14-Mar-2007 Posts: 2014
From: Kansas | | |
|
| @broadblues On my 68k install, the AmiTCP includes are in a vbcc:netinclude directory. I also have a vbcc:PosixLib directory so perhaps 3rd party included should go in their own directory from the main vbcc: assign? You might install PosixLib and see what is installed.
http://aminet.net/package/dev/c/vbcc_PosixLib http://aminet.net/dev/c/vbcc_PosixLib.lha
PosixLib has examples using the TCP/IP stack so you could see if there are any errors when compiling.
The link libs themselves are SAS/C .lib format instead of GCC .a format. They go in vbcc:targets/m68k-amigaos/lib, vbcc:targets/ppc-amigaos/lib, vbcc:targets/ppc-morphos, etc., depending on the target binary.
There are several tools at Frank Wille's web page.
http://sun.hasenbraten.de/~frank/projects/
I would recommend getting FindHunkOffset at least and throwing it in vbcc:bin. It is the equivalent of GCCFindHit type tools.
http://sun.hasenbraten.de/~frank/projects/download/FindHunkOffset.lha
You might also grab my builtin.lib from EAB which gives some GCC compatible __builtin_ functions which are missing in vbcc because they are not part of the C standard.
http://eab.abime.net/showthread.php?t=82114
Grab it while you can as it might disappear at some point since I was perma banned.
Last edited by matthey on 25-Feb-2019 at 04:45 PM.
|
|
Status: Offline |
|
|
Chris_Y
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 26-Feb-2019 23:33:18
| | [ #3 ] |
|
|
|
Elite Member |
Joined: 21-Jun-2003 Posts: 3203
From: Beds, UK | | |
|
| @broadblues
If you get AmiSSL working, let me know. Apparently the includes are only for GCC. https://github.com/jens-maus/amissl/issues/20 _________________ "Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion Avatar is Tabitha by Eric W Schwartz |
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 26-Feb-2019 23:42:45
| | [ #4 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| |
Status: Offline |
|
|
salass00
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 7:32:36
| | [ #5 ] |
|
|
|
Elite Member |
Joined: 31-Oct-2003 Posts: 2707
From: Finland | | |
|
| @Chris_Y
Just use fd2pragma to generate the missing inlines file.
It should be something like:
fd2pragma <.sfd file> SPECIAL 70 TO RAM: Last edited by salass00 on 27-Feb-2019 at 07:33 AM.
|
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 12:41:05
| | [ #6 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| @salass00
Yes, that's the starting point, but fd2pragma chokes on the vast number of unknown types cobmined with 'const' causing most function to fail to parse, then it doesn't generate correct inlines for functions with return type that is a pointer to function.
Nor can it deal properly with arguments that are pointer to function. I'm fudging tose as APTR in the hope that it will be the same on 68k
And untill added to the types list types of the form STACK_OF(sometype) caused parsing errors.
So last night I spent several hours adding types to the type list and whilst still having added all I have at least got something emiitted for every function (bar one vararsgs function with no non var args equivalent (as far as I can tell).
I have a perl script that will fix the return type of pointer to function issues.
One more function with a double as argument will need a manual fix due to the register choice (thanks to Frank Wille for the fix there, I didn't have a clue!).
_________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|
matthey
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 19:49:07
| | [ #7 ] |
|
|
|
Elite Member |
Joined: 14-Mar-2007 Posts: 2014
From: Kansas | | |
|
| @all I thought GCC was the Amiga compiler and GCCism C was the C standard. What is with the new interest in vbcc?
|
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 21:08:38
| | [ #8 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| @matthey
For me it's a simpler and more stable way to cross compile for 68k from my X1000.
GCC with PPC ixemuil.library 51.10 is a bit flakey at times.
More options is always better IMHO.
_________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 22:27:05
| | [ #9 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| @broadblues Quote:
@Chris_Y
Working on it ...
|
Done.
2.Programing:SDK/Examples/AmiSSL> vc +aos68k -c99 -IPrograming:GG/netinclude/ https.c -o https >typedef long time_t; warning 226 in line 6 of "time.h": redeclaration of typedef included from file "vincludeos3:openssl/asn1.h":16 included from file "vincludeos3:amissl/amissl.h":21 included from file "vincludeos3:proto/amissl.h":31 included from file "https.c":23 22.Programing:SDK/Examples/AmiSSL> https 85.25.152.36 SSL connection using ECDHE-RSA-AES256-GCM-SHA384 Server certificate: Subject: /C=GB/postalCode=CF5 5AD/ST=Wales/L=Cardiff/street=Asquith House Unit 1 Dyfrig Rd/O=A-EON Technology Ltd/OU=Forums/OU=InstantSSL/CN=amigaworld.net Issuer: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Organization Validation Secure Server CA HTTP/1.0 500 Internal Server Error Date: Wed, 27 Feb 2019 22:21:56 GMT [snip content]
Will tidy up and share....
_________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|
matthey
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 23:07:28
| | [ #10 ] |
|
|
|
Elite Member |
Joined: 14-Mar-2007 Posts: 2014
From: Kansas | | |
|
| Quote:
broadblues wrote: For me it's a simpler and more stable way to cross compile for 68k from my X1000.
GCC with PPC ixemuil.library 51.10 is a bit flakey at times.
More options is always better IMHO.
|
I agree. Vbcc is certainly different than GCC. It is amazing in some ways but still frustrating in others.
Quote:
So we can expect new versions of AWeb and NetSurf then?
|
|
Status: Offline |
|
|
Chris_Y
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 27-Feb-2019 23:54:11
| | [ #11 ] |
|
|
|
Elite Member |
Joined: 21-Jun-2003 Posts: 3203
From: Beds, UK | | |
|
| @broadblues
Quote:
Done.
Will tidy up and share....
|
Excellent work!
@matthey
As broadblues said, vbcc is a much nicer way of cross compiling 68k code from OS4. I suspect it's much nicer to run natively on OS3 too, as GCC there is a pain to set up.
And new version of NetSurf, most certainly not, well not built with vbcc anyway! Fixed version of Wet for OS3, yes...Last edited by Chris_Y on 27-Feb-2019 at 11:57 PM.
_________________ "Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion Avatar is Tabitha by Eric W Schwartz |
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 28-Feb-2019 22:09:42
| | [ #12 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| @Chris_Y
Here's drop box link to the results if you want to test it.
https://www.dropbox.com/s/2h16tm3pk00vvm3/AmiSSLVBCC.lha?dl=0
I'm not sure how to exhuastivly test as there so many many functions in the API.
The example code builds and seems to work though.
NB -c99 options is required. The example https.c is slghtly modified to create a ssize_t type (only exists in posix module) and to avoid includeing the amissl/inles.h macros as they fail on VBCC. Not 100% sure what they are for, they are not related to the library interface as far as I can tell. _________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|
Chris_Y
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 28-Feb-2019 23:38:17
| | [ #13 ] |
|
|
|
Elite Member |
Joined: 21-Jun-2003 Posts: 3203
From: Beds, UK | | |
|
| @broadblues
I commented on GitHub before I saw your comments here.
With #define AMISSL_INLINE_H I don't get those errors and the build looks like it mostly works.
However, at CloseAmiSSL() I get an error "identifier expected". My closedown stuff is pretty much the same as https.c where it works, so I'm not sure what this is trying to tell me.
_________________ "Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion Avatar is Tabitha by Eric W Schwartz |
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 28-Feb-2019 23:50:21
| | [ #14 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| |
Status: Offline |
|
|
Chris_Y
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 1-Mar-2019 18:16:30
| | [ #15 ] |
|
|
|
Elite Member |
Joined: 21-Jun-2003 Posts: 3203
From: Beds, UK | | |
|
| @broadblues
I've figured it out. My inline/amisslmaster_protos.h is the old/wrong one. Looks like when you created the archive you've accidentally picked out inline/aml_protos.h instead of inline/amisslmaster_protos.h Any chance you could re-upload?
_________________ "Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion Avatar is Tabitha by Eric W Schwartz |
|
Status: Offline |
|
|
broadblues
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 2-Mar-2019 1:31:24
| | [ #16 ] |
|
|
|
Amiga Developer Team |
Joined: 20-Jul-2004 Posts: 4446
From: Portsmouth England | | |
|
| @Chris_Y
Sorry chris I disappeared down the rabbit hole of patching sfdc to generate VBCC inlines. (made good progress on that).
Sorry I packed the wrong file! The AmiSSLMaster sfd can be easily parsed with fd2pgrama yourself though as it's only the bigger amissl.sfd that is probematic.
SPECIAL 70 ( or -s 70 for more ecent fd2prgama versions) is the type you need.
_________________ BroadBlues On Blues BroadBlues On Amiga Walker Broad |
|
Status: Offline |
|
|
Chris_Y
| |
Re: Setting up VBCC for 68k and OS4 developement Posted on 2-Mar-2019 18:37:12
| | [ #17 ] |
|
|
|
Elite Member |
Joined: 21-Jun-2003 Posts: 3203
From: Beds, UK | | |
|
| @broadblues
Ah yes, I didn't realise generating that file was so easy. All working now, thanks!
_________________ "Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion Avatar is Tabitha by Eric W Schwartz |
|
Status: Offline |
|
|