amiga-gcc icon indicating copy to clipboard operation
amiga-gcc copied to clipboard

_custom , ciaa and ciaab should be marked as "far"

Open mheyer32 opened this issue 1 year ago • 2 comments

Not sure if this belongs here or to libnix. amiga.lib defines _custom, ciaa and ciab. But when linking against amiga.lib in a -fbaserel project (in my case a library), at least accessing ciaa caused a linker error:

_o/s3trio64/chip_s3trio64.o: in function `SetMemoryClock':
/home/matze/p96drivers/s3trio64/chip_s3trio64.c:282:(.text+0x628): relocation truncated to fit: DREL16 against `ciaa'
_o/s3trio64/chip_s3trio64.o: in function `SetClock':
/home/matze/p96drivers/s3trio64/chip_s3trio64.c:1033:(.text+0x1644): relocation truncated to fit: DREL16 against `ciaa'
collect2: error: ld returned 1 exit status

I helped myself with qualifying the declarations with "FAR" (__far) . I think the alib.h should do the same.

mheyer32 avatar Nov 06 '23 23:11 mheyer32

now the baserel lib is copied too, no need to change headers.

bebbo avatar Nov 07 '23 08:11 bebbo

any update here? with the baserel lib that issue should be solved.

bebbo avatar Dec 09 '23 11:12 bebbo