海思3516A 交叉编译安装 zlib

  • 下载zlib库源码

zlib-1.2.11.tar.gz

  • 配置编译环境
    修改configure文件
    CHOST=”arm-hisiv400-linux”
    CC=${CROSS_PREFIX}gcc
./configure --prefix=/opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi

prefix 选项把zlib库安装在 /opt/hisi-linux/x86-arm/arm-hisiv400-linux/arm-hisiv400-linux-gnueabi 目录,这样可以直接引用头文件 zlib.h

输出:

CHOST = arm-hisiv400-linux
CROSS_PREFIX = arm-hisiv400-linux-
Using arm-hisiv400-linux-ar
Using arm-hisiv400-linux-ranlib
Using arm-hisiv400-linux-nm
AR = arm-hisiv400-linux-ar
RANLIB = arm-hisiv400-linux-ranlib
NM = arm-hisiv400-linux-nm
Checking for shared library support...
Building shared library libz.so.1.2.11 with arm-hisiv400-linux-gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
  • 编译:
make
make install

你可能感兴趣的:(海思3516A 交叉编译安装 zlib)