diff mbox series

[meta-oe,mickledore,26/36] minifi-cpp: Remove references to buildpaths in generated files

Message ID 20230531111309.2454603-26-akuster808@gmail.com
State New
Headers show
Series [meta-oe,mickledore,01/36] libencode-perl: Remove buildpaths from generated .exh files | expand

Commit Message

akuster808 May 31, 2023, 11:12 a.m. UTC
From: Khem Raj <raj.khem@gmail.com>

bison/flex emits line directives which can be safely removed from
generated files.

agent_version.h is generated by cmake which has build information like
compiler and cflags etc. which contains buildpaths too, therefore
replace real workdir with <WORKDIR>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 0d2df1e4c404fd93ee0095a15db00d17f2321e18)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
index b76f120ee1..9ae72d2e99 100644
--- a/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
+++ b/meta-oe/recipes-extended/minifi-cpp/minifi-cpp_0.7.0.bb
@@ -61,6 +61,8 @@  EXTRA_OECMAKE += " \
     -DGCC_AR=${STAGING_BINDIR_TOOLCHAIN}/${AR} \
     -DGCC_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${RANLIB} \
     -DDISABLE_PYTHON_SCRIPTING=ON \
+    -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \
+    -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines --file-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \
     "
 EXTRA_OECMAKE:append:toolchain-clang = " -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib"
 LDFLAGS:append:toolchain-clang = " -fuse-ld=lld"
@@ -88,6 +90,10 @@  do_configure:prepend:libc-musl() {
     sed -i -e 's/-DHAVE_POSIX_STRERROR_R=0/-DHAVE_POSIX_STRERROR_R=1/' ${S}/CMakeLists.txt
 }
 
+do_configure:append() {
+    sed -i -e 's|${WORKDIR}|<WORKDIR>|g' ${S}/libminifi/include/agent/agent_version.h
+}
+
 CFLAGS:append:libc-glibc = " -D_GNU_SOURCE"
 CXXFLAGS:append:libc-glibc = " -D_GNU_SOURCE"