05 March 2010, 20:09 | #1 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
VBCC as cross sompiler under Linux
Hi there,
has anybody experiences using VBCC as a cross compiler Linux->AmigaOS? I've downloaded the sources and the target specific tarball, created directory bin/ and ran make. All questions about data types were answered with the standards (seemed quite reasonable). Then I've copied config/aos68 to /etc, set VBCC to the source's directory and tried Code:
./bin/vbccm68k +aos68k helloworld.c Code:
error 1: only one input file allowed aborting... 1 error found! EDIT: Using vc now instead of vbccm68k. That's better, but still does not work. Advice on using vbcc is still appreciated. EDIT2: Yay, it works! You have to edit the config file aos86k to use Linux paths and commands, and don't forget to copy the updated version to /etc. Last edited by gilgamesh; 05 March 2010 at 21:54. |
09 March 2010, 13:54 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
As you already figured out you have to use the compiler frontend "vc" when you want to use config files (which is highly recommended for convenience). The config file defines which compiler, which assembler and which linker to use and which target-specific options all those programs get passed.
I guess you got the sources from Volker's vbcc home page. This version is quite old (probably V0.8i?). You may download the recent V0.9a Linux binaries from http://sun.hasenbraten.de/vbcc/index.php?view=binaries (last entry on the page). The binaries are quite large though, because I linked them statically to make them work with as much Linux versions as possible. Theoretically vbcc can be hosted as a cross compiler on any operating system. Just tell me what you need. |
09 March 2010, 14:08 | #3 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Hey, the linked binaries work just fine under Linux.
(Although I'd prefer if the configuration files didn't need to go to /etc.) Is there some way to generate executables for KS1.3? |
09 March 2010, 16:47 | #4 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Quote:
The recommended installation for Unix-like systems is to set $VBCC to "/usr/local/vbcc" and create there a directory "bin" for the binaries, "config" for the configuration files and "targets" for the targets to use. You may want to download http://mail.pb-owl.de/~frank/vbcc/2009-10-16/vbcc_unix_config.zip for example config files with Unix paths. Quote:
I have also a Kickstart 1.x compatible startup code, but some functions in amiga.lib (not sure about vc.lib ATM) still require OS2.0. When there is a big interest is Kick 1.x support, it is not difficult to change that, though. |
||
09 March 2010, 17:48 | #5 | ||
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Quote:
Quote:
|
||
10 March 2010, 15:34 | #6 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Ok, I just checked vclib and amigalib and both seem to be quite clean (OS version is checked where OS2.x/3.x functions are called). I only had to fix getenv(), which would crash under 1.x.
So what you have to do is the following: Take the attached startup13.o.68k, rename to startup13.o and copy it into vbcc's 68k lib directory (where startup.o is). Then create a new config file, called kick13. Just copy aos68k to kick13, replace startup.o by startup13.o and remove the option "-Rshort" from the line "-ldnodb=-s -Rshort". That's it. Compile your Kickstart 1.x compatible executable with "vc +kick13 ...". Contact me when something is missing. Last edited by phx; 07 December 2020 at 11:51. |
10 March 2010, 16:23 | #7 |
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 997
|
Very cool. Thank you
Works flawless so far. I hope this makes its way into the official release, too. |
10 March 2010, 16:44 | #8 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Sure. I wrote a note about it.
|
10 March 2010, 22:51 | #9 | |
Registered User
Join Date: Sep 2004
Location: Brasil
Age: 49
Posts: 181
|
Quote:
I wrote a Volker after the email in that i ask you for the sources to compile vbcc in linux 64 bits, and he uploaded the last versiĆ³n at his home page. And i'm insterested in KS1.x compatibility too, thanks. |
|
12 March 2010, 16:01 | #10 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Thanks for adding the 1.3 support!
|
19 March 2010, 17:42 | #11 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
phx,
I downoaded the vbcc sources from Volker's page and built them for Win32 and OSX, but noticed these were still the old 0.8 sources. Do you have any new Win32 and OSX builds, or the latest sources available somewhere? |
19 March 2010, 20:00 | #12 | |
Registered User
Join Date: Sep 2004
Location: Brasil
Age: 49
Posts: 181
|
Quote:
Code:
kahlan:~$ vbccm68k vbcc V0.9a (c) in 1995-2009 by Volker Barthelmann vbcc code-generator for m68k/ColdFire V1.8 (c) in 1995-2010 by Volker Barthelmann |
|
19 March 2010, 21:52 | #13 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
Code:
zeroblue ~/downloads/vbcc/bin vbccm68k vbcc V0.8j (c) in 1995-2006 by Volker Barthelmann vbcc code-generator for m68k/ColdFire V1.6a (c) in 1995-2005 by Volker Barthelmann EDIT: LOL nevermind you're right, the sources are updated. This is what I call a "too many fingers error" Thanks again. |
|
21 March 2010, 12:43 | #14 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Seems Volker has updated the source recently. Can be only a few weeks ago, because the 68k CodeGen is from 2010. So it even includes some of the post-V0.9a bug fixes (but maybe not all - I did the last fix on the preprocessor a week ago).
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling CLib37 with VBCC 0.9 | tnt23 | Coders. General | 2 | 29 July 2013 10:28 |
Porting to Tiny Core Linux and Puppy Linux | lorenzos | support.FS-UAE | 1 | 05 January 2013 16:13 |
Using timer.device in C (VBCC) | DBAlex | Coders. General | 2 | 28 June 2011 22:10 |
VBCC 0.8j for Windows | hitchhikr | Coders. General | 11 | 09 October 2008 00:58 |
Kickstart 1.3 and GCC or VBCC? | cdoty | Coders. General | 1 | 23 April 2005 06:10 |
|
|