Has anyone gotten zpugcc to compile?

Discussion of developmental aspects of the MiSTer Project.
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

This is needed for Atari800 core, maybe others? On Cygwin it barfs on configure, unable to determine host type. On Linux, I get further, but it fails here.

/usr/bin/ld: cp/except.o: in function `nothrow_libfn_p':
except.c:(.text+0x21c5): undefined reference to `libc_name_p'
collect2: error: ld returned 1 exit status


Is this the right site for this?

https://github.com/zylin/zpugcc
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

Oh wait. There's a release directory with gcc.exe in it for Windows. Going to see if I can build with this next weekend when I get some time.
robinsonb5
Posts: 129
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 57 times

Re: Has anyone gotten zpugcc to compile?

Unread post by robinsonb5 »

cathrynmataga wrote: Tue Oct 19, 2021 1:27 am This is needed for Atari800 core, maybe others? On Cygwin it barfs on configure, unable to determine host type. On Linux, I get further, but it fails here.
I noticed this a few weeks ago (I haven't used the ZPU for a while, and was curious to know how much bit-rot had set in) - I think it's the same problem referenced in this bug:
https://github.com/zylin/zpugcc/issues/10
And if so, there's a solution mentioned towards the end, namely typing

Code: Select all

export CC="gcc -fgnu89-inline"
before starting the build process.

I haven't had a chance to try it yet, though - do please let me know if it works for you.
robinsonb5
Posts: 129
Joined: Fri Jun 19, 2020 8:54 pm
Has thanked: 13 times
Been thanked: 57 times

Re: Has anyone gotten zpugcc to compile?

Unread post by robinsonb5 »

So now I have had a chance to try it, and it does work.
Furthermore there are a few outstanding pull requests to the zpugcc repo. I've applied these to my own fork, and verified that it compiles without error on Ubuntu LTS:
https://github.com/robinsonb5/zpugcc
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

Well, it does build now and it gcc's all the .c files properly but it's failing on ld. I think likely I don't have files the right place, but not sure? Still fussing with this. Wait, I take that back. Instead of copying everything to bin, I put ~/zpugcc/toolchain/install/bin in the path.

Now it's just missing something called 'srec' -- I think I might be close here.
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

It's right here in the Makefile. Not sure what this is or where it comes from.

SREC = srec

%.mif: %.bin
$(SREC) $< -binary -o $@ -mif 32
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

oh wait, found a comment in a log file.

-- http://srecord.sourceforge.net/
--
-- Generated automatically by srec -o --mif
--
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

And fedora includes srecord, but no, there's no 'srec' from this. Fedora includes srecord, which provides srec_cat, srec_info and srec_cmp. Maybe srec_cat is it, but not sure.
cathrynmataga
Posts: 109
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 140 times
Been thanked: 18 times

Re: Has anyone gotten zpugcc to compile?

Unread post by cathrynmataga »

Oof, and just naively replacing srec with srec_cat actually does succesffuly create zpu_rom_800.mif file. It's 28322 bytes and the original is 28703 bytes. Maybe it worked...
Post Reply