构建GCC失败(/bin/sh GCC-4.9.2/config.sub)

构建GCC失败(/bin/sh GCC-4.9.2/config.sub),c,gcc,configure,C,Gcc,Configure,我已经在gcc-4.9.2的父目录中安装了这些软件包,当我指定LIB的位置时,如-,gmp所示: configure: WARNING: you should use --build, --host, --target checking build system type... Invalid configuration `gmp': machine `gmp' not recognized configure: error: /bin/sh gcc-4.9.2/config.sub gmp f

我已经在gcc-4.9.2的父目录中安装了这些软件包,当我指定LIB的位置时,如-,gmp所示:

configure: WARNING: you should use --build, --host, --target
checking build system type... Invalid configuration `gmp': machine `gmp' not recognized
configure: error: /bin/sh gcc-4.9.2/config.sub gmp failed
命令:

gcc-4.9.2/configure --with-gmp gmp  --enable-languages=c,c++

使用
--带gmp
的正确方法是
--带gmp=The/path/to/gmp
注意
=
之间应该没有空格。正在发生的是configure将
--与gmp
作为两个不相关的参数,并将
gmp
作为构建,这通常是通过
--build=您的构建目标
指定的,但是如果您只指定一个没有
--
--
的参数,它会将其视为构建选项。

使用
--with gmp=${ABSOLUTE\u PATH\u TO\u gmp}
。变量可以这样定义:
ABSOLUTE\u PATH\u TO\u GMP=$(readlink-f GMP)