Migration from FPC 2.6.4 to FPC 3.2.2 #9

Merged
admin merged 2 commits from feature/fpc-3.2.2 into develop 2026-02-26 12:51:10 +00:00
Owner
  • Merge of feature/fpc-3.2.2
  • Changes to system.pas, linker, various assembly sections & Dockerfile to support building with fpc-3.2.2.
  • .drone.yml updated to ignore discord webhook step failure.
- Merge of feature/fpc-3.2.2 - Changes to system.pas, linker, various assembly sections & Dockerfile to support building with fpc-3.2.2. - .drone.yml updated to ignore discord webhook step failure.
admin added 2 commits 2026-02-26 12:38:10 +00:00
feature: Upgrade FPC from 2.6.4 to 3.2.2
continuous-integration/drone Build was killed
2b071a58c7
Migrate the build toolchain from Free Pascal Compiler 2.6.4 to 3.2.2.
FPC 3.2.2 requires a significantly expanded custom system unit and
several syntactic adjustments across the codebase.

Dockerfile:
- Bump FPC_VERSION from 2.6.4 to 3.2.2

compile_sources.sh:
- Replace obsolete -Op3 flag with -OpPENTIUM3

linker.script:
- Add /DISCARD/ section for .init_array, .fini_array, .ctors, .dtors,
  .eh_frame, .gcc_except_table, and .note.GNU-stack sections emitted
  by FPC 3.2.2

system.pas:
- Fix hresult to 'type longint' (was cardinal, incompatible with 3.2.2)
- Add required types: SizeInt, SizeUInt, PtrInt, PtrUInt, NativeInt,
  NativeUInt, CodePointer, TTypeKind, jmp_buf, TExceptAddr, TGuid,
  FileRec, TextRec
- Add required globals: ExceptAddrStack, ExitCode, ErrorAddr, ErrorCode,
  ExitProc, StackBottom, StackLength, RandSeed
- Implement compilerprocs: fpc_initializeunits, fpc_do_exit,
  fpc_handleerror, fpc_rangeerror, fpc_overflow, fpc_divbyzero,
  fpc_objecterror, fpc_abstracterror, fpc_stackcheck, fpc_iocheck,
  fpc_pushexceptaddr, fpc_popaddrstack, fpc_setjmp (asm),
  fpc_longjmp (asm), fpc_shortstr_assign, fpc_mul_int64 (asm),
  fpc_getmem, fpc_freemem, fpc_reraise, fpc_raiseexception,
  fpc_catches, fpc_doneexception
- Add move() procedure with FPC_MOVE alias

util.pas, serial.pas:
- Fix inline asm functions (getESP, inl, inw, inb, sinb) to use temp
  variables instead of function-name result — FPC 3.2.2 no longer
  allows 'MOV funcname, reg' syntax in inline asm blocks

lmemorymanager.pas:
- Export kalloc/kfree with public aliases (kernel_kalloc, kernel_kfree)
  so system.pas fpc_getmem/fpc_freemem can link to them
- Added ignore failure to discord webhook stage.
admin scheduled this pull request to auto merge when all checks succeed 2026-02-26 12:39:02 +00:00
t3hn3rd was assigned by admin 2026-02-26 12:39:38 +00:00
admin requested review from t3hn3rd 2026-02-26 12:39:50 +00:00
admin removed review request for t3hn3rd 2026-02-26 12:40:34 +00:00
admin requested review from Ghost 2026-02-26 12:40:35 +00:00
admin canceled auto merging this pull request when all checks succeed 2026-02-26 12:49:39 +00:00
admin merged commit 924305a1ab into develop 2026-02-26 12:51:10 +00:00
Sign in to join this conversation.