English Amiga Board Amiga Lore


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 05 March 2010, 21:09   #1
gilgamesh
Linux snob
gilgamesh's Avatar
 
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
Now VBCC complains about
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 22:54.
gilgamesh is offline  
AdSense AdSense  
Old 09 March 2010, 14:54   #2
phx
Registered User

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 507
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.
phx is offline  
Old 09 March 2010, 15:08   #3
gilgamesh
Linux snob
gilgamesh's Avatar
 
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?
gilgamesh is offline  
Old 09 March 2010, 17:47   #4
phx
Registered User

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 507
Quote:
Originally Posted by gilgamesh View Post
(Although I'd prefer if the configuration files didn't need to go to /etc.)
They don't have to. As mentioned in the documentation you can set the environment variable $VBCC to define the location of the binaries and configs.
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:
Is there some way to generate executables for KS1.3?
Sure. Just don't use vbcc's startup code and libraries (-nostdlib) and make sure to remove the option -Rshort from your 68k config file, to prevent vlink from generating relocation hunks with 16-bit offsets, which are only supported since V36.
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.
phx is offline  
Old 09 March 2010, 18:48   #5
gilgamesh
Linux snob
gilgamesh's Avatar
 
Join Date: Sep 2008
Location: Monkey Island
Posts: 965
Quote:
Originally Posted by phx View Post
As mentioned in the documentation you can set the environment variable $VBCC to define the location of the binaries and configs.
Ah, I see now.


Quote:
Originally Posted by phx View Post
When there is a big interest is Kick 1.x support, it is not difficult to change that, though.
I'm definitely interested in KS1.x compatibility. Most people consider A500 to be the Amiga. And I think it would be cool if vbcc's standard libraries addressed the whole classic Amiga family. So if it's not too much work...
gilgamesh is offline  
Old 10 March 2010, 16:34   #6
phx
Registered User

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 507
Quote:
Originally Posted by gilgamesh View Post
I'm definitely interested in KS1.x compatibility.
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.
Attached Files
File Type: 68k startup13.o.68k (1.2 KB, 117 views)
phx is offline  
Old 10 March 2010, 17:23   #7
gilgamesh
Linux snob
gilgamesh's Avatar
 
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.
gilgamesh is offline  
Old 10 March 2010, 17:44   #8
phx
Registered User

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 507
Sure. I wrote a note about it.
phx is offline  
Old 10 March 2010, 23:51   #9
SyX
Registered User

 
Join Date: Sep 2004
Location: Spain
Age: 40
Posts: 106
Quote:
Originally Posted by phx View Post
I guess you got the sources from Volker's vbcc home page. This version is quite old (probably V0.8i?).
Hi Frank,

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.
SyX is offline  
Old 12 March 2010, 17:01   #10
Leffmann
Leffmann with two n's

Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,498
Thanks for adding the 1.3 support!
Leffmann is offline  
Old 19 March 2010, 18:42   #11
Leffmann
Leffmann with two n's

Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,498
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?
Leffmann is offline  
Old 19 March 2010, 21:00   #12
SyX
Registered User

 
Join Date: Sep 2004
Location: Spain
Age: 40
Posts: 106
Quote:
Originally Posted by Leffmann View Post
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?
Are you sure?? I have downloaded and compiled the sources of Volker page. And when i launch vbcc, i get:
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
I have uploaded this sources to the Zone.
SyX is offline  
Old 19 March 2010, 22:52   #13
Leffmann
Leffmann with two n's

Leffmann's Avatar
 
Join Date: Jul 2008
Location: Sweden
Posts: 1,498
Quote:
Originally Posted by Lionheart View Post
Are you sure?? I have downloaded and compiled the sources of Volker page. And when i launch vbcc, i get:
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
I have uploaded this sources to the Zone.
This is what I get

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
Will try the sources in the zone as well..

EDIT: LOL nevermind you're right, the sources are updated. This is what I call a "too many fingers error" Thanks again.
Leffmann is offline  
Old 21 March 2010, 13:43   #14
phx
Registered User

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 507
Quote:
Originally Posted by Lionheart View Post
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
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).
phx is offline  
AdSense AdSense  
 


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 11:28
Porting to Tiny Core Linux and Puppy Linux lorenzos support.FS-UAE 1 05 January 2013 17:13
Using timer.device in C (VBCC) DBAlex Coders. General 2 28 June 2011 23:10
VBCC 0.8j for Windows hitchhikr Coders. General 11 09 October 2008 01:58
Kickstart 1.3 and GCC or VBCC? cdoty Coders. General 1 23 April 2005 07:10

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:25.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Page generated in 0.17635 seconds with 12 queries