bebbo / gcc

Bebbo's gcc-6-branch for m68k-amigaos
GNU General Public License v2.0
33 stars 11 forks source link

Status on new version of GCC for Amiga? #193

Closed AJenbo closed 1 year ago

AJenbo commented 1 year ago

First of all thanks for all the grate work you have done in making GCC work for Amiga. It's been a lot of fun to use it for porting Diablo over.

I'm writing here since I'm a bit unsure of how else to contact you ... let me know if you would prefer some other channel.

I have heard that you are woking on bringing up a newer version of GCC for Amiga. Is there a way for me to track the progress on this? Maybe even try it out? GCC 6.5 is getting a bit old for us since it doesn't have ful C++17 support, so we are looking at bumping our minimum compiler up to GCC 8 for future versions. But we also do not want to drop Amiga support :)

bebbo commented 1 year ago

There is the branch amiga10 which is able to build the toolchain and some programs may even run. But it's still a very early state. Also not all changes and fixes are backported.

But since you asked: it's available now for the public.

There is also an amiga11 branch, with real ccmode and lra support, which is not published yet...

Is there a way for me to track the progress on this?

No idea, if I have the time and mood, I do something for the good old Amiga. But there is no plan for this or that.

MBeijer commented 1 year ago

@bebbo I get this error when compiling clib2 with gcc10:

(insn 4852 4851 2511 448 (set (reg:SI 8 a0)
        (mem/f/c:SI (plus:SI (reg/v/f:SI 4 d4 [orig:513 stream ] [513])
                (const_int 16 [0x10])) [4 MEM[(struct iob *)stream_548(D)].iob_Buffer+0 S4 A16])) "stdio_vfprintf.c":1694:9 -1
     (nil))
during RTL pass: reload
stdio_vfprintf.c:1735:1: internal compiler error: in extract_insn, at recog.c:2316

Will remove clib2 for now and see if it gets any further

MBeijer commented 1 year ago

skipping clib2 got me to a point where the toolchain was built at least, but i'm getting errors further down the line when I'm testing the toolchain and compiling zlib:

(insn 1229 651 1230 (set (reg:SI 1 d1 [orig:169 len ] [169])
        (lshiftrt:SI (reg:SI 1 d1 [orig:169 len ] [169])
            (const_int 0 [0]))) "/work/dependencies/zlib/deflate.c":1858:13 323 {lshrsi3}
     (nil))
/work/dependencies/zlib/deflate.c: In function 'deflate_stored':
/work/dependencies/zlib/deflate.c:1868:1: error: insn does not satisfy its constraints:
 1868 | }
      | ^
(insn 1229 651 1230 (set (reg:SI 1 d1 [orig:169 len ] [169])
        (lshiftrt:SI (reg:SI 1 d1 [orig:169 len ] [169])
            (const_int 0 [0]))) "/work/dependencies/zlib/deflate.c":1858:13 323 {lshrsi3}
     (nil))
during RTL pass: final
/work/dependencies/zlib/deflate.c:1868:1: internal compiler error: in final_scan_insn_1, at final.c:3036
unrecognized DWARF version in .debug_info at 6
(insn 1229 651 1230 (set (reg:SI 1 d1 [orig:169 len ] [169])
        (lshiftrt:SI (reg:SI 1 d1 [orig:169 len ] [169])
            (const_int 0 [0]))) "/work/dependencies/zlib/deflate.c":1858:13 323 {lshrsi3}
     (nil))
/work/dependencies/zlib/deflate.c: In function 'deflate_stored':
/work/dependencies/zlib/deflate.c:1868:1: error: insn does not satisfy its constraints:
 1868 | }
      | ^
(insn 1229 651 1230 (set (reg:SI 1 d1 [orig:169 len ] [169])
        (lshiftrt:SI (reg:SI 1 d1 [orig:169 len ] [169])
            (const_int 0 [0]))) "/work/dependencies/zlib/deflate.c":1858:13 323 {lshrsi3}
     (nil))
during RTL pass: final
/work/dependencies/zlib/deflate.c:1868:1: internal compiler error: in final_scan_insn_1, at final.c:3036

this is where zlib is compiled: https://github.com/AmigaPorts/docker-amiga-gcc/blob/master/platforms/m68k-amigaos-gcc10/prep.sh

bebbo commented 1 year ago

The branch amiga13.1 seems to be ok now.

MBeijer commented 1 year ago

Yeah, this issue can be closed. :)