From ee120105fcf78fec48e6b1860fee06b729d7d86f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 12 Dec 2015 23:41:18 -0500 Subject: [PATCH] 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. --- eclass/toolchain.eclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.26.2