Has anyone gotten zpugcc to compile?
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Has anyone gotten zpugcc to compile?
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
/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
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Re: Has anyone gotten zpugcc to compile?
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.
-
- Posts: 130
- Joined: Fri Jun 19, 2020 8:54 pm
- Has thanked: 13 times
- Been thanked: 58 times
Re: Has anyone gotten zpugcc to compile?
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: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.
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"
I haven't had a chance to try it yet, though - do please let me know if it works for you.
-
- Posts: 130
- Joined: Fri Jun 19, 2020 8:54 pm
- Has thanked: 13 times
- Been thanked: 58 times
Re: Has anyone gotten zpugcc to compile?
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
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
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Re: Has anyone gotten zpugcc to compile?
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.
Now it's just missing something called 'srec' -- I think I might be close here.
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Re: Has anyone gotten zpugcc to compile?
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
SREC = srec
%.mif: %.bin
$(SREC) $< -binary -o $@ -mif 32
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Re: Has anyone gotten zpugcc to compile?
oh wait, found a comment in a log file.
-- http://srecord.sourceforge.net/
--
-- Generated automatically by srec -o --mif
--
-- http://srecord.sourceforge.net/
--
-- Generated automatically by srec -o --mif
--
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Re: Has anyone gotten zpugcc to compile?
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.
-
- Posts: 114
- Joined: Fri Aug 06, 2021 5:30 pm
- Has thanked: 150 times
- Been thanked: 20 times
Re: Has anyone gotten zpugcc to compile?
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...