summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-31 14:35:00 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-31 14:35:00 +0000
commitaca9739a1affb675a1fab6a034b4e95e156318a5 (patch)
treec7c4b47aec415128761c24a96b6b6f8ccda952e6
parentdbec9d9b2a6ce38d21e3ab2a60b0252d51f4d384 (diff)
downloadbcm5719-llvm-aca9739a1affb675a1fab6a034b4e95e156318a5.tar.gz
bcm5719-llvm-aca9739a1affb675a1fab6a034b4e95e156318a5.zip
Rules adjustments in order to build on DragonFly BSD.
Patch by Robin Hahling. llvm-svn: 193750
-rw-r--r--llvm/Makefile.rules4
-rw-r--r--llvm/lib/Support/Unix/Path.inc5
-rw-r--r--llvm/tools/llvm-shlib/Makefile4
3 files changed, 7 insertions, 6 deletions
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index ed7e0e90478..e53598b0276 100644
--- a/llvm/Makefile.rules
+++ b/llvm/Makefile.rules
@@ -274,7 +274,7 @@ CPP.Defines :=
ifeq ($(ENABLE_OPTIMIZED),1)
BuildMode := Release
# Don't use -fomit-frame-pointer on Darwin or FreeBSD.
- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin FreeBSD GNU/kFreeBSD))
+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin Darwin DragonFly FreeBSD GNU/kFreeBSD))
OmitFramePointer := -fomit-frame-pointer
endif
@@ -1290,7 +1290,7 @@ LD.Flags += -Wl,-exported_symbol,_main
endif
endif
-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU/kFreeBSD GNU))
+ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux NetBSD FreeBSD GNU/kFreeBSD GNU))
ifneq ($(ARCH), Mips)
LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
endif
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index f6a137e7a0b..c9dc8716714 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -182,7 +182,7 @@ namespace sys {
namespace fs {
#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) || \
- defined(__linux__) || defined(__CYGWIN__)
+ defined(__linux__) || defined(__CYGWIN__) || defined(__DragonFly__)
static int
test_dir(char buf[PATH_MAX], char ret[PATH_MAX],
const char *dir, const char *bin)
@@ -251,7 +251,8 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) {
return link_path;
}
#elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
- defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__)
+ defined(__OpenBSD__) || defined(__minix) || defined(__DragonFly__) || \
+ defined(__FreeBSD_kernel__)
char exe_path[PATH_MAX];
if (getprogpath(exe_path, argv0) != NULL)
diff --git a/llvm/tools/llvm-shlib/Makefile b/llvm/tools/llvm-shlib/Makefile
index 1d9053b3d3b..92f3132ff53 100644
--- a/llvm/tools/llvm-shlib/Makefile
+++ b/llvm/tools/llvm-shlib/Makefile
@@ -62,13 +62,13 @@ ifeq ($(HOST_OS),Darwin)
endif
endif
-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD OpenBSD GNU Bitrig))
+ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD OpenBSD GNU Bitrig))
# Include everything from the .a's into the shared library.
LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
-Wl,--no-whole-archive
endif
-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU/kFreeBSD GNU))
+ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU))
# Add soname to the library.
LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
endif
OpenPOWER on IntegriCloud