commit: 9511906a1b16034f98c9f9adee91ed4cb875c620
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 16 09:58:20 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Jan 16 09:59:04 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9511906a
toolchain.eclass: move cross-compiler libcc1 out of /usr/lib #547754
I'm not entirely happy with this logic, but as other related bugs are
addressed, this will probably evolve with them. This at least unblocks
people trying to use gcc-5 cross-compilers.
eclass/toolchain.eclass | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 6d704fb..23b0fa7 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -104,6 +104,7 @@ INCLUDEPATH=${TOOLCHAIN_INCLUDEPATH:-${LIBPATH}/include}
if is_crosscompile ; then
BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/${CHOST}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}}
+ HOSTLIBPATH=${PREFIX}/${CHOST}/${CTARGET}/lib/${GCC_CONFIG_VER}
else
BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}}
fi
@@ -1699,6 +1700,8 @@ toolchain_src_install() {
# Now do the fun stripping stuff
env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}"
+ is_crosscompile && \
+ env RESTRICT="" CHOST=${CHOST} prepstrip "${D}/${HOSTLIBPATH}"
env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
# gcc used to install helper binaries in lib/ but then moved to libexec/
[[ -d ${D}${PREFIX}/libexec/gcc ]] && \
@@ -1779,6 +1782,17 @@ gcc_movelibs() {
# older versions of gcc did not support --print-multi-os-directory
tc_version_is_at_least 3.2 || return 0
+ # For non-target libs which are for CHOST and not CTARGET, we want to
+ # move them to the compiler-specific CHOST internal dir. This is stuff
+ # that you want to link against when building tools rather than building
+ # code to run on the target.
+ if tc_version_is_at_least 5 && is_crosscompile ; then
+ dodir "${HOSTLIBPATH}"
+ mv "${D}"/usr/$(get_libdir)/libcc1* "${D}${HOSTLIBPATH}" || die
+ fi
+
+ # For all the libs that are built for CTARGET, move them into the
+ # compiler-specific CTARGET internal dir.
local x multiarg removedirs=""
for multiarg in $($(XGCC) -print-multi-lib) ; do
multiarg=${multiarg#*;}