It is not possible to properly build sdcc in Fedora 42. The issue is caused by a mismatch in the signature of elf() function in sdas/linksrc/aslink.h.
It must be changed into elf(int i). In previous versions of gcc, this was not an issue, but in gcc 15.0.1 looks like it is not valid anymore.
I am attaching a screenshot for more clarification.
Affected versions: Since 3.6.x to 4.5.x as far I know.
Environment:
> cat /etc/fedora-release
Fedora release 42 (Adams)
> gcc --version
gcc (GCC) 15.0.1 20250329 (Red Hat 15.0.1-0)
Yes, sdas is not valid C23, and GCC 15 defaults to C23. As a workaround, you could explicitly request GCC to use C17.
We are aware of the issue. The plan was to fix this upstream first, then get the fix into our fork by merging the next upstream release into it. I've submitted a fix to upstream about 6 weeks ago.
However, there has been no upstream release since. And merging that future upstream asxxxx release into sdas will also require a lot of work.
Also, there is still [bugs:#3823] to be fixed.
Related
Bugs:
#3823