[Buildroot] [RFC PATCH 4/4] clang: Fix undefined reference to dladdr error

Qais Yousef qais.yousef at arm.com
Tue Sep 29 10:26:18 UTC 2020


For some reason the cmake::find_library() can't detect the path to dl,
so we end up not including the right library when linking, hence the
error above.

Could be a hack/workaround to the real problem.

Signed-off-by: Qais Yousef <qais.yousef at arm.com>
---
 .../0001-fix-undefined-reference-to-dladdr.patch    | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 package/clang/0001-fix-undefined-reference-to-dladdr.patch

diff --git a/package/clang/0001-fix-undefined-reference-to-dladdr.patch b/package/clang/0001-fix-undefined-reference-to-dladdr.patch
new file mode 100644
index 0000000000..b28c6a463c
--- /dev/null
+++ b/package/clang/0001-fix-undefined-reference-to-dladdr.patch
@@ -0,0 +1,13 @@
+--- ./tools/libclang/CMakeLists.txt.old	2020-08-02 10:17:54.995944248 +0100
++++ ./tools/libclang/CMakeLists.txt	2020-08-02 10:20:56.150147251 +0100
+@@ -58,10 +58,7 @@
+   endif()
+ endif ()
+ 
+-find_library(DL_LIBRARY_PATH dl)
+-if (DL_LIBRARY_PATH)
+   list(APPEND LIBS dl)
+-endif()
+ 
+ option(LIBCLANG_BUILD_STATIC
+   "Build libclang as a static library (in addition to a shared one)" OFF)
-- 
2.17.1



More information about the buildroot mailing list