issues of compiling v5.8.0 on nersc cori by cc and CC

it looks that the cc find a wrong ld after I load the mesa:

zw241@cori11:~> which ld
/global/common/cori/software/altd/2.0/bin/ld
zw241@cori11:~>
zw241@cori11:~> module load spack
zw241@cori11:~>
zw241@cori11:~> spack load mesa/qozjngg
zw241@cori11:~> which ld
/global/common/sw/cray/sles15/x86_64/binutils/2.32/gcc/8.2.0/sl7nxhi/bin/ld

it can be solved after updating the PATH