I have Fpcupdeluxe installed. I want to cross compile from Linux to Android pie executable.
Compiling a Hello Word program to Linux using options -k-pie -k-znow -Cg gives the following Linux executable:
file test2
test2: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, with debug_info, not stripped
Changing the platform to Android gives the following result:
ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter libdl.so, BuildID[sha1]=9eab5a4e162e001f4892880a899c0843f5cea6eb, with debug_info, not stripped
So a shared object instead of the pie executable.
With only option -Cg-, I can get an Android executable but it is not Pie, so it doesn't work for Android 5+. Note the option -Cg-.
test2: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter libdl.so, BuildID[sha1]=79cf6dff7bf31d286eaed661e4e9dc02dda7df79, with debug_info, not stripped
How can I cross compile to an Android pie executable? Or is this caused by a problem with the cross compiler?
Han