[z88dk-dev] pragma-redirect conditioned on crt0 being defined

Bridge to the z88dk-developers mailing list
Post Reply
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

[z88dk-dev] pragma-redirect conditioned on crt0 being defined

Post by alvin »

I'm not sure why pragma-redirect is generating a block of code conditioned on crt0 being defined in zcc_opt.def:

IF !DEFINED_CRT_FONT
IF crt0
PUBLIC CRT_FONT
EXTERN _ff_ao_Soxz
defc DEFINED_CRT_FONT = 1
defc CRT_FONT = _ff_ao_Soxz
ENDIF
ENDIF

None of the other pragmas do this.

I committed a change that eliminates the crt0 test. If there's a reason for it, feel free to add it back.



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I'm not sure why pragma-redirect is generating a block of code conditioned on crt0 being defined in zcc_opt.def:

IF !DEFINED_CRT_FONT
IF crt0
PUBLIC CRT_FONT
EXTERN _ff_ao_Soxz
defc DEFINED_CRT_FONT = 1
defc CRT_FONT = _ff_ao_Soxz
ENDIF
ENDIF

None of the other pragmas do this.

I committed a change that eliminates the crt0 test. If there's a reason for it, feel free to add it back.
It was there so that multi-file z88 applications link - application.h needs some values from zcc_opt.def to set the application header. I may be to do something in appmake to work around that though.



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I'm not sure why pragma-redirect is generating a block of code conditioned on crt0 being defined in zcc_opt.def:
It was there so that multi-file z88 applications link - application.h needs some values from zcc_opt.def to set the application header. I may be to do something in appmake to work around that though.
Actually it was all z88 applications. I've changed app generation so that the appropriate values are populated by appmake. A nice side effect of this is that the "number of bad pages values" (-reqpag) can be automatically calculated from the bss data.



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
Post Reply