Fix regarding issues on Windows ARM64
I have tried to get FPC running on Windows for ARM64.
And I must say: everything was there already !
Good work FPC devs !!
However, all binaries did crash on exit.
After a lot of debugging, I found two issues that seem to solve this.
1:
TTlsDirectory={packed} record <--- do not pack on ARM64
2:
procedure SysInitThreadvar(var offset : dword;size : dword);
begin
offset:=threadvarblocksize;
{$ifdef CPUAARCH64} // Specific to ARM64
size := (size + 7) and not dword(7); <---- align 8 on ARM64
{$else ifdef CPUARM} // ARM32
size := (size + 3) and not dword(3);
{$endif} inc(threadvarblocksize,size);
end;
For me, these changes create working binaries on ARM64 !