(OK) cross_compile_readline_for_android-x86_64-6.0

cross_compile_readline_for_android-x86_64-6.0.txt

download readline: ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz


[root@localhost readline-6.3]# pwd
/opt/android-on-linux/readline-6.3
[root@localhost readline-6.3]#

-----
Note: no use
-----
// update the config.sub and config.guess files (the ones in the libreadline source are very old and don't have arm-linux-androideabi)

cp /usr/share/automake-1.15/config.{sub,guess} support/
-----



-----
Note: first, execute autoconf:  it looks like a stale `configure', can regenerate it using autoconf.
-----

autoconf

make clean

export NDK_ROOT="/opt/android-on-linux/android-ndk-r12"
export SYSROOT="$NDK_ROOT/platforms/android-23/arch-x86_64"
export CFLAGS="-g --pipe --sysroot=$SYSROOT -fPIC -fpic -I$NDK_ROOT/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/include-fixed/ -I$NDK_ROOT/platforms/android-23/arch-x86_64/usr/include -I$NDK_ROOT/sources/cxx-stl/llvm-libc++/libcxx/include/ -I$NDK_ROOT/sources/android/support/include/"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="--sysroot=$SYSROOT -fPIE -fpie -L$NDK_ROOT/platforms/android-23/arch-x86_64/usr/lib/ -L$NDK_ROOT/sources/cxx-stl/stlport/libs/x86_64 -L$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/x86_64 -L$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64 -shared -lstlport_shared -lm -lc++ -lc"
export CPATH="/opt/android-on-linux/android-ndk-r12/toolchains/x86_64-4.9/prebuilt/linux-x86_64/bin"
export CPP="$CPATH/x86_64-linux-android-cpp"
export CXX="$CPATH/x86_64-linux-android-g++"
export CC="$CPATH/x86_64-linux-android-gcc"
export LD="$CPATH/x86_64-linux-android-ld"
export AR="$CPATH/x86_64-linux-android-ar"
export STRIP="$CPATH/x86_64-linux-android-strip"
export OBJDUMP="$CPATH/x86_64-linux-android-objdump"
export RANLIB="$CPATH/x86_64-linux-android-ranlib"

./configure --host=x86_64-android-linux \
 --prefix=/opt/android-on-linux/readline-6.3/out \
 --exec-prefix=/opt/android-on-linux/readline-6.3/out


make -j4

make install

// $STRIP /opt/android-on-linux/quagga/out/sbin/*

ll -h out/lib


[root@localhost readline-6.3]# ll -h out/lib
总用量 1.8M
-rw-r--r--. 1 root root 121K 7月   5 14:34 libhistory.a
lrwxrwxrwx. 1 root root   15 7月   5 14:34 libhistory.so -> libhistory.so.6
lrwxrwxrwx. 1 root root   17 7月   5 14:34 libhistory.so.6 -> libhistory.so.6.3
-r-xr-xr-x. 1 root root  72K 7月   5 14:34 libhistory.so.6.3
-rw-r--r--. 1 root root 983K 7月   5 14:34 libreadline.a
lrwxrwxrwx. 1 root root   16 7月   5 14:34 libreadline.so -> libreadline.so.6
lrwxrwxrwx. 1 root root   18 7月   5 14:34 libreadline.so.6 -> libreadline.so.6.3
-r-xr-xr-x. 1 root root 536K 7月   5 14:34 libreadline.so.6.3


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值