Skip to contentSkip to conversation

apt: Always Use libstdc++ with clang

PATCH New Khem Raj 1 participant 1 message Jul 19, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 apt: Always Use libstdc++ with clang

Clang can be configured to link either libc++ or libstdc++ by default. apt does not build with libc++, this is reported upstream [1] as well untill this is root caused and either fixed in apt or libc++, use libstdc++

[1] https://github.com/llvm/llvm-project/issues/63743

---
 meta/recipes-devtools/apt/apt_2.6.1.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/apt/apt_2.6.1.bb +3 -0
index 50ac2ea812c..45761367e4b 100644
@@ -56,6 +56,9 @@ EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \
     -DWITH_TESTS=False \
 "
 
+# See https://github.com/llvm/llvm-project/issues/63743
+CXXFLAGS:append:toolchain-clang = " -stdlib=libstdc++"
+
 do_configure:prepend() {
 	echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >>  ${WORKDIR}/toolchain.cmake
 }