Pergunta

I'm building gcc for Android on CentOS using the cross-compile toolchain generated by running the make-standalone-toolchain.sh script in the Android NDK, and the gcc source files from the downloaded Android NDK toolchain sources. The GMP sources were obtained by running the download_prerequisites script located in the gcc/contrib folder.

I've specified --build=x86_64-linux and --host=arm-linux-eabi, cross compile tools are set in the env variables, and specified when running configure. I've run ../gcc-4.7/configure, then make -d. Make fails when building gmp with /bin/sh. ./gen-fac_ui. Cannot execute binary.

The specific command is: ./gen-fac_ui $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1)

I'm guessing the execution fails because I'm using cross-compile tools and the gen-fac_ui binary won't run on CentOS. My question is: is there another way to generate mpz/fac_ui.h as a work around?

I've also tried running make -d -i, which finishes successfully but seems to skip building key files...like gcc or g++

Foi útil?

Solução

Short Answer:
I needed the native (i.e for CentOS) GCC tools to build and run gen-fac_ui.

Long Answer: This is my post at the OSDev forum, where I basically asked the same question and got an answer. It also contains my error (and correction) of not having glibc-devel installed for the native GCC toolchain.

In addition, since the base version of GCC for my build system was 4.4.7 and I was trying to cross-native build 4.7, I had to get the developer toolset, which can be installed via yum. Information on the toolset is here and easy install instructions are here

FWIW, I'm still not entirely sure how I was supposed to determine that gen-fac_ui needed to be made by a gcc native to the build machine...other than there was no other way I could find to generate fac_ui.h and other headers.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top