0、sudo -i 很重要否则make install 出错
export PATH=$PATH:/opt/GSRD/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/
1、libffi
CC=arm-linux-gnueabihf-gcc ./configure+--prefix=/opt/GSRD/glib-2.45.1/ffi-3.2.1/ --host=arm-linux-gnueabihf
make&make install
2.zlib
export CC=arm-linux-gnueabihf-gcc
./configure --prefix=/opt/GSRD/glib-2.45.1/zlib-1.2.8/
make&make install
3.glib
CC=arm-linux-gnueabihf-gcc \
./configure --prefix=/opt/GSRD/glib-2.45.1 --host=arm-linux-gnueabihf PKG_CONFIG_PATH=/opt/GSRD/glib-2.45.1 LIBFFI_CFLAGS='-I/opt/GSRD/glib-2.45.1/ffi-3.2.1/lib/libffi-3.2.1/include' LIBFFI_LIBS='-lffi -L=/opt/GSRD/glib-2.45.1/ffi-3.2.1/lib' ZLIB_CFLAGS='-I/opt/GSRD/glib-2.45.1/zlib-1.2.8/include' ZLIB_LIBS='-lz -L/opt/GSRD/glib-2.45.1/zlib-1.2.8/lib' glib_cv_stack_grows=no glib_cv_uscore=yes ac_cv_func_posix_getpwuid_r=yes ac_cv_func_posix_getgrgid_r=yes
make&make install