krytarowski created this revision. krytarowski added subscribers: lldb-commits, brucem, joerg. krytarowski set the repository for this revision to rL LLVM.
This diff approaches building the project natively on NetBSD with the autoconf/gmake framework. Repository: rL LLVM http://reviews.llvm.org/D14531 Files: lib/Makefile tools/driver/Makefile tools/lldb-mi/Makefile tools/lldb-server/Makefile Index: tools/lldb-server/Makefile =================================================================== --- tools/lldb-server/Makefile +++ tools/lldb-server/Makefile @@ -20,6 +20,6 @@ LLVMLibsOptions += -Wl,-rpath,@loader_path/../lib/ endif -ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD)) +ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD NetBSD)) LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread endif Index: tools/lldb-mi/Makefile =================================================================== --- tools/lldb-mi/Makefile +++ tools/lldb-mi/Makefile @@ -22,12 +22,11 @@ LLVMLibsOptions += -Wl,-sectcreate -Wl,__TEXT -Wl,__info_plist -Wl,"$(PROJ_SRC_DIR)/lldb-Info.plist" endif -ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD)) +ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD NetBSD)) LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread endif ifeq ($(HOST_OS),FreeBSD) CPP.Flags += -I/usr/include/edit #-v LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread endif - Index: tools/driver/Makefile =================================================================== --- tools/driver/Makefile +++ tools/driver/Makefile @@ -26,12 +26,11 @@ LLVMLibsOptions += -Wl,-sectcreate -Wl,__TEXT -Wl,__info_plist -Wl,"$(PROJ_SRC_DIR)/lldb-Info.plist" endif -ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD)) +ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD NetBSD)) LLVMLibsOptions += -Wl,-rpath,$(LibDir) endif ifeq ($(HOST_OS),FreeBSD) CPP.Flags += -I/usr/include/edit #-v LLVMLibsOptions += -Wl,-rpath,$(LibDir) endif - Index: lib/Makefile =================================================================== --- lib/Makefile +++ lib/Makefile @@ -203,3 +203,14 @@ LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo \ -ledit -lncurses -lpanel -lpthread endif + +ifeq ($(HOST_OS),NetBSD) + # Include everything from the .a's into the shared library. + ProjLibsOptions := -Wl,--whole-archive $(ProjLibsOptions) \ + -Wl,--no-whole-archive + # Allow unresolved symbols. + LLVMLibsOptions += -Wl,--allow-shlib-undefined + # Link in python + LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/pkg/lib -lexecinfo \ + -ledit -lcurses -lpthread -lkvm -Wl,-rpath,/usr/pkg/lib +endif
Index: tools/lldb-server/Makefile =================================================================== --- tools/lldb-server/Makefile +++ tools/lldb-server/Makefile @@ -20,6 +20,6 @@ LLVMLibsOptions += -Wl,-rpath,@loader_path/../lib/ endif -ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD)) +ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD NetBSD)) LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread endif Index: tools/lldb-mi/Makefile =================================================================== --- tools/lldb-mi/Makefile +++ tools/lldb-mi/Makefile @@ -22,12 +22,11 @@ LLVMLibsOptions += -Wl,-sectcreate -Wl,__TEXT -Wl,__info_plist -Wl,"$(PROJ_SRC_DIR)/lldb-Info.plist" endif -ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD)) +ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD NetBSD)) LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread endif ifeq ($(HOST_OS),FreeBSD) CPP.Flags += -I/usr/include/edit #-v LLVMLibsOptions += -Wl,-rpath,$(LibDir) -lpthread endif - Index: tools/driver/Makefile =================================================================== --- tools/driver/Makefile +++ tools/driver/Makefile @@ -26,12 +26,11 @@ LLVMLibsOptions += -Wl,-sectcreate -Wl,__TEXT -Wl,__info_plist -Wl,"$(PROJ_SRC_DIR)/lldb-Info.plist" endif -ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD)) +ifneq (,$(filter $(HOST_OS), Linux GNU/kFreeBSD NetBSD)) LLVMLibsOptions += -Wl,-rpath,$(LibDir) endif ifeq ($(HOST_OS),FreeBSD) CPP.Flags += -I/usr/include/edit #-v LLVMLibsOptions += -Wl,-rpath,$(LibDir) endif - Index: lib/Makefile =================================================================== --- lib/Makefile +++ lib/Makefile @@ -203,3 +203,14 @@ LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo \ -ledit -lncurses -lpanel -lpthread endif + +ifeq ($(HOST_OS),NetBSD) + # Include everything from the .a's into the shared library. + ProjLibsOptions := -Wl,--whole-archive $(ProjLibsOptions) \ + -Wl,--no-whole-archive + # Allow unresolved symbols. + LLVMLibsOptions += -Wl,--allow-shlib-undefined + # Link in python + LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/pkg/lib -lexecinfo \ + -ledit -lcurses -lpthread -lkvm -Wl,-rpath,/usr/pkg/lib +endif
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits