commit: 9eaff8513518c35d9dfd8ade68460a912f76f62e
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 13:41:39 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 13:41:39 2020 +0000
URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=9eaff851
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 <AT> gentoo.org>
gcc-config | 13 ++++++++-----
1 file 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