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.

Signed-off-by: Ryan Eatmon <[email protected]>
---
 .../recipes-devtools/gdbc6x/gdbserver-c6x_git.bb         | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta-ti-extras/recipes-devtools/gdbc6x/gdbserver-c6x_git.bb 
b/meta-ti-extras/recipes-devtools/gdbc6x/gdbserver-c6x_git.bb
index 3460eadb..0a31c67d 100644
--- a/meta-ti-extras/recipes-devtools/gdbc6x/gdbserver-c6x_git.bb
+++ b/meta-ti-extras/recipes-devtools/gdbc6x/gdbserver-c6x_git.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "TI gdb-server to be used with c6xgdb."
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = 
"file://../debian/copyright;md5=82c616b6c8f9c11c46feaaf8f9a11495"
 
-DEPENDS = "ti-xdais ti-framework-components ti-cgt6x-native ti-sysbios 
ti-xdctools-native"
+DEPENDS = "ti-xdais ti-framework-components ti-cgt6x-native ti-sysbios 
ti-xdctools-native perl-native"
 
 PR = "${INC_PR}.0"
 
@@ -26,11 +26,18 @@ do_configure() {
     :
 }
 
+# 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() {
     install -d ${D}${datadir}/ti/gdbc6x/include
     install -d ${D}${datadir}/ti/gdbc6x/lib
     cp -f ../include/* ${D}${datadir}/ti/gdbc6x/include
     cp -f ../lib/* ${D}${datadir}/ti/gdbc6x/lib
+
+    # Update compiled files to remove build host paths
+    find ${D}${datadir}/ti/gdbc6x/lib -type f -exec perl -pi -e 
's#${TMPDIR_FIX_SEARCH}#${TMPDIR_FIX_REPLACE}#g' {} \;
 }
 
 COMPATIBLE_MACHINE = "dra7xx"
-- 
2.17.1

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

Reply via email to