On Wed, Mar 30, 2016 at 9:12 PM, Jim Wilson jim.wilson@linaro.org wrote:
On Tue, Mar 29, 2016 at 11:12 PM, $rik@nth srikanth007m@gmail.com wrote:
Yes. I am using ubuntu 64bit to cross compile GCC to ARM. If i issue --host=arm-linux-gnueabi then it will pick up default /usr/arm-linux-gnuebi bins. I would like to pick up my binutils which are built statically for doing some experiment.
If binutils was built and installed with the same prefix as gcc, then gcc should automatically find and use it.
By default it is fetching pre-installed binutils while configure if i won't specify them to pick from where.
For cross building a native, you need to build a cross compiler first, and then put it on your path, in which case the cross built native should use your cross compiler.
--host=arm-linux-gnueabi --target=arm-linux-gnueabi
You have host and target, but not build. You should specify all three.
AR=arm-linux-gnueabi-ar CC=arm-linux-gnueabi-gcc RANLIB=arm-linux-gnueabi-gcc-ranlib-4.7 STRIP=arm-linux-gnueabi-strip CPP=arm-linux-gnueabi-g++ CXX=arm-linux-gnueabi-g++
You shouldn't have to specify stuff like this. These variables should be set automatically.
You mean if i set --host=arm-linux-gnuebi and --target=arm-linux-gunebi should automatically pick cross compilers instead of pointing them? I am just following Linaro website on how to build cross tool chain https://wiki.linaro.org/WorkingGroups/ToolChain/BuildingGNUToolchains
Please let me know if there is some more links where i can follow precisely.
Now i am hitting one more issue before earlier one comes. configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. make[1]: *** [configure-build-libiberty] Error 1
You have to look at the config.log file to see what command failed. There is more than one config.log file. This would be the file build-$build/libiberty/config.log. This problem might be due to the missing --build configure option. if $build isn't x86_64-pc-linux-gnu or whatever your build machine is, then that is probably why the configure in this directory failed.
Jim