Files
haikuports/sys-devel/llvm/patches/llvm-3.5.2.patchset
2016-01-27 18:41:15 +00:00

96 lines
2.8 KiB
Plaintext

From 5ff5145ac1b8304b7fab9ecc57bd6a2b67fce47a Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Wed, 22 Jan 2014 05:04:31 +0000
Subject: haiku: fix Host.h for endian.h
diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
index 8f4bf3c..8114f9b 100644
--- a/include/llvm/Support/Host.h
+++ b/include/llvm/Support/Host.h
@@ -16,7 +16,7 @@
#include "llvm/ADT/StringMap.h"
-#if defined(__linux__) || defined(__GNU__)
+#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
#include <endian.h>
#else
#if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
--
2.2.2
From 14acb59dc94d2dae7d13e7b9cfab4a3bcacef0f5 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 18 May 2014 12:41:16 +0200
Subject: libLTO: add soname when building on Haiku.
diff --git a/tools/lto/Makefile b/tools/lto/Makefile
index a4fe9ac..b667105 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -21,6 +21,10 @@ ifdef LLVM_VERSION_INFO
CXX.Flags += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"'
endif
+ifeq ($(HOST_OS),Haiku)
+ LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-soname=$(SharedPrefix)LTO$(SHLIBEXT)
+endif
+
ifeq ($(HOST_OS),Darwin)
# Special hack to allow libLTO to have an offset version number.
ifdef LLVM_LTO_VERSION_OFFSET
--
2.2.2
From 44af3ac9034d9b48eabd0f43c394c3f565e2db1b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 20 Jan 2016 21:13:28 +0000
Subject: llvm-config: use /develop/headers instead of /include
* don't provide obj-root and src-root.
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index ed1c8c3..e22e243 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -261,7 +261,11 @@ int main(int argc, char **argv) {
"-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+#else
ActiveIncludeDir = ActivePrefix + "/include";
+#endif
ActiveBinDir = ActivePrefix + "/bin";
ActiveLibDir = ActivePrefix + "/lib";
ActiveIncludeOption = "-I" + ActiveIncludeDir;
@@ -321,10 +325,16 @@ int main(int argc, char **argv) {
#else
OS << "ON\n";
#endif
- } else if (Arg == "--obj-root") {
- OS << ActivePrefix << '\n';
- } else if (Arg == "--src-root") {
- OS << LLVM_SRC_ROOT << '\n';
+ } else if (Arg == "--obj-root" || Arg == "--src-root") {
+ if (IsInDevelopmentTree) {
+ if (Arg == "--obj-root")
+ OS << ActivePrefix << '\n';
+ else
+ OS << LLVM_SRC_ROOT << '\n';
+ } else {
+ llvm::errs() << "llvm-config: sources not installed\n";
+ exit(1);
+ }
} else {
usage();
}
--
2.2.2