02 January 2019, 02:48 | #981 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
|
macOS awk is well known for not being 100% compatible with gawk.
|
02 January 2019, 15:58 | #982 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
02 January 2019, 16:58 | #983 |
Registered User
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
|
I used Linux & BSD for years. Their package management systems suck and none of the window managers ever appealed to me. In fact I stuck with twm for many years just to avoid the bloatware.
macOS is fast, reliable, and honestly, an absolute pleasure to use. A fantastic OS. |
02 January 2019, 17:53 | #984 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
Too bad, I try to compile it in elf but it's plain stupid.
/mnt/e/usr/local/amiga/m68k-amigaos/clib/cross/bin/../lib/gcc/m68k-unknown-amigaos/3.4.6/../../../../m68k-unknown-amigaos/include/stdlib.h:43:25: Why it needs another stdlib.h ... WTF?! |
02 January 2019, 18:03 | #985 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
Why don’t you use gcc6? What is the reason for still using gcc3?
|
02 January 2019, 18:12 | #986 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
It just doesn't work for most stuff I tried.
It'a a great effort and I hope it to be usable one day. |
02 January 2019, 18:15 | #987 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
The GCC 3 parser is loose enough to drive a train through and GCC 6 isn't, in other words.
|
02 January 2019, 18:18 | #988 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
02 January 2019, 18:27 | #989 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
Try a big c++ project.
|
02 January 2019, 18:28 | #990 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
02 January 2019, 18:39 | #991 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
Can you go to #ap...-co.e ?
|
02 January 2019, 19:07 | #992 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
02 January 2019, 23:59 | #993 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
I googled that without useful result...
... please use ecplicit lyrics! And to keep the community happy/tormale/whatever, I have created a tutorial for Eclipse as an IDE for programming and debugging Amiga applications. https://franke.ms/amiga/gdb-eclipse.wiki |
04 January 2019, 12:36 | #994 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
How can I fix this ?
/amiga-gcc/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: different object file formats composing set ___CTOR_LIST__ /amiga-gcc/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: different object file formats composing set ___DTOR_LIST__ |
04 January 2019, 13:09 | #995 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
|
Sounds like the constructors and destructors aren't compiled to the same object code format. A clean rebuild of all .o and .a files is in order by the sound of it.
|
04 January 2019, 13:27 | #996 |
Registered User
Join Date: Jul 2008
Location: Poland
Posts: 662
|
Didn't help.
|
04 January 2019, 14:52 | #997 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
Maybe share the project somehow?? |
|
04 January 2019, 19:07 | #998 |
Registered User
Join Date: Feb 2018
Location: Poland
Posts: 12
|
It looks that I found unwanted compiler optimization - when it comes to debugging...
I have a simple hello.c code: Code:
#include <stdio.h> int main(int argc, char **argv) { puts("hello world!"); printf("argc=%ld\r\n", argc); for (int i = 0; i < argc; ++i) { char *t = argv[i]; printf("arg=%s\r\n", t); } return 0; } Code:
m68k-amigaos-gcc hello.c -g -noixemul -o hello-noixemul Below is the console snapshot from the same point in time as on the above FS-UAE screenshot. I bolded sections I would ask for. Code:
$ m68k-amigaos-gdb hello-noixemul GNU gdb (GDB) 8.2.50.20181223-111052-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-apple-darwin18.2.0 --target=m68k-amigaos". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from hello-noixemul...done. (gdb) target remote :2345 Remote debugging using :2345 warning: Target reported unsupported offsets: Text=680246d8;Data=68018d78;Bss=68017a88; warning: Target reported unsupported offsets: Text=680246d8;Data=68018d78;Bss=68017a88; 0x680246d8 in _stext () (gdb) list 1 #include <stdio.h> 2 3 int main(int argc, char **argv) { 4 puts("hello world!"); 5 printf("argc=%ld\r\n", argc); 6 for (int i = 0; i < argc; ++i) { 7 char *t = argv[i]; 8 printf("arg=%s\r\n", t); 9 } 10 return 0; (gdb) b 8 Breakpoint 1 at 0x680247fe: file hello.c, line 8. (gdb) c Continuing. Breakpoint 1, main (argc=7, argv=0x680186b4) at hello.c:8 8 printf("arg=%s\r\n", t); (gdb) c Continuing. Breakpoint 1, main (argc=7, argv=0x680186b4) at hello.c:8 8 printf("arg=%s\r\n", t); (gdb) c Continuing. Breakpoint 1, main (argc=7, argv=0x680186b4) at hello.c:8 8 printf("arg=%s\r\n", t); (gdb) c Continuing. Breakpoint 1, main (argc=7, argv=0x680186b4) at hello.c:8 8 printf("arg=%s\r\n", t); (gdb) info local i = 3 (gdb) p argv[i] $1 = 0x68018691 "ccc" (gdb) p t No symbol "t" in current context. (gdb) 2. Symbol "t" is declared and assigned at line 7, then used at line 8, but gdb does not show it as a valid symbol in this context (info local, p t at the end of console snapshot) - p i of course works in this context too. The result printed out to the screen is correct so there must be some kind of optimization in this place like 'putting t symbol into address register' - but why if I didn't compile sources with any of the -O flags? |
04 January 2019, 20:12 | #999 |
Registered User
Join Date: May 2018
Location: Delta, Canada
Posts: 192
|
I cannot answer all your questions, but the reason there is no symbol "t" I can at least speculate on.
Symbol "t" is only use as a temporary once and the compiler may decide to just rewrite the call to printf("arg=%s\r\n", [argv[i]);and eliminate the variable. It may decide to perform certain rewrites no matter if you enabled optimization or not. (I am not going to argue whether that is desirable or not, just that such is life.) There may be some option to advice the compiler to produce more debuggable output, I do not know. Even if the compiler does such rewrites, the debug information (DWARF) can express that the variable exists and have a given value, also when it does not correspond to any actual physical location of its own. I suppose that this is not implemented or done here. |
04 January 2019, 21:39 | #1000 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
It's just an information and don't plan to remove that warnings. 2. no idea guess hth313 is right here and it's too simple that even without optimizer that variable is discarded. |
|
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 |
|
|