blob: d7cc4e7b6e2d8e7df1b810e775113f333df31976 [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001# gcc-target.inc in OE-Core has these 2 lines in do_install():
2#
3# | # Add unwind.h, it comes from libgcc which we don't want to build again
4# | install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
5#
6# When TCMODE="external-arm" libgcc is provided by external-arm-toolchain.bb
7# And while it stages the necessary unwind.h file, it ends up in slightly
8# different location. While this is a kludge, be very conservative - only
9# copy the file for target build in recipe-specific sysroot, in external-arm
10# toolchain mode and if the required file does not exist already.
11
12do_install:prepend:class-target () {
13 if [ "${TCMODE}" = "external-arm" -a ! -f ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ]; then
14 install -d ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
15 install ${STAGING_LIBDIR}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/include/unwind.h ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/
16 fi
17}
18
19# When TCMODE="external-arm" and TARGET_SYS is different from EAT_TARGET_SYS,
20# gcc installs additional aliases as ${TARGET_SYS}-${EAT_TARGET_SYS}-gcc, etc.
21# Since those are not packaged and not too useful, let's remove them to avoid
22# QA issues
23do_install:append () {
24 for f in g++ gcc gcc-ar gcc-ranlib gcc-nm; do
25 rm -f ${D}${bindir}/${TARGET_SYS}-${EAT_TARGET_SYS}-$f
26 done
27}