From: Philipp K. K. <pk...@sp...> - 2024-07-17 06:27:05
|
Am 17.07.24 um 01:57 schrieb Small Device C Compiler (SDCC) SVN repository: > * device/lib/z80/__itoa.s, > * device/lib/z80/__ltoa.s, > * device/lib/z80/__mulsint2slong.s, > * device/lib/z80/__strreverse.s, > * device/lib/z80/__uitobcd.s, > * device/lib/z80/abs.s, > * device/lib/z80/atomic_flag_test_and_set.s, > * device/lib/z80/crt0.s, > * device/lib/z80/divmixed.s, > * device/lib/z80/divsigned.s, > * device/lib/z80/divunsigned.s, > * device/lib/z80/memcpy.s, > * device/lib/z80/memmove.s, > * device/lib/z80/modmixed.s, > * device/lib/z80/modsigned.s, > * device/lib/z80/modunsigned.s, > * device/lib/z80/mul.s, > * device/lib/z80/mulchar.s, > * device/lib/z80/setjmp.s, > * device/lib/z80/strcpy.s, > * device/lib/z80/strlen.s: added .module <name> & .optsdcc -mz80 sdcccall(1) > […] > * src/z80/main.c (_z80_genAssemblerStart): new, added to emit .optsdcc, > includes calling convention > * src/z80/mappings.i: added .optsdcc This means that we now get an "Internal Version Error" when trying to link object files compiled with --sdcccall 1 to those compiled with --sdcccall 0 (or objects from asm source files without the explicit .optsdcc). IMO, this is problematic, since it breaks compatibility. In particular, we previously supported such use-cases: test.c: void f(void) __sdcccall(0); void main(void) { } test1.c: void f(void) { } Compiling test.c with -sdcccall 1 (i.e. the default), while compiling test1.c with --sdcccall 0. AFAIK, the main use case if libraries partially written in assembler to the __sdcccalll(0) convention. By just adding __sdcccall(0) to declarations in headers, these libraries were used in programs that otherwise use the new default calling convention. Philipp |