/[gentoo-alt]/trunk/toolchain-prefix-wrapper/binutils-config.in
Gentoo

Diff of /trunk/toolchain-prefix-wrapper/binutils-config.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1600 Revision 1601
135 # cross linker 135 # cross linker
136 plugins="${plugins} gnu" 136 plugins="${plugins} gnu"
137 # allow debugging any plugin 137 # allow debugging any plugin
138 [[ -z ${LDPLUGINS} ]] || plugins=${LDPLUGINS} 138 [[ -z ${LDPLUGINS} ]] || plugins=${LDPLUGINS}
139 else 139 else
140 local ldversion=$("${EROOT}${BINPATH}/${x}" --version 2>/dev/null)
141 if [[ $? -eq 0 && ${ldversion} == *GNU* ]]; then
142 plugins="${plugins} gnu"
143 else
140 case ${TARGET} in 144 case ${TARGET} in
141 *-darwin*) plugins="${plugins} darwin" ;; 145 *-darwin*) plugins="${plugins} darwin" ;;
142 *-aix*) plugins="${plugins} aix" ;; 146 *-aix*) plugins="${plugins} aix" ;;
143 *-hpux*) plugins="${plugins} hpux" ;; 147 *-hpux*) plugins="${plugins} hpux" ;;
144 *-linux* | *-solaris*) plugins="${plugins} gnu" ;; 148 *-linux* | *-solaris*) plugins="${plugins} gnu" ;;
145 *) eerror "unknown platform ${CTARGET}" 149 *) eerror "unknown platform ${CTARGET}"
146 exit 1 150 exit 1
147 ;; 151 ;;
148 esac 152 esac
153 fi
149 fi 154 fi
150 for plugin in ${plugins}; do 155 for plugin in ${plugins}; do
151 echo "#include <${plugin}plugin.h>" 156 echo "#include <${plugin}plugin.h>"
152 done 157 done
153 echo "LdPluginFct const* LDPLUGINS() {" 158 echo "LdPluginFct const* LDPLUGINS() {"
173 if [[ -z ${cc} ]]; then 178 if [[ -z ${cc} ]]; then
174 echo -n "Cannot find compiler for ${HOST} (try setting CC)" 179 echo -n "Cannot find compiler for ${HOST} (try setting CC)"
175 return 1 180 return 1
176 fi 181 fi
177 rm -f "${EROOT}${BINPATH_LINKS}/${x}.new" > /dev/null || return 1 182 rm -f "${EROOT}${BINPATH_LINKS}/${x}.new" > /dev/null || return 1
183 if [[ -z ${ROOT%/} && ${TARGET} == ${HOST} ]]; then
184 # allow current ld-wrapper find the new ld,
185 # since the old one may be unmerged already.
186 export PATH="${EPREFIX}/${BINPATH}:${PATH}"
187 fi
178 "${cc}" -o "${EROOT}${BINPATH_LINKS}/${x}.new" "${ctargetfile}" \ 188 "${cc}" -o "${EROOT}${BINPATH_LINKS}/${x}.new" "${ctargetfile}" \
179 "-I${wrapper}" "${wrapper}/libbinutils-config.a" ${CFLAGS} || return 1 189 "-I${wrapper}" "${wrapper}/libbinutils-config.a" ${CFLAGS} || return 1
180 [[ ${DEBUG} == yes ]] || rm -f "${ctargetfile}" || return 1 190 [[ ${DEBUG} == yes ]] || rm -f "${ctargetfile}" || return 1
181 mv -f "${EROOT}${BINPATH_LINKS}/${x}"{.new,} || return 1 191 mv -f "${EROOT}${BINPATH_LINKS}/${x}"{.new,} || return 1
182 touch -r "${EROOT}/${BINPATH}/${x}" "${EROOT}${BINPATH_LINKS}/${x}" || return 1 192 touch -r "${EROOT}/${BINPATH}/${x}" "${EROOT}${BINPATH_LINKS}/${x}" || return 1

Legend:
Removed from v.1600  
changed lines
  Added in v.1601

  ViewVC Help
Powered by ViewVC 1.1.20