[pocl] 02/06: use --exclude-libs to not export symbols from static clang libraries

Andreas Beckmann anbe at moszumanska.debian.org
Mon Nov 27 14:50:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository pocl.

commit c8f535ee707ff9de7518d6794ac71284fbe36c29
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sun Nov 26 14:21:03 2017 +0100

    use --exclude-libs to not export symbols from static clang libraries
---
 debian/changelog                                 |  2 ++
 debian/patches/do-not-export-clang-symbols.patch | 23 +++++++++++++++++++++++
 debian/patches/series                            |  1 +
 3 files changed, 26 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4de9301..588b3b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 pocl (0.13-11) UNRELEASED; urgency=medium
 
   * Add Built-Using control field for linking against static clang libraries.
+  * do-not-export-clang-symbols.patch: Link static clang libraries with
+    --exclude-libs to not export their symbols.
 
  -- Andreas Beckmann <anbe at debian.org>  Sun, 26 Nov 2017 14:08:48 +0100
 
diff --git a/debian/patches/do-not-export-clang-symbols.patch b/debian/patches/do-not-export-clang-symbols.patch
new file mode 100644
index 0000000..033c822
--- /dev/null
+++ b/debian/patches/do-not-export-clang-symbols.patch
@@ -0,0 +1,23 @@
+Author: Andreas Beckmann <anbe at debian.org>
+Description: use --exclude-libs to not export symbols from static clang libraries
+
+--- a/cmake/LLVM.cmake
++++ b/cmake/LLVM.cmake
+@@ -198,6 +198,7 @@ set(CLANG_LIBNAMES clangFrontendTool cla
+ foreach(LIBNAME ${CLANG_LIBNAMES})
+   find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")
+   list(APPEND CLANG_LIBFILES "${C_LIBFILE_${LIBNAME}}")
++  set(LLVM_LDFLAGS "${LLVM_LDFLAGS} -Wl,--exclude-libs,lib${LIBNAME}")
+ endforeach()
+ 
+ # With Visual Studio llvm-config gives invalid list of static libs (libXXXX.a instead of XXXX.lib)
+--- a/lib/CL/Makefile.am
++++ b/lib/CL/Makefile.am
+@@ -187,6 +187,7 @@ libpocl_la_LDFLAGS += @LLVM_LDFLAGS@
+ AM_CXXFLAGS = @PTHREAD_CFLAGS@ @LLVM_CXX_FLAGS@
+ 
+ libpocl_la_LDFLAGS += -L${top_builddir}/lib/CL/ @ICD_LD_FLAGS@
++libpocl_la_LDFLAGS += -Wl,--exclude-libs,libclangFrontend:libclangDriver:libclangParse:libclangSema:libclangEdit:libclangLex:libclangSerialization:libclangAST:libclangBasic:libclangFrontendTool:libclangRewriteFrontend:libclangStaticAnalyzerFrontend:libclangStaticAnalyzerCore:libclangAnalysis:libclangCodeGen:libclangASTMatchers
+ libpocl_la_LIBADD += libpoclllvm.la
+ libpocl_la_LIBADD += ${top_builddir}/lib/llvmopencl/libllvmpasses.la
+ libpocl_la_LIBADD += -lclangFrontend -lclangDriver -lclangParse -lclangSema -lclangEdit -lclangLex -lclangSerialization
diff --git a/debian/patches/series b/debian/patches/series
index 19aa4c7..be411ec 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,4 +7,5 @@ find-sys-cdefs-h.patch
 glibc-2.23.patch
 set-POCL_DEVICE_ADDRESS_BITS-before-use.patch
 consistent-newlines-in-POCL_ABORT.patch
+do-not-export-clang-symbols.patch
 libstdc++-7-dev.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/pocl.git



More information about the Pkg-opencl-commits mailing list