aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-01-26 13:41:39 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-01-26 13:41:39 +0000
commit9eaff8513518c35d9dfd8ade68460a912f76f62e (patch)
treeef59c8250bff816443c9963634bbf329b7ed7d35 /gcc-config
parentgcc-config: fix numbered access to toolchains (diff)
downloadgcc-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>
Diffstat (limited to 'gcc-config')
-rwxr-xr-xgcc-config13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc-config b/gcc-config
index 8b4fd20..f03a46a 100755
--- a/gcc-config
+++ b/gcc-config
@@ -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