mongoc图书馆& ARM的交叉编译

时间:2016-05-10 08:39:37

标签: mongodb compilation x86 cross-compiling raspbian

我尝试使用Ubuntu系统编译mongo c驱动程序以瞄准raspbian x86架构。

我正在使用Raspberry提供的工具链,以及我在做什么:

git clone https://github.com/mongodb/mongo-c-driver.git
cd mongo-c-driver
./autogen.sh
./configure --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf --with-libbson=bundled --enable-tests=no --enable-examples=no --enable-static --disable-shared

但它编译为x64:

objdum -a ./libs/libmongoc-1.0.&
  

文件格式elf64-x86-64

我该怎么办?

1 个答案:

答案 0 :(得分:0)

$ ./configure --help

描述设置交叉编译器的环境变量

$ export CC=[PATH]/arm-linux-gnueabihf-cpp
$ export CXX=[PATH]/arm-linux-gnueabihf-g++
相关问题