Files
poky/meta/recipes-devtools/clang/lldb_git.bb
Ross Burton dd862931b5 lldb: don't build rpaths into binaries
LLDB defaults to adding rpaths into the binaries which are then stripped
by CMake on install.

However, this rpath removal is implemented by editing the binary instead
of relinking at install time, so the final binary will have an entry in
the dynstr section which is all nulls but is as long as the build path.

Obviously this breaks reproducibility, so disable the use of rpaths in
LLDB to remove this problem.

(From OE-Core rev: d96e0458b696a7359d310cbe112c5dc2fc60f97d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-07-23 18:00:50 +01:00

54 lines
2.0 KiB
BlitzBasic

SUMMARY = "LLDB"
DESCRIPTION = "LLDB is a next generation, high-performance debugger."
HOMEPAGE = "https://lldb.llvm.org"
SECTION = "devel"
require common-clang.inc
require common-source.inc
COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64|powerpc64).*-linux"
LIC_FILES_CHKSUM = "file://lldb/LICENSE.TXT;md5=2e0d44968471fcde980034dbb826bea9"
inherit cmake pkgconfig python3native python3targetconfig
DEPENDS = "llvm-tblgen-native clang"
OECMAKE_SOURCEPATH = "${S}/lldb"
EXTRA_OECMAKE = "-DLLDB_INCLUDE_TESTS=OFF \
-DLLDB_ENABLE_LUA=OFF \
-DLLDB_PYTHON_RELATIVE_PATH=${PYTHON_SITEPACKAGES_DIR} \
-DLLDB_PYTHON_EXE_RELATIVE_PATH=${PYTHON_PN} \
-DLLDB_PYTHON_EXT_SUFFIX=${SOLIBSDEV} \
-DLLVM_DIR=${STAGING_LIBDIR}/cmake/llvm/ \
-DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
-DLLDB_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/lldb-tblgen \
-DLLDB_NO_INSTALL_DEFAULT_RPATH=ON \
"
PACKAGECONFIG ??= "libedit libxml2 lzma"
PACKAGECONFIG[libedit] = "-DLLDB_ENABLE_LIBEDIT=ON,-DLLDB_ENABLE_LIBEDIT=OFF,libedit"
PACKAGECONFIG[libxml2] = "-DLLDB_ENABLE_LIBXML2=ON,-DLLDB_ENABLE_LIBXML2=OFF,libxml2"
PACKAGECONFIG[lzma] = "-DLLDB_ENABLE_LZMA=ON,-DLLDB_ENABLE_LZMA=OFF,xz"
PACKAGECONFIG[python] = "-DLLDB_ENABLE_PYTHON=ON,-DLLDB_ENABLE_PYTHON=OFF,swig-native"
do_install:append() {
if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then
# Fix a bad symlink that points to the -dev .so
rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/lldb/_lldb.so
ln -s ${libdir}/liblldb.so.${MAJOR_VER}.${MINOR_VER} ${D}${PYTHON_SITEPACKAGES_DIR}/lldb/_lldb.so
fi
}
PACKAGES =+ "${PN}-python ${PN}-server"
FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
RDEPENDS:${PN}-python = "${PN}"
# This has a symlink to the lldb library
INSANE_SKIP:${PN}-python = "dev-so"
FILES:${PN}-server = "${bindir}/lldb-server"
BBCLASSEXTEND = "native nativesdk"