Update: I've managed to compile the rtl vor jvm-java.
I think now the RTL would have to be extended to fixe these:
Compiling mads.pas to mads.
mads.pas(364,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(369,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(375,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(380,23) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(386,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(392,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(398,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(404,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(411,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(419,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(424,22) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(429,23) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(434,23) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(439,23) Error: Duplicate identifier "MADS__fpc_intern_recname_171"
mads.pas(1178,20) Error: Wrong number of parameters specified for call to "BlockWrite"
mads.pas(33,11) Error: Found declaration: BlockWrite(var TextFile;const <Formal type>;Int64;var Int64);
mads.pas(1197,5) Error: Wrong number of parameters specified for call to "BlockWrite"
mads.pas(33,11) Error: Found declaration: BlockWrite(var TextFile;const <Formal type>;Int64;var Int64);
mads.pas(1386,30) Error: Wrong number of parameters specified for call to "writeln"
mads.pas(34,11) Error: Found declaration: writeln(ShortString);
mads.pas(37,11) Error: Found declaration: writeln(ShortString;ShortString);
mads.pas(40,11) Error: Found declaration: writeln(ShortString;ShortString;ShortString);
mads.pas(43,11) Error: Found declaration: writeln(TextFile;ShortString;ShortString;ShortString);
mads.pas(1433,15) Error: Identifier not found "FileSize"
mads.pas(1461,27) Fatal: Unknown compilerproc "fpc_get_output". Check if you use the correct run time library.
Fatal: Compilation aborted
Any hints are highly appreciated.