使用openharmony鸿蒙编译工具链交叉编译readline问题
开发环境:
基于RK3566 openharmony移植bluez协议栈实现ble功能,bluez协议栈依赖readline库,所以需要交叉编译该库。
使用工具链为prebuilts/clang/ohos/linux-x86_64/llvm/bin
使用sysroot为out/ohos-arm-release/obj/third_party/musl
环境配置为:
export PATH=$OHOS_NATIVE_HOME/llvm/bin:$PATH
export AR=$OHOS_NATIVE_HOME/llvm/bin/llvm-ar
export AS=$OHOS_NATIVE_HOME/llvm/bin/llvm-as
export LD=$OHOS_NATIVE_HOME/llvm/bin/ld.lld
export RANLIB=$OHOS_NATIVE_HOME/llvm/bin/llvm-ranlib
export STRIP=$OHOS_NATIVE_HOME/llvm/bin/llvm-strip
export CC=$OHOS_NATIVE_HOME/llvm/bin/clang
export CFLAGS="-I$OUTDIR/expat/usr/local/include --target=arm-linux-ohosmusl --sysroot=$OHOS_SYSROOT_HOME -march=armv7-a -mfloat-abi=softfp -mtune=generic-armv7-a -mfpu=neon"
export CPPFLAGS="-I$OUTDIR/expat/usr/local/include --target=arm-linux-ohosmusl --sysroot=$OHOS_SYSROOT_HOME -march=armv7-a -mfloat-abi=softfp -mtune=generic-armv7-a -mfpu=neon"
export LDFLAGS="-L$OUTDIR/expat/usr/local/lib -Wl,--dynamic-linker,/system/bin/ld-musl-arm.so.1"
执行:
./configure --prefix=$OUTDIR --host=arm-linux-ohosmusl bash_cv_wcwidth_broken=yes
报错:
checking host system type... Invalid configuration `arm-linux-ohosmusl': system `ohosmusl' not recognized
疑问:
该交叉编译工具链使用和配置参数有没有问题呢?
openharmony是没有移植ble相关协议栈吗?
移植ble相关协议栈可以在文档里找找,或者提Issues:https://gitee.com/openharmony/communication_bluetooth