首页 > 其他分享 >glib-2.45.2 交叉编译脚本

glib-2.45.2 交叉编译脚本

时间:2022-11-08 11:01:05浏览次数:81  
标签:glib 2.45 lib ZLIB 编译 export LIBFFI PATH cv


下载地址:​​http://ftp.gnome.org/pub/gnome/sources/glib/​

compile_glib-2.45.2.sh

#!/bin/sh


# 说明: 编译glib-2.45.2

set -e


NAME_TARGET=glib-2.45.2

PATH_CUR=`pwd`
PATH_ZLIB=/opt/zlib-1.2.11
PATH_LIBFFI=/opt/libffi-3.2.1
PATH_ELFUTILS=/opt/elfutils-0.179

PATH_INSTALL=/opt/$NAME_TARGET

export CC=arm-hisiv400-linux-gcc
#export LDFLAGS="-L$PATH_ZLIB/lib -L$PATH_LIBFFI/lib -L$PATH_ELFUTILS/lib"
#export CFLAGS="-I$PATH_ZLIB/include -I$PATH_LIBFFI/lib/libffi-3.2.1/include -I$PATH_ELFUTILS/include"
#export LIBS="-lz -lffi"


export LIBELF_CFLAGS="-I$PATH_ELFUTILS"
export LIBELF_LIBS="-L$PATH_ELFUTILS/lib/"
export LIBFFI_CFLAGS="-I$PATH_LIBFFI/lib/libffi-3.2.1/include"
export LIBFFI_LIBS="-lffi -L$PATH_LIBFFI/lib/"
export ZLIB_CFLAGS="-I$PATH_ZLIB/include"
export ZLIB_LIBS="-lz -L$PATH_ZLIB/lib/"


cat>glib.cache<<EOF
glib_cv_long_long_format=ll
glib_cv_stack_grows=no
glib_cv_have_strlcpy=no
glib_cv_have_qsort_r=yes
glib_cv_va_val_copy=yes
glib_cv_uscore=no
glib_cv_rtldglobal_broken=no
ac_cv_func_posix_getpwuid_r=yes
ac_cv_func_posix_getgrgid_r=yes
EOF

cd $NAME_TARGET
#rm -rf $NAME_DIR
#tar -xf ${NAME_DIOAR}.tar.gz


./configure \
--prefix=$PATH_INSTALL \
--host=arm-linux \
--cache-file=$PATH_CUR/glib.cache \
--disable-selinux \
--disable-xattr \
--disable-libelf


make -j12
make install

 

参考资料:

​​交叉编译 gstreamer 1.16.1 -> 海思hi3559a​​

​​交叉编译 GStreamer​​

​​Glib 2.45.3 交叉编译完整版​​

​​qt5.7交叉编译gstreamer-1.0​​

​​GStreamer-0.10.36 交叉编译​​

标签:glib,2.45,lib,ZLIB,编译,export,LIBFFI,PATH,cv
From: https://blog.51cto.com/u_13316945/5832322

相关文章