1. build================
wasm-embedded rtl build error info:
systhrd.inc(18,4) Fatal: User defined: This file shouldn't be included if thread support is disabled!
======================
wasm-wasi is ok!
-------------------------------
2. system.pp codewasm-embedded:
Unit System;
{*****************************************************************************}
interface
{*****************************************************************************}
{$define FPC_SYSTEM_HAS_STACKTOP}
{$define FPC_IS_SYSTEM}
{$define HAS_CMDLINE}
{ $define USE_NOTHREADMANAGER}
{$define DISABLE_NO_THREAD_MANAGER}
{ Do not use standard memory manager }
{$define HAS_MEMORYMANAGER}
{$define FPC_NO_DEFAULT_HEAP}
...
wasm-wasi:
unit system;
interface
{$define FPC_IS_SYSTEM}
{$ifdef FPC_WASM_THREADS}
{$define DISABLE_NO_THREAD_MANAGER}
{$else FPC_WASM_THREADS}
{$define USE_NOTHREADMANAGER}
{$endif FPC_WASM_THREADS}
{$I systemh.inc}
you can see that in wasm-embedded define USE_NOTHREADMANAGER & DISABLE_NO_THREAD_MANAGER,
then in rtl/inc/system.inc will:
{$ifdef DISABLE_NO_THREAD_MANAGER}
{ OS Dependent implementation }
{$i systhrd.inc}
{$endif DISABLE_NO_THREAD_MANAGER}
finally,error happened in systhrd.inc
{$ifndef FPC_WASM_THREADS}
{$fatal This file shouldn't be included if thread support is disabled!}
{$endif FPC_WASM_THREADS}
3. questionis this problem can be fix by any parameter in crossbuild, or it is a BUG?
4. custom fixI modify some define in system.pp[wasm-embedded]
Unit System;
{*****************************************************************************}
interface
{*****************************************************************************}
{$define FPC_SYSTEM_HAS_STACKTOP}
{$define FPC_IS_SYSTEM}
{$define HAS_CMDLINE}
//20230109 edit by cai!
{$ifndef FPC_WASM_THREADS}
{$define USE_NOTHREADMANAGER}
{$else}
{ $define USE_NOTHREADMANAGER}
{$define DISABLE_NO_THREAD_MANAGER}
{$endif FPC_WASM_THREADS}
and crossbuild rtl is OK but packages, looks like not completed!
======================
wiki said:
The FPC Wasm embedded RTL consists of these units:
rtl
rtl-extra
tplylib