The older TI compilers do not have a mechanism for replacing paths in
the obj files they create.  So replace the string we want to remove with
an equally sized replacement string that does not contain the path.

Additionally, fix the generated documentation to not contain the paths
as well.

Signed-off-by: Ryan Eatmon <[email protected]>
---
 meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb 
b/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb
index 999993ea..00039213 100644
--- a/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb
+++ b/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb
@@ -2,7 +2,7 @@ require recipes-ti/ipc/ti-ipc.inc
 require recipes-ti/ipc/ti-ipc-common.inc
 require ti-ipc-rtos.inc
 
-DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native"
+DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native perl-native"
 
 PACKAGES =+ "${PN}-fw"
 FILES:${PN}-fw = "${nonarch_base_libdir}/firmware/*"
@@ -61,6 +61,10 @@ do_compile() {
   fi
 }
 
+# Variables to assist in searching/replacing the WORKDIR in binary files.
+TMPDIR_FIX_SEARCH = "${WORKDIR}"
+TMPDIR_FIX_REPLACE = "${@'_'*(len(d.getVar('WORKDIR'))-7)+"workdir"}"
+
 do_install() {
   CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
   IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'`
@@ -68,8 +72,14 @@ do_install() {
   install -d ${D}${IPC_INSTALL_DIR_RECIPE}
   cp ${CP_ARGS} ${IPC_PACKAGE_DIR}/* -d ${D}${IPC_INSTALL_DIR_RECIPE}
 
+  # Update doxygen generated documentation to remove build host paths
+  find ${D}${IPC_INSTALL_DIR_RECIPE} -type f -exec sed -i -e "s,${WORKDIR},,g" 
{} \;
+
   install -d ${D}${nonarch_base_libdir}/firmware/ipc
   cp ${CP_ARGS} ${S}/packages/ti/ipc/tests/bin/* 
${D}${nonarch_base_libdir}/firmware/ipc || true
+
+  # Update compiled files to remove build host paths
+  find ${D}${nonarch_base_libdir}/firmware/ipc -type f -exec perl -pi -e 
's#${TMPDIR_FIX_SEARCH}#${TMPDIR_FIX_REPLACE}#g' {} \;
 }
 
 KFDSPNUM = "0"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17897): 
https://lists.yoctoproject.org/g/meta-ti/message/17897
Mute This Topic: https://lists.yoctoproject.org/mt/107444373/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to