Hi Andrew,
First of all, thanks a lot for your inputs.
I checked the config.log of "build-glibc-linux64" folder which is the specific build during which it fails. The initial part of the log shows that I have included my riscv-installation directory (bolded below) but yet the check cannot find the riscv-unknown-linux-gnu-gcc and decides to go with the host one.
build/build-glibc-linux64/config.log is as follows:
$ /homes/ua/riscv/rocket-chip/riscv-tools/riscv-gnu-toolchain/build-linux/src/glibc/configure --host=riscv64-unknown-linux-gnu --prefix=/usr libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes --enable-shar
## --------- ##
## Platform. ##
## --------- ##
hostname = bb-91.b.b
uname -m = x86_64
uname -r = 2.6.32-504.12.2.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Wed Mar 11 22:03:14 UTC 2015
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /awk
PATH: /homes/ua/riscv/riscv-install/binPATH: /opt/rh/devtoolset-2/root/usr/bin
PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /homes/ua/riscv/riscv-install/bin
PATH: /gro/cad/synopsys/vcs/J-2014.12-SP2/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2416: checking build system type
configure:2430: result: x86_64-unknown-linux-gnu
configure:2450: checking host system type
configure:2463: result: riscv64-unknown-linux-gnu
configure:2492: checking for riscv64-unknown-linux-gnu-gcc
configure:2519: result: /opt/rh/devtoolset-2/root/usr/bin/gcc
configure:2788: checking for C compiler version
configure:2797: /opt/rh/devtoolset-2/root/usr/bin/gcc --version >&5
Yes indeed as you suspected, there is some issue with the required riscv-gcc being made
available somewhere internally in the 'make linux' flow, inspite of me including the path before
running the command. But unfortunately, I dont have any handle on what goes between intermediate builds of 'make linux'. All I really do in my makefile is: