[fpc-pascal] GCC -PIE equivalent?

Jon Foster jon-lists at jfpossibilities.com
Thu Nov 12 17:12:12 CET 2015

I'm building native code compilers for Android. I've been assisting the
PascalDevelop project available in the Play Store:


I'm working with the 3.0.0rc2 release and building whichever units will.
The current version of the app ships with the older 2.6.x compiler.

What we've discovered is that if we try to run the compiler on Android 5
(Lollipop) or greater the binary won't load and complains that it isn't
a "Position Independent Executable" (PIE). This is a feature similar to
PIC. In GCC they have a separate flag -fPIE as opposed to the -fPIC. The
purpose is to make the whole executable relocatable to facilitate
"randomized address spaces".

If I build a standard "program" (not library) with -Cg do I get a PIE...
or does that only affect linking for libraries? I haven't been able to
find anything on the iNet regarding PIE and FPC.

THX - Jon

Sent from my Debian Linux laptop -- http://www.debian.org/intro/about

Jon Foster
JF Possibilities, Inc.
jon at jfpossibilities.com
Making computers work for you!

More information about the fpc-pascal mailing list