23 March 2017, 17:40 | #121 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
sorry, no matter..
Last edited by wawa; 23 March 2017 at 17:49. |
23 March 2017, 20:36 | #122 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 681
|
Quote:
Code:
git clone https://github.com/bebbo/amigaos-cross-toolchain.git cd amigaos-cross-toolchain/submodules git clone https://github.com/bebbo/gcc --depth 1 -b gcc-6-branch gcc-6 cd .. ./toolchain-m68k build Bebbo |
|
23 March 2017, 23:07 | #123 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,414
|
Very cool to see you guys working on bringing a newer version of gcc to 68K....well done
I was always stuck with gcc 3.4 back in the day which made it hard to port newer games. How long before people can download the (pre-built) files need to get gcc 6.2 building using something like AmiDevCpp? Is gcc 6.2 now producing more efficient 68K assembler than gcc 3.4 overall (not just for isolated methods)? |
24 March 2017, 03:33 | #124 |
Registered User
Join Date: Dec 2016
Location: USA
Posts: 101
|
I'm trying to build this on the Windows 10 Ubuntu shell. I get this when running toolchain-m68k --prefix=/opt/m68k-amigaos build:
Code:
checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... m68k-unknown-amigaos checking for i686-linux-gnu-gcc... (cached) /usr/bin/gcc -m32 -std=gnu11 checking for C compiler default output... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. make: *** [configure-opcodes] Error 1 ERROR: command "make -j1" failed with 2 |
24 March 2017, 16:06 | #125 | ||
Banned
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
|
Quote:
Quote:
1) What are the chances of bebbo's changes being accepted into the official GCC 68k backend? 2) Will NovaCoder return to the Amiga with a new improved GCC compiler for the 68k available? |
||
24 March 2017, 17:37 | #126 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 681
|
Quote:
Bebbo |
|
24 March 2017, 17:54 | #127 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 681
|
Quote:
Maybe you have the compiler but not the libs? Try this: Code:
apt-get install gcc-multilib g++-multilib |
|
24 March 2017, 18:51 | #128 | |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,203
|
Quote:
@LuigiThirty: Try looking at the mentioned config.log, in my case it was pretty short. |
|
24 March 2017, 19:01 | #129 |
Registered User
Join Date: Dec 2016
Location: USA
Posts: 101
|
Okay yeah, it only supports amd64 binaries. I'll try it in an actual Ubuntu VM instead.
|
24 March 2017, 23:33 | #130 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 681
|
|
25 March 2017, 00:27 | #131 |
Registered User
Join Date: Dec 2016
Location: USA
Posts: 101
|
Okay cool, I got it compiling Amiga executables in Cygwin 32-bit, but the standard C library seems to be missing? I'm trying to compile this hello world application using stdio as well as the Amiga libraries.
Code:
#include <stdio.h> #include <proto/dos.h> #include <proto/exec.h> struct DosLibrary *DOSBase = NULL; int main(){ if ((DOSBase = (struct DosLibrary *) OpenLibrary("dos.library", 34))) { char msg[] = "Hello world, this is GCC 6.3.1!"; int length = strlen(msg); Write(Output(), msg, length); CloseLibrary((struct Library *)DOSBase); } return 0; } Code:
$ make m68k-amigaos-gcc -g -noixemul -fbaserel -m68000 -msmall-code -Os -Wall -fomit-frame-pointer -o hello-ks13 hello-ks13.c hello-ks13.c: In function ‘main’: hello-ks13.c:9:39: warning: pointer targets in initialization differ in signedness [-Wpointer-sign] if ((DOSBase = (struct DosLibrary *) OpenLibrary("dos.library", 34))) { ^~~~~~~~~~~ hello-ks13.c:11:16: warning: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] int length = strlen(msg); ^~~~~~ |
25 March 2017, 01:08 | #132 | |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,414
|
Quote:
|
|
25 March 2017, 02:22 | #133 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
i have some problems running amiga gcc6.2 generated code under aros68k which im trying to research, but while at that i have let the compilers output asm of a simple helloworld for comparison:
Code:
#include <stdio.h> int main(void) { printf("Hallo Welt!"); } Code:
#NO_APP .file "hw.c" .section .rodata .LC0: .string "Hallo Welt!" .text .align 2 .globl main .type main, @function main: link.w %a5,#0 pea .LC0 jsr printf addq.l #4,%sp unlk %a5 rts .size main, .-main .ident "GCC: (GNU) 4.6.4" Code:
#NO_APP .file "hw.c" .section .rodata .LC0: .string "Hallo Welt!" .text .align 2 .globl main .type main, @function main: link.w %a5,#0 pea .LC0 jsr printf addq.l #4,%sp moveq #0,%d0 unlk %a5 rts .size main, .-main .ident "GCC: (GNU) 6.3.0" Code:
#NO_APP .text .LC0: .ascii "Hallo Welt!\0" .align 2 .globl _main _main: link.w fp,#0 pea .LC0 jsr _printf addq.l #4,sp moveq #0,d0 unlk fp rts |
25 March 2017, 02:49 | #134 |
Registered User
Join Date: Dec 2016
Location: USA
Posts: 101
|
I tried building the examples in the example folder with the makefile there and I got the same error, printf not being defined. Hm. I'll try rebuilding, maybe there was a problem setting up configurations or something.
|
25 March 2017, 03:18 | #135 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
undefined referrence? did you use -noixemul option when invoking the gcc?
|
25 March 2017, 03:22 | #136 |
Registered User
Join Date: Dec 2016
Location: USA
Posts: 101
|
Yeah, just using the makefile.
Code:
Luigi@Luigi-PC ~/amigaos-cross-toolchain/examples $ make m68k-amigaos-gcc -g -noixemul -m68020 -Os -Wall -fomit-frame-pointer -o hello-stdio hello-stdio.c /tmp/ccDfnSy0.o(.text+0x16): In function `': /home/Luigi/amigaos-cross-toolchain/examples/hello-stdio.c:5: undefined reference to `printf' collect2: error: ld returned 1 exit status make: *** [Makefile:24: hello-stdio] Error 1 Last edited by LuigiThirty; 25 March 2017 at 06:44. |
25 March 2017, 11:47 | #137 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 681
|
Quote:
I also fixed the handling of inline functions in libnix which caused linking issues. Bebbo |
|
25 March 2017, 14:16 | #138 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
thx, have just build it again, this time in the user space to be able to simply add headers and libs. no problem found.
|
25 March 2017, 17:17 | #139 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,200
|
Is the compiler using an up-to-date version of libStdC++?
|
25 March 2017, 17:51 | #140 |
Registered User
Join Date: Dec 2016
Location: USA
Posts: 101
|
Yep, I can use stdlib functions again. Thanks! Pulling the latest git and rebuilding GCC didn't give me a m68k-amigaos-g++ though.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New GCC based dev toolchain for AmigaOS 3.x | cla | Coders. Releases | 8 | 24 December 2017 10:18 |
Issue with photon/xxxx WinUAE Toolchain | arpz | Coders. Asm / Hardware | 2 | 26 September 2015 22:33 |
New 68k gcc toolchain | arti | Coders. C/C++ | 17 | 31 July 2015 03:59 |
Hannibal's WinUAE Demo Toolchain 5 | Bobic | Amiga scene | 1 | 23 July 2015 21:04 |
From gcc to vbcc. | Cowcat | Coders. General | 9 | 06 June 2014 14:45 |
|
|