【发布时间】:2020-09-07 16:30:20
【问题描述】:
我正在尝试构建一个交叉编译器,我选择了 gcc-9.2.0 所以当我运行时(来自 OSDev Wiki)
../gcc-9.2.0/configure --target=x86_64-elf --prefix="$HOME/opt/cross" --disable-nls --enable-languages=c,c++ --without-headers
我收到了这个错误
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.
于是我查看了gmp.h库,版本是6.2.0
#define __GNU_MP_VERSION 6
#define __GNU_MP_VERSION_MINOR 2
#define __GNU_MP_VERSION_PATCHLEVEL 0
然后我尝试使用--with-gmp 选项,但我得到了同样的错误
我的平台:Windows 10 64-bit
我使用Cygwin-x86_64 作为 bash 模拟器
【问题讨论】:
标签: windows gcc cygwin cross-compiling gmp