summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-12 23:41:18 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-12 23:45:46 -0500
commitee120105fcf78fec48e6b1860fee06b729d7d86f (patch)
tree7f4334128a729c09ad8baf57d9179706881779eb /eclass
parentsys-devel/flex: fix tests #567332 (diff)
downloadgentoo-ee120105fcf78fec48e6b1860fee06b729d7d86f.tar.gz
gentoo-ee120105fcf78fec48e6b1860fee06b729d7d86f.tar.bz2
gentoo-ee120105fcf78fec48e6b1860fee06b729d7d86f.zip
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.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass7
1 files changed, 6 insertions, 1 deletions
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