Benjamin Jan Alexander Rosseaux schrieb: > > Hello, > > I've done a working Free Pascal android JNI example (with working .apk > for current ARM-based Android device of the second device generation > (because with VFPv3, so Motorola Droid/Milestone, HTC Desire, Nexus One, > Samsung Galaxy S, and so on) inside) > > http://vserver.rosseaux.net/stuff/FPCAndroidJNINativeTest.zip > > It contains androidprt0.as as replacement for the empty arm/linux > dllprt0.as of the FreePascal RTL from the SVN, because otherwise the > Android Dalvik VM refuses to load the .so library because of > missed/absent global/import/export symbols (_haltproc_eabi, __strptr, > __operatingsystem_parameter_argv and so on). > > It contains also a own JNI header port from the Android NDK, and own ARM > Toolchain hook binaries to inject some command line parameters to the > original "as" and "ld" binary calls. For "as": "--march=armv7-a > -mfloat-abi=softfp -mfpu=vfp3" and for "ld": "--fix-cortex-a8" > > And important FPC parameters are -CpARMv6 -CfVFPV3 > > I've done it, because i'm needing my own ECMAScript 5th edition engine > called BESEN in a Android project of me. > > Someone can make maybe a true patch from this for FreePascal for a > offical android target support in FreePascal.
I'am not sure how this should be done: the fpc target is arm-linux so android is some kind of sub architecture. However, FPC has no infrastruture to support such sub targets/architectures. Maybe we should add some -W switch which allows to load settings for a certain sub architecture together with MACHINE_TARGET or something like this in the makefiles. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal