![]() |
![]() |
#41 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,539
|
(The whole discussion does not belong into WinUAE-support, but better into support.Apps or coders.C/C++.)
Refer to chapter 1.3.1 of vbcc.pdf for some short installation instructions. Additionally installed applications, not belonging to the base system, usually go under /usr/local on a Unix system. I chose /usr/local/vbcc. The typical structure is: Code:
frank@jaana ll /usr/local/vbcc/ total 20 drwxr-xr-x 2 frank users 512 May 16 2013 bin drwxr-xr-x 2 frank users 512 Aug 23 17:37 config drwxr-xr-x 12 frank users 512 Apr 20 2013 targets Install the targets you need (for example m68k-amigaos) under targets. You find them here: http://sun.hasenbraten.de/vbcc/index.php?view=targets Code:
frank@jaana ll /usr/local/vbcc/targets/ total 40 drwxr-xr-x 4 frank users 512 Nov 18 2012 cf-atari drwxr-xr-x 4 frank users 512 Apr 20 2013 i386-aros drwxr-xr-x 5 frank users 512 Dec 28 2005 i386-netbsd drwxr-xr-x 4 frank users 512 Nov 30 2005 m68k-amigaos drwxr-xr-x 4 frank users 512 Nov 14 2012 m68k-atari drwxr-xr-x 4 frank users 512 Nov 30 2005 ppc-amigaos drwxr-xr-x 5 frank users 512 Dec 23 2005 ppc-morphos drwxr-xr-x 4 frank users 512 Dec 7 2008 ppc-netbsd drwxr-xr-x 4 frank users 512 Nov 30 2005 ppc-powerup drwxr-xr-x 4 frank users 512 Nov 30 2005 ppc-warpos Code:
export PATH=$PATH:/usr/local/vbcc/bin Code:
export VBCC=/usr/local/vbcc Code:
vc +aos68k -o hello_world hello_world.c BTW, the target archives contain config files for AmigaOS/MorphOS. If you don't want to adapt the config files for Unix yourself, you find them here: http://mail.pb-owl.de/~frank/vbcc/2011-08-05/vbcc_unix_config.zip |
![]() |
![]() |
#42 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
@phx
yes, it was ot from the start, but went even more in its course. hower its a task for a mod to move it if neccessary. or do you think we should start over somewhere else? i have dug a bit through the documentation pdf matthey linked to, and recalled again that setpatch and dir approach. i will try to go now systematicly through, i need to learn that properly if i am supposed to do anything in the end (very unlikely ![]() ![]() i will continue through the weekend but may be a little slow since i have now my girlfriend here. i have yet to look at the heades in target archive and compare them to whats in the amiga sdk and the aros source. |
![]() |
![]() |
#43 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
I found the compiler generic assembler stubs (needed for Amiga library register passing) I was thinking of.
Quote:
https://searchcode.com/codesearch/view/9272166/ Maybe something similar could be done with the preprocessor for some of the GCC function and variable attributes? |
|
![]() |
![]() |
#44 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
@phx
followed your instructions so far. still not being able to compile helloworld, apparently vasmm68k_mot is missing. i assume i need to compile that assembler as well. also having only the aos68k config in configs, which is going to be my sole target for starters, while invoking vc it seems to be nesessary to use the option -aos68k. perhaps its the case only while cross compiling. |
![]() |
![]() |
#45 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
http://sun.hasenbraten.de/vasm/ http://sun.hasenbraten.de/vlink/ They are easier to compile than vbcc (targets still needed) and there are "compilation notes" at the links. The configs are editable text files. I believe the default config is vc.config. I believe you can make a copy of the aos68k config to vc.config and this will become your default without specifying a config on the command line. The vbcc manual should have more info in case I'm wrong. |
|
![]() |
![]() |
#46 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
the executables of vasm and vlink do look like native binaries. i obviously need to build sross compiler binaries, which i wasnt been able to yet.
|
![]() |
![]() |
#47 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
If you're on a Unix-like system, then step into the vasm directory and run
make CPU=m68k SYNTAX=mot, and in the vlink directory you just run make. On Windows, you first open the Visual C++ Command Prompt, and replace makewith nmake /f makefile.win32. |
![]() |
![]() |
#48 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,539
|
Quote:
Just copy your favourite config file to vc.config. This is the default for vc. Where are they from? Did you install one of the vbcc_bin_* archives? There are no Linux executables in them. You have to compile them yourself. Quote:
|
||
![]() |
![]() |
#49 | |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
@phx
Quote:
http://mail.pb-owl.de/~frank/vbcc/cu...8k-amigaos.lha i have compiled vlink and vasm now (vasm has given me some warnings). edit: good and bad news. i have now succesfully compiled my hello world under vbcc, but while i was testing it under uae the virtual machine crashed and doesnt want to start again. must look into it, worst case resetting all damn ubuntu. good thing being vbcc installation wasnt so hard after all. Last edited by wawa; 04 November 2014 at 12:02. |
|
![]() |
![]() |
#50 | ||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,539
|
Quote:
Quote:
Code:
frank@tethys gcc -v Using built-in specs. COLLECT_GCC=gcc Target: x86_64--netbsd Configured with: /usr/src2/tools/gcc/../../external/gpl3/gcc/dist/configure --target=x86_64--netbsd --enable-long-long --enable-threads --with-bugurl=http://www.NetBSD.org/Misc/send-pr.html --with-pkgversion='NetBSD nb2 20111202' --enable-__cxa_atexit --with-tune=nocona --with-mpc=/var/obj/mknative/amd64/usr/src2/destdir.amd64/usr --with-mpfr=/var/obj/mknative/amd64/usr/src2/destdir.amd64/usr --with-gmp=/var/obj/mknative/amd64/usr/src2/destdir.amd64/usr --enable-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch --build=x86_64-unknown-netbsd5.99.56 --host=x86_64--netbsd Thread model: posix gcc version 4.5.3 (NetBSD nb2 20110806) frank@tethys gmake CPU=m68k SYNTAX=mot gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 vasm.c -o obj/m68k_mot_vasm.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 atom.c -o obj/m68k_mot_atom.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 expr.c -o obj/m68k_mot_expr.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 symtab.c -o obj/m68k_mot_symtab.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 symbol.c -o obj/m68k_mot_symbol.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 error.c -o obj/m68k_mot_error.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 parse.c -o obj/m68k_mot_parse.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 reloc.c -o obj/m68k_mot_reloc.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 hugeint.c -o obj/m68k_mot_hugeint.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 supp.c -o obj/m68k_mot_supp.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 cpus/m68k/cpu.c -o obj/m68k_mot_cpu.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 syntax/mot/syntax.c -o obj/m68k_mot_syntax.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_test.c -o obj/m68k_mot_output_test.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_elf.c -o obj/m68k_mot_output_elf.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_bin.c -o obj/m68k_mot_output_bin.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_vobj.c -o obj/m68k_mot_output_vobj.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_hunk.c -o obj/m68k_mot_output_hunk.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_aout.c -o obj/m68k_mot_output_aout.o gcc -I. -Icpus/m68k -Isyntax/mot -c -O2 output_tos.c -o obj/m68k_mot_output_tos.o gcc obj/m68k_mot_vasm.o obj/m68k_mot_atom.o obj/m68k_mot_expr.o obj/m68k_mot_symtab.o obj/m68k_mot_symbol.o obj/m68k_mot_error.o obj/m68k_mot_parse.o obj/m68k_mot_reloc.o obj/m68k_mot_hugeint.o obj/m68k_mot_supp.o obj/m68k_mot_cpu.o obj/m68k_mot_syntax.o obj/m68k_mot_output_test.o obj/m68k_mot_output_elf.o obj/m68k_mot_output_bin.o obj/m68k_mot_output_vobj.o obj/m68k_mot_output_hunk.o obj/m68k_mot_output_aout.o obj/m68k_mot_output_tos.o -lm -o vasmm68k_mot frank@tethys |
||
![]() |
![]() |
#51 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
@phx
sorry, it was the one from vbcc_unix_config.zip of course. now i just need to rebuild my compiler environment. i must say losing a whole setup due to simple vm crash has shaken my confidence in vmware. i must reconsider a while. edit: ok, fixed after whole system reboot. Last edited by wawa; 04 November 2014 at 16:51. |
![]() |
![]() |
#52 | |
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
P.S. The new version of vbcc may finally be released soon (before Christmas hopefully ![]() |
|
![]() |
![]() |
#53 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
@matthey
i would prefer aros compiled on aros, but i prefer to check vbb first under linux, since aros depends a lot on up to date gnu tools i suspect. i have vbcc under uae thanks to cubicide and i have it somewhere on genuine amiga drive that i have used on my main system before i went to test aros, but i would prefer not to compile on a hardware i am constantly messing with. as i said, i have recovered ubuntu and even though some settings seem lost, im confirmed able to generate aos executables alright. i will try to generate some simple executable for aros68k tomorrow. i only need to discover how to generate parts of the source using those mmakefile.src. the other problem likely is that vbcc will generate genuine amiga hunk format, while aros uses some sort of elf format for executables (whatever it means ;P). any comment on that? |
![]() |
![]() |
#54 | |||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
![]() Quote:
Quote:
|
|||
![]() |
![]() |
#55 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,539
|
Quote:
I don't know AROS/m68k, but chances are high that they still use relocatable object files as executables, so the standard "elf32m68k" format, which matthey mentioned, won't work very well. It might work when you link the final executable with -belf32m68k and -r option, so it is still an object file. But vlink doesn't make sure that all symbols have been resolved in an object. If you know what you need I can add a new arosm68k target to vlink. Just tell me, or send me an AROS executable which I can analyze. |
|
![]() |
![]() |
#56 | ||
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
Quote:
http://aminet.net/package/dev/c/sdi_headers-1.6 they have been added lately to aros as far i observed the commits, must locate it, the (68k) register stuff should be rewritten against that. perhaps asm inlines can be abstracted similar way and make compiler indipendant. @toni btw, have you ever tested the gcc 4.5.0 68k backend from bernd? it had not so much register support as the genuine amiga compilers, i guess but i dont remember very well. also no source available so probably not a subject for aros. Quote:
frank, if you need an executable, here is are the nightlies: http://aros.sourceforge.net/de/download.php download amiga-m68k-bootiso and pick your favourite example within. also other nightlies contain valid up to date executables for particular platform. but you need to know that aros branches currently into v0 and v1 abis. all traditionally supported platforms that are available in userland (which means practically x86) are v0 for binary compatibility reasons, while aros68k belongs to v1 branch which is a further development en course and breaks the binary compatibility with v0. builds and sources for this branch except for 68k are available here: http://aros.sourceforge.net/de/download2.php let me know if i may be of further assistance. i can check how vbcc compiles on my system, but i think i would need to check the latest sources. what concerns vbcc and aros my idea is so far: 1. introduce vbcc to aros toolchain and let it build automatically with aros build system (are licenses compatible?) 2. adopt mission critical platform specific 68k code (register assignments?) to be compiled with vbcc to object files. everything else may compile with gcc so far. i assume vbcc objects can be linked with gcc linker. 3. eventually introduce further vbcc compatibility to aros source up till it might be compiles with vbcc completely. bu that is a far target. Last edited by TCD; 06 November 2014 at 04:34. Reason: Back-to-back posts merged. |
||
![]() |
![]() |
#57 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
@toni, phx, matt &all interested
i am discussing these possibilities on aros-exec here: http://aros-exec.org/modules/newbb/v...forumpost91053 |
![]() |
![]() |
#58 |
Registered User
Join Date: Jun 2010
Location: USA
Posts: 97
|
I'm the guy wawa mentioned earlier that had done some vbcc builds of certain parts of Aros.
The reason I started is that I don't like the result coming out of gcc. It's huge and the binaries are only vaguely amiga-like at best. Square peg, meet round hole. I think Aros is taking so long because the development path taken is completely backwards, working from x86 with foreign tools and kinda sorta wanting 68k to eventually work. BS, that's untestable and unsustainable. Use Amiga tools to write C replacements of individual libraries, test them individually with an otherwise stock AOS system to isolate the bugs and move to the next library. Writing the entire OS and supporting libraries (CybergraphX, etc) in one shot while also porting to another platform is just insane. Get a working replacement in a stable environment, then port to a completely different platform after you feel confident that the code is reasonably stable. You need an anchor to rely on or you'll never get anywhere. What I did was pull the C directory of Aros and start building and testing the resulting binaries on 3.1. No Aros specific calls, no additions, just binary compatible Amiga executables of similar size to the originals. That was a test to get the development process down before starting on libraries and I think it worked out pretty well. What kills me on the libraries is the massive wad of macros required to force gcc into submission and how far Aros strayed from using Amiga library interfaces, instead falling back to Aros specific calls, making it essentially monolithic, you can't just mix and match with AOS as it stands. Aros becomes more of a reference material than source. I'm all for helping work on 68k Aros, but there's no way I'm going to go down the current path of development. |
![]() |
![]() |
#59 | ||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,569
|
Quote:
Quote:
Totally not acceptable for me. Except of course "foreign tools" part which is topic of this thread. (But they also must not be too native, cross-compilation must be possible) |
||
![]() |
![]() |
#60 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,539
|
Quote:
I have checked the amiga-m68k-bootiso and there is a file called aros-boot.bin. This is neither ELF nor hunk-format, but a 512K ROM image, similar to the original ROM, which can execute at 0xf80000. There is also AROSBootstrap, which is in hunk-format. Don't know how AROS works or boots, though. Quote:
Code:
SECTION S_0,CODE SECSTRT_0: SUBQ.L #4,A7 ;000: 598f MOVEM.L D2-D7/A6,-(A7) ;002: 48e73f02 MOVE.L A0,D7 ;006: 2e08 MOVE.L ABSEXECBASE.W,D4 ;008: 28380004 CLR.L 28(A7) ;00c: 42af001c LEA LAB_0022,A1 ;010: 43f90000029d MOVEQ #37,D0 ;016: 7025 MOVEA.L D4,A6 ;018: 2c44 JSR -552(A6) ;01a: 4eaefdd8 MOVE.L D0,D5 ;01e: 2a00 BNE.S LAB_0000 ;020: 6612 SUBA.L A1,A1 ;022: 93c9 JSR -294(A6) ;024: 4eaefeda ![]() Quote:
|
|||
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMOS for Windows installer using AROS-68K and WinUAE | Mequa | News | 32 | 04 May 2017 09:08 |
New Video of my Aros 68k distribution "Aros Vision" | OlafSch | Amiga scene | 26 | 16 February 2016 11:16 |
How do I create an AROS 68k boot disk? | Leandro Jardim | Amiga scene | 3 | 18 October 2014 03:37 |
News about Aros Vision | OlafSch | Amiga scene | 3 | 09 June 2014 15:04 |
Version 1.3. of Aros Vision 68k online now | OlafSch | Amiga scene | 1 | 19 June 2012 13:43 |
|
|