mongodb: Keep build paths out of buildInfo

By default buildInfo embeds the compiler version string and CCFLAGS,
CXXFLAGS and LINKFLAGS, which carry --sysroot and -ffile-prefix-map
paths into mongod and mongos and trigger buildpaths QA warnings. Pass
a variables file that drops those entries from
MONGO_BUILDINFO_ENVIRONMENT_DATA.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj committed 2026-11-10 18:09:22 -08:00
1 parent cc2835067b
commit 17fb07cf79
2 files changed
+13

No files matched your search

@@ -0,0 +1,11 @@
# Keep the compiler and its flags, which carry build paths, out of
# the buildInfo command and --version output
from mongo.generators import default_buildinfo_environment_data
MONGO_BUILDINFO_ENVIRONMENT_DATA = {
k: v for k, v in default_buildinfo_environment_data().items()
if k not in ('cc', 'ccflags', 'cxx', 'cxxflags', 'linkflags')
}
# SConstruct rejects unknown names left in a variables file
del default_buildinfo_environment_data
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \
file://0003-boost-Fix-build-with-clang-23.patch \
file://0004-ssl-Fix-build-with-OpenSSL-4.patch \
file://0005-SERVER-49099-Remove-the-Node-swap-function-in-Biggie.patch \
file://oe-buildinfo.vars \
"
SRC_URI:append:libc-musl = "\
file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
@@ -87,6 +88,7 @@ EXTRA_OESCONS = "PREFIX=${prefix} \
TARGET_ARCH=${MONGO_ARCH} \
MONGO_VERSION=${PV} \
OBJCOPY=${OBJCOPY} \
--variables-files=${UNPACKDIR}/oe-buildinfo.vars \
--ssl \
--disable-warnings-as-errors \
--use-system-zlib \