From: Mike Frysinger Date: Sun, 13 Dec 2015 04:41:18 +0000 (-0500) Subject: toolchain.eclass: fix warnings when progs are linked X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ee120105fcf78fec48e6b1860fee06b729d7d86f;p=gentoo.git toolchain.eclass: fix warnings when progs are linked When gcc installs programs into BINPATH, it sometimes links them so that the $CHOST-xxx and xxx progs are the same. The logic to standardize the naming in BINPATH then triggers a warning as they're the same file. Manually delete the target before running the mv to avoid that business. --- diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 82b77adb4ab5..eb6c4a19fe1a 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1663,7 +1663,12 @@ toolchain_src_install() { for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do # For some reason, g77 gets made instead of ${CTARGET}-g77... # this should take care of that - [[ -f ${x} ]] && mv ${x} ${CTARGET}-${x} + if [[ -f ${x} ]] ; then + # In case they're hardlinks, clear out the target first + # otherwise the mv below will complain. + rm -f ${CTARGET}-${x} + mv ${x} ${CTARGET}-${x} + fi if [[ -f ${CTARGET}-${x} ]] ; then if ! is_crosscompile ; then