23 February 2019, 23:40 | #1101 |
Registered User
Join Date: Jul 2017
Location: San Jose
Posts: 652
|
GCC 6.2 toolchain for AmigaOS 3
I just checked. It works :-)
At first it crashed with newlib, but it ultimately turned out just to be a matter of not enough stacksize. Noixemul is still recommended as it produces a much smaller executable. WRT vbcc: I don't know why vbcc is part of the toolchain at all (vasm is very useful to have in there, though!). In general, Bebbo is more concerned about making gcc great. Last edited by pipper; 24 February 2019 at 02:02. |
24 February 2019, 14:26 | #1102 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
|
|
26 February 2019, 09:32 | #1103 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
Yesterday I used this toolchain to compile a bigger application I originally created with StormC4 / gcc 2.95 mode.
As expected the binary is bigger, but the program also runs faster, only taking about 80% of the time for its operation. But one issue I noticed is that it crashed as soon as I changed the CPU to 68000 (WinUAE). On 68020-68040 it ran without problems. Binaries are attached. Btw I don't open the libraries manually. As the StormC startup code allows to auto-open the libraries I used that feature. Could this be a problem with the toolchain? |
26 February 2019, 14:11 | #1104 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Code:
static const SimpleString __s = ""; const SimpleString& DiffFilePartition::GetDiffLineText(size_t p_Index) const { if(m_DiffLinesArray.IsEmpty()|| p_Index >= m_DiffLinesArray.Size()) { return __s; } Code:
void * operator new (std::size_t sz) { void *p = malloc(sz); if (p) return p; perror("std::bad_alloc"); abort(); } both helps with code size plus it runs on 68000 too. Last edited by bebbo; 26 October 2023 at 13:18. |
|
26 February 2019, 18:29 | #1105 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
Wow, smaller and faster, great
Thanks for these hints! |
01 March 2019, 09:28 | #1106 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 189
|
Hi bebbo,
unfortunately I wasn't able to recreate the good binary result you posted here. Using this flags Code:
CXXFLAGS=-Wall -Wno-unused-function -fomit-frame-pointer -fno-rtti -fno-exceptions -noixemul -Os Did you use some other magic there? |
01 March 2019, 09:34 | #1107 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Code:
export CFLAGS_FOR_TARGET="-Os -fomit-frame-pointer" |
|
02 March 2019, 09:46 | #1108 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Code:
gcc version 6.5.0b 190302093159 (GCC) |
|
16 March 2019, 16:05 | #1109 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Has anyone been able to build vasm, vlink, and vbcc? I can get the gcc toolchain to build with no errors on macOS, but when I use it to build vasm I get errors like these:
Code:
amiga-gcc/m68k-amigaos/sys-include/stdio.h:66:9: error: unknown type name '__FILE' typedef __FILE FILE; amiga-gcc/m68k-amigaos/sys-include/stdio.h:747:26: error: dereferencing pointer to incomplete type 'struct _reent' return (__sgetc_r(_ptr, _stdin_r(_ptr))); amiga-gcc/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: cannot find ncrt0.o: No such file or directory |
16 March 2019, 20:30 | #1110 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Plus you have to fix tfloat.h that strtod is used instead of strtold. the attached Makefile.68k can be used directly with make -f Makefile.68k Last edited by bebbo; 26 October 2023 at 13:18. |
|
19 March 2019, 19:14 | #1111 |
Registered User
Join Date: Oct 2017
Location: Amsterdam
Posts: 231
|
bebbo, I followed your guide at this url. I didn't build the toolchain myself, but used your installer.
After creating the helloworld project, I received the error messages that g++ and gcc are not in the PATH... I did two things: - Added the location where the bin folder is to the PATH environment variable in Windows system settings - Renamed m68k-amigaos-g++.exe and m68k-amigaos-gcc.exe to respectively g++.exe and gcc.exe The above steps make the error messages go away, but this can't be the idea behind it, can it? Where you are stating /opt/amiga/bin in the guide, I assume you mean the 'amiga-gcc/bin' directory that your toolchain creates, right? *EDIT: next error when rebuilding the project after change of settings as mentioned in the guide: Code:
Program "make" not found in PATH Am I missing an important additional step that is not mentioned in the guide? Should I have an installed cygwin environment that might add all these things to the PATH? *EDIT2: the problems with make are gone after running the cmdline.bat file Last edited by Amiga68k; 19 March 2019 at 22:18. |
19 March 2019, 19:41 | #1112 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
Thanks, I've already tried -noixemul and the various -mcrt options, but I can't get it to work. I think the macOS build procedure somehow quietly fails, but I have no more useful info. |
|
20 March 2019, 11:25 | #1113 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
[QUOTE=Amiga68k;1312071]bebbo, I followed your guide at this url. I didn't build the toolchain myself, but used your installer.
After creating the helloworld project, I received the error messages that g++ and gcc are not in the PATH... I did two things: - Added the location where the bin folder is to the PATH environment variable in Windows system settings - Renamed m68k-amigaos-g++.exe and m68k-amigaos-gcc.exe to respectively g++.exe and gcc.exe [/code] I guess you skipped the step to enter the Cross Compiler Prefix and the Cross Compiler Path * prefix is "m68k-amigaos-" and * the path to the bin folder (e.g. "/opt/amiga/bin") depends on your installation please undo the rename. Quote:
|
|
20 March 2019, 11:29 | #1114 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Maybe someone else can help here? |
|
20 March 2019, 11:51 | #1115 | |
Registered User
Join Date: Oct 2017
Location: Amsterdam
Posts: 231
|
Quote:
However, when I go to C/C++ Build Settings and do an additional "Apply and Close", the error messages are no longer there... (perhaps a bug in Eclipse?) |
|
21 March 2019, 10:27 | #1116 | ||
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Quote:
Quote:
It's very picky about the build environment. I removed the manually installed dependencies and added them via Homebrew, and installed GCC instead of the older version of clang and its GCC wrapper, and it works better now. There are still unexpected linker errors about missing library bases, but I can just add those manually. |
||
22 March 2019, 23:28 | #1117 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
... I updated https://franke.ms/download/amiga-gcc-macos.tgz and vasm builds with the Makefile and changes from above. PS: maybe you should try an absolute path as prefix... |
|
03 April 2019, 18:39 | #1118 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
I can't compile libnix.
*** No rules to make 'nrcrt0.S', needed by 'nrcrt0.o'. Stop. Any ideas? |
03 April 2019, 20:41 | #1119 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
04 April 2019, 23:43 | #1120 |
Registered User
Join Date: Apr 2019
Location: Kings Lynn
Posts: 17
|
Hi, I've followed the guide to get eclipse/bgdbserver up and running.. It all worked up until trying to actually debug where I get an error from bgdbserver (on winUAE and echoed to Eclipse) saying:
failed to load program /test/hello-world;exit Any ideas? |
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 |
|
|