先編譯zlibhtml
$ tar zvxf zlib-1.2.8.tar.gz $ cd zlib-1.2.8/ $ export CC=arm-linux-gnu-gcc //它的configure不支持用CC變量來指定交叉工具鏈 $ ./configure --prefix=$PWD/_install //最後生成的庫、頭文件和man文件都在當前目錄的_install目錄下 $ make && make install
編譯libffilinux
./configure --prefix=/home/lht/arm-hisi/ --build=arm --host=arm-hisiv100nptl-linux
編譯glib 2.43shell
./configure --build=arm --host=arm-hisiv100nptl-linux --prefix=/home/lht/arm-hisi/ --cache-file=arm-configure.cache \ --with-libiconv=no -enable-static --disable-dependency-tracking --enable-coverage=no \ CFLAGS='-I/home/lht/arm-hisi/include' LIBS='-L/home/lht/arm-hisi/lib' \ glib_cv_stack_grows=no \ ac_cv_func_posix_getpwuid_r=yes \ ac_cv_func_posix_getgrgid_r=yes \ ac_cv_lib_rt_clock_gettime=no \ glib_cv_monotonic_clock=yes \ glib_cv_uscore=no
錯誤svn
checking whether va_lists can be copied by value... yes checking for dlopen... no checking for NSLinkModule... no checking for dlopen in -ldl... yes checking for dlsym in -ldl... yes checking for RTLD_GLOBAL brokenness... no checking for preceeding underscore in symbols... configure: error: in `/home/lht/project/glib-2.43.0': configure: error: cannot run test program while cross compiling
見 https://gtk-doc-cn.googlecode.com/svn/docs/glib/glib-cross-compiling.html工具