Sunday, January 26, 2014

porting freetype to android

UPDATE: 2.5.3 works with r9d clang4.4 out of box.


//=============Deprecated=======================

I need freetype as libRocket depends on it. The problem is freetype does not compile with clang3.3 in ndk-r9c.

I got these errors:
  "/opt/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/as" -mfpu=neon -mfloat-abi=softfp -march=armv7-a -mfpu=vfpv3-d16 -o CMakeFiles/freetype.dir/src/autofit/autofit.c.o /tmp/autofit-tnCFeA.s
/tmp/autofit-tnCFeA.s: Assembler messages:
/tmp/autofit-tnCFeA.s:1145: Error: width suffixes are invalid in ARM mode -- `add.w r5,r5,#0x8000'

4.8 and 4.6 work fine. However it works with x86_64 clang on my PC. I hold it will with clang in IOS.

Update
uncomment the following line in "freetype-2.5.2/devel/ftoption.h" and "freetype-2.5.2/include/config/ftoption.h",
#define FT_CONFIG_OPTION_NO_ASSEMBLER

clang will compile, both freetype and libRocket then. I have to test if there is any running risks.

No comments:

Post a Comment