Skip to contentSkip to conversation

apache2: Scrub -ffile-prefix-map in build.nice file

PATCH New Khem Raj 1 participant 4 messages Apr 21, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 apache2: Scrub -ffile-prefix-map in build.nice file

Fixes
QA Issue: File /usr/libexec/apache2/build/config.nice in package apache2-dev contains reference to TMPDIR [buildpaths]

---
 meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-webserver/recipes-httpd/apache2/apache2_2.4.63.bb +1 -1
index d4ae26d9c7..9ef8c13b79 100644
@@ -138,7 +138,7 @@ do_install:append:class-target() {
     sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
            -e 's,${DEBUG_PREFIX_MAP},,g' \
            -e 's,${RECIPE_SYSROOT},,g' \
-           -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
+           -e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
            -e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
            -e 's,${WORKDIR}/recipe-sysroot/,,g' \
            -e 's,".*/configure","configure",g' ${D}${libexecdir}/${PN}/build/config.nice
author
#1 lore raw

PATCH 2/4 ace: Delete -fdebug-prefix-map option from CXX

-fdebug-prefix-map is implied in -ffile-prefix-map

---
 meta-oe/recipes-connectivity/ace/ace_8.0.2.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-connectivity/ace/ace_8.0.2.bb +1 -1
index 4d3f210778..05f4973aed 100644
@@ -27,7 +27,7 @@ export ACE_ROOT = "${WORKDIR}/ACE_wrappers"
 inherit pkgconfig
 
 CXXFLAGS:append = " -fpermissive -Wnodeprecated-declarations"
-CXX:append = " -ffile-prefix-map=${WORKDIR}= -fdebug-prefix-map=${WORKDIR}= "
+CXX:append = " -ffile-prefix-map=${WORKDIR}= "
 EXTRA_OEMAKE += "INSTALL_LIB=${baselib} install_rpath=0"
 
 do_install() {
author
#2 lore raw

PATCH 3/4 bpftool: Use -ffile-prefix-map instead of -fdebug-prefix-map

In reply to Khem Raj

ffile-prefix-map is superset for reproducibility

---
 meta-oe/recipes-kernel/bpftool/bpftool.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-kernel/bpftool/bpftool.bb +1 -1
index ec778c6e76..d19746184c 100644
@@ -14,7 +14,7 @@ EXTRA_OEMAKE = "\
     -C ${S}/tools/bpf/bpftool \
     O=${B} \
     CROSS=${TARGET_PREFIX} \
-    CC="${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} ${CFLAGS}" \
+    CC="${CC} ${DEBUG_PREFIX_MAP} -ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} ${CFLAGS}" \
     HOSTCC="${BUILD_CC} ${BUILD_CFLAGS}" \
     LD="${LD}" \
     AR=${AR} \
author
#3 lore raw

PATCH 4/4 vboxguestdrivers: Use -ffile-prefix-map in place of -fdebug-prefix-map

In reply to Khem Raj
---
 .../recipes-support/vboxguestdrivers/vboxguestdrivers_7.1.4.bb  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_7.1.4.bb +1 -1
index f4f3abd81b..e8e6c3998b 100644
@@ -24,7 +24,7 @@ S:task-patch = "${WORKDIR}/${VBOX_NAME}"
 export VBOX_KBUILD_TARGET_ARCH = "${ARCH}"
 export VBOX_KBUILD_TARGET_ARCH:x86-64 = "amd64"
 
-EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -fdebug-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'"
+EXTRA_OEMAKE += "KERN_DIR='${WORKDIR}/${KERNEL_VERSION}/build' KBUILD_VERBOSE=1 CC='${CC} ${DEBUG_PREFIX_MAP} -ffile-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH} -ffile-prefix-map=${STAGING_KERNEL_BUILDDIR}=${KERNEL_SRC_PATH}'"
 
 # otherwise 5.2.22 builds just vboxguest
 MAKE_TARGETS = "all"