1,tar -jxvf freetype-2.4.11.tar.bz2
2,mkdir /home/longhorn/freetype_24
3,CC=arm-linux-gnueabihf-gcc ./configure --prefix=/home/longhorn/freetype_24 --host=arm-linux-gnueabihf
(notice:if you didn't set the path into the enviroment PATH variable, please set the path of this cross-compiler into the PATH variable
#vi /etc/profile
在适当位置添加 PATH=$PATH:/etc/apache/bin (注意:= 即等号两边不能有任何空格)
这种方法最好,除非你手动强制修改PATH的值,否则将不会被改变
add this sentence at the end of profile file:
export PATH=$PATH:/root/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin
)
(For some compilers, it needs add CFLAGS=-fPIC, 多的话要用双引号括起来, 比如:CFLAGS=”-muclibc -fPIC”)
4,make
5,make install
(notice: if you not have the /home/longhorn/freetype_24 directory, please create it)
1, Error notice:
/home/longhorn/work/linaro/bin/../lib/gcc/arm-linux-gnueabihf/4.9.1/../../../../arm-linux-gnueabihf/bin/ld: /home/longhorn/work/svn_project/PublicLib/GDICoreDll/../BaseLib/libword/lib/arm-linux-gnueabihf/libfreetype.a(ftinit.o): relocation R_ARM_THM_MOVW_ABS_NC against `tt_driver_class' can not be used when making a shared object; recompile with -fPIC
/home/longhorn/work/svn_project/PublicLib/GDICoreDll/../BaseLib/libword/lib/arm-linux-gnueabihf/libfreetype.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Answer:
3,CC=arm-linux-gnueabihf-gcc ./configure --prefix=/home/longhorn/freetype_24 --host=arm-linux-gnueabihf
Should be changed as follow:
3,CC=arm-linux-gnueabihf-gcc ./configure --prefix=/home/longhorn/freetype_24 --host=arm-linux-gnueabihf CFLAGS=-fPIC
2,Error notice:
relocation R_MIPS_HI16 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/longhorn/work/svn_project/PublicLib/BaseLib/GDICoreDll/../LibDrawStatic/zlib/lib/mips-linux-gnu/libz.a: error adding symbols: Bad value
Answer:
CFLAGS="-O3 -fPIC" ./configure --prefix=/home/longhorn/freetype_24 --host=mips-linux-gnu
2603

被折叠的 条评论
为什么被折叠?



