bebbo / amiga-gcc

The GNU C-Compiler with Binutils and other useful tools for cross development for Amiga
GNU General Public License v2.0
312 stars 66 forks source link

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

Closed mheyer32 closed 4 months ago

mheyer32 commented 10 months ago

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.

bebbo commented 10 months ago

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

bebbo commented 9 months ago

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