--- gcc-config-1.3.15 2006-12-09 08:33:09.000000000 +0100 +++ /usr/bin/gcc-config 2006-12-09 12:49:14.000000000 +0100 @@ -163,9 +163,11 @@ if [[ ${f} == /* ]] ; then [[ ! -f ${f} ]] && ret=1 && break else + ret=1 for p in ${paths} ; do - [[ ! -f ${p}/${f} ]] && ret=1 && break 2 + [[ -f ${p}/${f} ]] && ret=0 && break done + [[ ${ret} == 1 ]] && break fi done @@ -206,6 +208,7 @@ # Extract all LDPATH's for our CHOST MY_LDPATH="" + ONLY_MY_LDPATH="" for x in ${GCC_PROFILES} ; do if [[ -f ${x} ]] ; then source "${x}" @@ -223,6 +226,7 @@ done export IFS=${old_IFS} fi + [[ -z ${ONLY_MY_LDPATH} ]] && ONLY_MY_LDPATH=${MY_LDPATH:1} done MY_LDPATH="${MY_LDPATH:1}" # trim leading : fi @@ -245,8 +249,15 @@ ${AWK} '!/^(STDCXX_INCDIR|LDPATH|CC|CXX|CTARGET|GCCBITS|GCC_SPECS)=/ {print $0}' \ "${GCC_ENV_D}/${CC_COMP}" > "${ENV_D}/05gcc" echo "LDPATH=\"${MY_LDPATH}\"" >> "${ENV_D}/05gcc" - if [[ -n ${GCC_SPECS} ]] && files_exist ${MY_LDPATH} ${GCC_SPECS} ; then - echo "GCC_SPECS=\"${GCC_SPECS}\"" >> "${ENV_D}/05gcc" + if [[ -n ${GCC_SPECS} ]] ; then + if files_exist ${ONLY_MY_LDPATH} ${GCC_SPECS} ; then + echo "GCC_SPECS=\"${GCC_SPECS}\"" >> "${ENV_D}/05gcc" + else + echo + ewarn "Your GCC spec configurations are broken." + ewarn "Please re-emerge gcc." + echo + fi else # People need to rebuild their gcc or setting GCC_SPECS to # "" will cause issues again :(