[LLVMdev] [diff] let llvm-shlib build on OpenBSD

Vladimir Kirillov proger at uaoug.org.ua
Wed Oct 27 05:16:52 PDT 2010


Hi, llvmdev!

The diff attached takes the features of OpenBSD binutils into account
(which needs --whole-archive) and makes build with ENABLE_SHARED
successful.
-------------- next part --------------
Index: tools/llvm-shlib/Makefile
===================================================================
--- tools/llvm-shlib/Makefile	(revision 117443)
+++ tools/llvm-shlib/Makefile	(working copy)
@@ -61,10 +61,12 @@
     endif
 endif
 
-ifeq ($(HOST_OS), Linux)
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux OpenBSD))
     # Include everything from the .a's into the shared library.
     LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
                        -Wl,--no-whole-archive
+endif
+ifeq ($(HOST_OS),Linux)
     # Don't allow unresolved symbols.
     LLVMLibsOptions += -Wl,--no-undefined
 endif


More information about the llvm-dev mailing list