交叉编译GMP时出错

时间:2015-10-01 06:27:51

标签: gcc cross-compiling gmp mpfr

我已按照此How-tog,h section of cross compiling tutorial进行交叉编译GMP。这是我在运行make后得到的错误消息(最后一部分)。

/usr/bin/ld: skipping incompatible /home/yogi/workbench/gcc-4.8.2/arm/lib/libmpfr.so when searching for -lmpfr
/usr/bin/ld: skipping incompatible /home/yogi/workbench/gcc-4.8.2/arm/lib/libmpfr.a when searching for -lmpfr
/usr/bin/ld: skipping incompatible /home/yogi/workbench/gcc-4.8.2/arm/lib/libmpfr.so when searching for -lmpfr
/usr/bin/ld: skipping incompatible /home/yogi/workbench/gcc-4.8.2/arm/lib/libmpfr.a when searching for -lmpfr
/usr/bin/ld: skipping incompatible /home/yogi/workbench/gcc-4.8.2/arm/lib/libgmp.a when searching for -lgmp
/usr/bin/ld: skipping incompatible /home/yogi/workbench/gcc-4.8.2/arm/lib/libgmp.a when searching for -lgmp
/home/yogi/workbench/gcc-4.8.2/xtools/build/final-gcc-cross/./mpc/src/.libs/libmpc.a(pow.o): In function `mpc_pow_exact':
/home/yogi/workbench/gcc-4.8.2/xtools/src/gcc-4.8.2/mpc/src/pow.c:123: undefined reference to `mpfr_get_z_exp'
/home/yogi/workbench/gcc-4.8.2/xtools/src/gcc-4.8.2/mpc/src/pow.c:135: undefined reference to `mpfr_get_z_exp'
/home/yogi/workbench/gcc-4.8.2/xtools/src/gcc-4.8.2/mpc/src/pow.c:143: undefined reference to `mpfr_get_z_exp'
collect2: error: ld returned 1 exit status
make[2]: *** [cc1] Error 1
make[2]: Leaving directory `/home/yogi/workbench/gcc-4.8.2/xtools/build/final-gcc-cross/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/yogi/workbench/gcc-4.8.2/xtools/build/final-gcc-cross'
make: *** [all] Error 2

这是我执行configure

的方式
$ /home/yogi/workbench/gcc-4.8.2/xtools/src/gcc-4.8.2/configure --build=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --prefix=/home/yogi/workbench/gcc-4.8.2/arm --with-sysroot=/home/yogi/workbench/gcc-4.8.2/arm/sysroot --enable-languages=c --with-gnu-as --with-gnu-ld --disable-multilib --with-float=soft --disable-sjlj-exceptions --disable-nls --enable-threads=posix --disable-libmudflap --disable-libssp --enable-long-longx --with-shared --with-gmp=/home/yogi/workbench/gcc-4.8.2/arm --with-mpfr=/home/yogi/workbench/gcc-4.8.2/arm

如何解决?

由于

0 个答案:

没有答案