If you're talking about Omeganaut, yes, I use OpenGL direct calls for the fog and for setting the VR viewports, but I can comment out TExternalFunctionCall just to try if it compiles. Just to be sure, do I comment the whole thing from 1977 { TExpExternalFuncCall } to 2461 {$ifend}, or less?Does your project make direct OpenGL calls from ZGE scripting?
I compiled test.pas using :
Code: Select all
Path C:\Android\android-ndk-r18b\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\bin
C:\FPC\a64\bin\i386-win32\ppcrossa64 -B -MDelphi -Sghi -O3 -Tandroid -XXis -vw -Filib\arm-linux -FlC:\Android\android-ndk-r18b\platforms\android-28\arch-arm64\usr\lib -Fu. -Fu..\.. -FUlib\arm-linux\ -FEjava\libs\arm64-v8a\ -olibzgeandroid.so -dANDROID -dMINIMAL -Xd -al test.pas
But here's the resulted test.s :
Code: Select all
.file "test.pas"
// Begin asmlist al_procedures
.section .text.n_p$test_$$_f$longint$longint
.balign 8
.globl P$TEST_$$_F$LONGINT$LONGINT
.type P$TEST_$$_F$LONGINT$LONGINT,@function
P$TEST_$$_F$LONGINT$LONGINT:
// [test.pas]
// [4] begin
stp x29,x30,[sp, #-16]!
mov x29,sp
stp x19,x19,[sp, #-16]!
// Var x1 located in register w0
// Var x2 located in register w1
// [5] writeln('test');
bl fpc_get_output
mov x19,x0
adrp x2,:got:_$TEST$_Ld1
ldr x2,[x2, :got_lo12:_$TEST$_Ld1]
mov x1,x19
movz w0,#0
bl fpc_write_text_shortstr
bl fpc_iocheck
mov x0,x19
bl fpc_writeln_end
bl fpc_iocheck
// [6] end;
ldr x19,[sp], #16
ldp x29,x30,[sp], #16
ret
.Le0:
.size P$TEST_$$_F$LONGINT$LONGINT, .Le0 - P$TEST_$$_F$LONGINT$LONGINT
.section .text.n_main
.balign 8
.globl PASCALMAIN
.type PASCALMAIN,@function
PASCALMAIN:
.globl main
.type main,@function
main:
// [8] begin
stp x29,x30,[sp, #-16]!
mov x29,sp
bl fpc_initializeunits
// [9] f(1,2);
movz w1,#2
movz w0,#1
bl P$TEST_$$_F$LONGINT$LONGINT
// [10] end.
bl fpc_do_exit
ldp x29,x30,[sp], #16
ret
.Le1:
.size main, .Le1 - main
.section .text
// End asmlist al_procedures
// Begin asmlist al_globals
.section .data.rel.n_INITFINAL
.balign 8
.globl INITFINAL
.type INITFINAL,@object
INITFINAL:
.quad 2,0
.quad INIT$_$SYSTEM
.quad 0,0
.quad FINALIZE$_$OBJPAS
.Le2:
.size INITFINAL, .Le2 - INITFINAL
.section .data.rel.n_FPC_THREADVARTABLES
.balign 8
.globl FPC_THREADVARTABLES
.type FPC_THREADVARTABLES,@object
FPC_THREADVARTABLES:
.long 1
.quad THREADVARLIST_$SYSTEM$indirect
.Le3:
.size FPC_THREADVARTABLES, .Le3 - FPC_THREADVARTABLES
.section .data.rel.ro.n_FPC_RESOURCESTRINGTABLES
.balign 8
.globl FPC_RESOURCESTRINGTABLES
.type FPC_RESOURCESTRINGTABLES,@object
FPC_RESOURCESTRINGTABLES:
.quad 0
.Le4:
.size FPC_RESOURCESTRINGTABLES, .Le4 - FPC_RESOURCESTRINGTABLES
.section .data.rel.n_FPC_WIDEINITTABLES
.balign 8
.globl FPC_WIDEINITTABLES
.type FPC_WIDEINITTABLES,@object
FPC_WIDEINITTABLES:
.quad 0
.Le5:
.size FPC_WIDEINITTABLES, .Le5 - FPC_WIDEINITTABLES
.section .data.rel.n_FPC_RESSTRINITTABLES
.balign 8
.globl FPC_RESSTRINITTABLES
.type FPC_RESSTRINITTABLES,@object
FPC_RESSTRINITTABLES:
.quad 0
.Le6:
.size FPC_RESSTRINITTABLES, .Le6 - FPC_RESSTRINITTABLES
.section .fpc.n_version
.balign 16
.type __fpc_ident,@object
__fpc_ident:
.ascii "FPC 3.3.1 [2019/07/18] for aarch64 - Android"
.Le7:
.size __fpc_ident, .Le7 - __fpc_ident
.section .data.rel.n___stklen
.balign 8
.globl __stklen
.type __stklen,@object
__stklen:
.quad 8388608
.Le8:
.size __stklen, .Le8 - __stklen
.section .data.rel.n___heapsize
.balign 8
.globl __heapsize
.type __heapsize,@object
__heapsize:
.quad 0
.Le9:
.size __heapsize, .Le9 - __heapsize
.section .data.rel.n___fpc_valgrind
.balign 8
.globl __fpc_valgrind
.type __fpc_valgrind,@object
__fpc_valgrind:
.byte 0
.Le10:
.size __fpc_valgrind, .Le10 - __fpc_valgrind
.section .data.rel.ro.n_FPC_RESLOCATION
.balign 8
.globl FPC_RESLOCATION
.type FPC_RESLOCATION,@object
FPC_RESLOCATION:
.quad 0
.Le11:
.size FPC_RESLOCATION, .Le11 - FPC_RESLOCATION
// End asmlist al_globals
// Begin asmlist al_typedconsts
.section .rodata.n__$TEST$_Ld1
.balign 8
.globl _$TEST$_Ld1
_$TEST$_Ld1:
.ascii "\004test\000"
.Le12:
.size _$TEST$_Ld1, .Le12 - _$TEST$_Ld1
// End asmlist al_typedconsts
.section .note.GNU-stack,"",%progbits