diff options
author | 2020-01-26 13:41:39 +0000 | |
---|---|---|
committer | 2020-01-26 13:41:39 +0000 | |
commit | 9eaff8513518c35d9dfd8ade68460a912f76f62e (patch) | |
tree | ef59c8250bff816443c9963634bbf329b7ed7d35 | |
parent | gcc-config: fix numbered access to toolchains (diff) | |
download | gcc-config-9eaff8513518c35d9dfd8ade68460a912f76f62e.tar.gz gcc-config-9eaff8513518c35d9dfd8ade68460a912f76f62e.tar.bz2 gcc-config-9eaff8513518c35d9dfd8ade68460a912f76f62e.zip |
gcc-config: distinguish errors between bad profile and bad compiler
The distinction is useful when making tests: compiler is often
missing when config is present.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rwxr-xr-x | gcc-config | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1083,14 +1083,17 @@ if [[ ${DOIT} != "get_current_profile" ]] ; then CC_COMP_TARGET=${CC_COMP%-${CC_COMP_VERSION}*} fi - if [[ ! -d ${EROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]]; then + if [[ ! -d ${EROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]] ; then CC_COMP_VERSION=${CC_COMP_VERSION%-*} fi - if [[ ! -d ${EROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]] || \ - [[ ! -f ${GCC_ENV_D}/${CC_COMP} ]] - then - eerror "${argv0}: Profile does not exist or invalid setting for ${GCC_ENV_D}/${CC_COMP}" 1>&2 + if [[ ! -f ${GCC_ENV_D}/${CC_COMP} ]] ; then + eerror "${argv0}: Profile '${GCC_ENV_D}/${CC_COMP}' does not exist" 1>&2 + #exit 1 + fi + + if [[ ! -d ${EROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]] ; then + eerror "${argv0}: Did not find compiler at '${EROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION}'" 1>&2 #exit 1 fi fi |