[fpc-devel] Questions about cross-compiling (z80)
BogDan
bog_dan_ro at yahoo.com
Sat Feb 12 21:09:31 CET 2022
Hi,
On Saturday, February 12, 2022, 06:08:22 PM GMT+2, Sven Barth <pascaldragon at googlemail.com> wrote:
BogDan <bog_dan_ro at yahoo.com> schrieb am Sa., 12. Feb. 2022, 13:23:
> Hi,
>
>
> On Saturday, February 12, 2022, 11:23:40 AM GMT+2, Sven Barth <pascaldragon at googlemail.com> wrote:
>
>
> BogDan via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Sa., 12. Feb. 2022, 10:18:
>> Also, everything that is not used by the application it should be stripped by the linker (if it has one). Again I'd like to highlight that I'm new to fpc, last time I used pascal it was over 20 years ago :) .
>
> The linker can only remove stuff that isn't used. And due to the cross platform nature of FPC manager approaches are used to make the easier maintainable which also results in a negative impact there.
>
> But anyway: did you build FPC and the RTL with the -CX option and compile your application with -XX?
>
> Regards,
> Sven
>>
>
>
> I'm compiling my app with -CX -XX flags.
> I just tried to buld fpc and RTL with -CX but it fails with the followings:
> ...
> make[3]: Entering directory '/home/taipan/work/z80/fpc/rtl/zxspectrum'
> /bin/mkdir -p /home/taipan/work/z80/fpc/rtl/units/z80-zxspectrum
> /home/taipan/work/z80/fpc/compiler/ppcrossz80 -Tzxspectrum -Pz80 -Ur -Xs -O2 -n -Fi../inc -Fi../z80
> -FE. -FU/home/taipan/work/z80/fpc/rtl/units/z80-zxspectrum -Fl/usr/lib/gcc/x86_64-linux-gnu/11 -dz
> 80 -dRELEASE -O-1 -Us -Sg system.pp
> genmath.inc(366,16) Fatal: Code segment too large
> Fatal: Compilation aborted
I don't see -CX listed there.
My bad, I did wrong changes to the build script.
Anyway, I double checked that the rtl is built with -CX -XX but the final size is still over 32k.
Can someone else check if a simple "begin;end." test strips the rtl ?
Cheers,
BogDan.
More information about the fpc-devel
mailing list