简体   繁体   中英

How to compile GCC cross-compiler?

I am trying to compile GCC for i586-elf but every time I run the 'configure' file with this command:

./configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable
languages=c --without-headers --with-gmp=$PREFIX --with-mpc=$PREFIX
--with-mpfr=$PREFIX

Then it gives me this error:

checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no.

Although I have specified where gmp, mpfr, and mpc are located. And I have the latest versions of them. Is there anything I am missing?

Unless you really care about specific gmp/mpfr etc versions I suggest you run the contrib/download_prerequisites script from the top-level GCC source directory and then omit the --with-gmp=$PREFIX --with-mpc=$PREFIX --with-mpfr=$PREFIX from your configure line. The download_prerequisites script will download and unpack the right versions of the libraries that your GCC version needs and it will create the right symlinks in the right places

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM