![]() |
|
|||||||
| Register | >> Amiga FAQ/Wiki << | Rules & Help | Members List / Moderators List | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 965
|
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. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Nov 2009
Location: Herford / Germany
Posts: 264
|
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. ![]() |
|
|
|
|
|
#3 |
|
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 965
|
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? |
|
|
|
|
|
#4 | ||
|
Registered User
Join Date: Nov 2009
Location: Herford / Germany
Posts: 264
|
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. |
||
|
|
|
|
|
#5 | ||
|
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 965
|
Quote:
![]() Quote:
|
||
|
|
|
|
|
#6 |
|
Registered User
Join Date: Nov 2009
Location: Herford / Germany
Posts: 264
|
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. |
|
|
|
|
|
#7 |
|
Linux snob
Join Date: Sep 2008
Location: Monkey Island
Posts: 965
|
Very cool. Thank you
![]() Works flawless so far. I hope this makes its way into the official release, too. |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Nov 2009
Location: Herford / Germany
Posts: 264
|
Sure. I wrote a note about it.
|
|
|
|
|
|
#9 | |
|
Registered User
Join Date: Sep 2004
Location: Spain
Age: 38
Posts: 103
|
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. |
|
|
|
|
|
|
#10 |
|
Leffmann with two n's
Join Date: Jul 2008
Location: Sweden
Posts: 1,189
|
Thanks for adding the 1.3 support!
|
|
|
|
|
|
#11 |
|
Leffmann with two n's
Join Date: Jul 2008
Location: Sweden
Posts: 1,189
|
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? |
|
|
|
|
|
#12 | |
|
Registered User
Join Date: Sep 2004
Location: Spain
Age: 38
Posts: 103
|
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 |
|
|
|
|
|
|
#13 | |
|
Leffmann with two n's
Join Date: Jul 2008
Location: Sweden
Posts: 1,189
|
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. |
|
|
|
|
|
|
#14 |
|
Registered User
Join Date: Nov 2009
Location: Herford / Germany
Posts: 264
|
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 |
| 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 |
| cross dos | Dave_wb | support.Hardware | 15 | 27 March 2005 18:04 |
| Compiler: vbcc 0.8g patch 2 released | Paul | News | 0 | 29 November 2004 15:41 |
| cross dos help | fastflange | request.Apps | 2 | 19 June 2002 17:56 |