mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
llvm: delete clang-9.0.1.patchset
This commit is contained in:
@@ -1,198 +0,0 @@
|
||||
From 51df9851c343568cace9dab892a7db88f8facda9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Mon, 18 Jul 2016 14:13:19 +0200
|
||||
Subject: support for secondary arch.
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 60937aa..7408bed 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -400,6 +400,10 @@ if (APPLE)
|
||||
message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}")
|
||||
endif()
|
||||
endif()
|
||||
+if(DEFINED HAIKU_HYBRID_SECONDARY)
|
||||
+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY})
|
||||
+endif()
|
||||
+
|
||||
|
||||
include(CMakeParseArguments)
|
||||
include(AddClang)
|
||||
diff --git a/lib/Driver/ToolChains/Haiku.cpp b/lib/Driver/ToolChains/Haiku.cpp
|
||||
index 18f550c..5e9fd03 100644
|
||||
--- a/lib/Driver/ToolChains/Haiku.cpp
|
||||
+++ b/lib/Driver/ToolChains/Haiku.cpp
|
||||
@@ -19,6 +19,13 @@ using namespace llvm::opt;
|
||||
Haiku::Haiku(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
|
||||
: Generic_ELF(D, Triple, Args) {
|
||||
|
||||
+#ifdef HAIKU_HYBRID_SECONDARY
|
||||
+ getProgramPaths().insert(getProgramPaths().begin(), getDriver().SysRoot
|
||||
+ + "/system/bin/" HAIKU_HYBRID_SECONDARY);
|
||||
+ getFilePaths().clear();
|
||||
+ getFilePaths().push_back(getDriver().SysRoot + "/system/lib/"
|
||||
+ HAIKU_HYBRID_SECONDARY);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
|
||||
@@ -29,6 +36,12 @@ void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
|
||||
|
||||
void Haiku::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
|
||||
llvm::opt::ArgStringList &CC1Args) const {
|
||||
+#ifdef HAIKU_HYBRID_SECONDARY
|
||||
+ addLibStdCXXIncludePaths(getDriver().SysRoot, "/system/develop/headers/"
|
||||
+ HAIKU_HYBRID_SECONDARY "/c++", getTriple().str(), "", "", "",
|
||||
+ DriverArgs, CC1Args);
|
||||
+#else
|
||||
addLibStdCXXIncludePaths(getDriver().SysRoot, "/system/develop/headers/c++",
|
||||
- getTriple().str(), "", "", "", DriverArgs, CC1Args);
|
||||
+ getTriple().str(), "", "", "", DriverArgs, CC1Args);
|
||||
+#endif
|
||||
}
|
||||
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
|
||||
index d65d134..97a652f 100644
|
||||
--- a/lib/Frontend/InitHeaderSearch.cpp
|
||||
+++ b/lib/Frontend/InitHeaderSearch.cpp
|
||||
@@ -241,7 +241,20 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
if (HSOpts.UseBuiltinIncludes) {
|
||||
// Ignore the sys root, we *always* look for clang headers relative to
|
||||
// supplied path.
|
||||
+#ifdef HAIKU_HYBRID_SECONDARY
|
||||
+ // Remove version from foo/lib/clang/version
|
||||
+ StringRef Ver = llvm::sys::path::filename(HSOpts.ResourceDir);
|
||||
+ StringRef NoVer = llvm::sys::path::parent_path(HSOpts.ResourceDir);
|
||||
+ // Remove clang from foo/lib/clang
|
||||
+ StringRef Clang = llvm::sys::path::filename(NoVer);
|
||||
+ SmallString<128> P = llvm::sys::path::parent_path(NoVer);
|
||||
+
|
||||
+ // Get foo/include/c++/v1
|
||||
+ llvm::sys::path::append(P, Clang, Ver);
|
||||
+#else
|
||||
SmallString<128> P = StringRef(HSOpts.ResourceDir);
|
||||
+#endif
|
||||
+
|
||||
llvm::sys::path::append(P, "include");
|
||||
AddUnmappedPath(P, ExternCSystem, false);
|
||||
}
|
||||
@@ -276,7 +289,12 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
}
|
||||
|
||||
case llvm::Triple::Haiku:
|
||||
+#ifdef HAIKU_HYBRID_SECONDARY
|
||||
+ AddPath("/boot/system/non-packaged/develop/headers/" HAIKU_HYBRID_SECONDARY,
|
||||
+ System, false);
|
||||
+#else
|
||||
AddPath("/boot/system/non-packaged/develop/headers", System, false);
|
||||
+#endif
|
||||
AddPath("/boot/system/develop/headers/os", System, false);
|
||||
AddPath("/boot/system/develop/headers/os/app", System, false);
|
||||
AddPath("/boot/system/develop/headers/os/arch", System, false);
|
||||
@@ -308,6 +326,13 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
AddPath("/boot/system/develop/headers/bsd", System, false);
|
||||
AddPath("/boot/system/develop/headers/glibc", System, false);
|
||||
AddPath("/boot/system/develop/headers/posix", System, false);
|
||||
+#ifdef HAIKU_HYBRID_SECONDARY
|
||||
+ AddPath("/boot/system/develop/headers/" HAIKU_HYBRID_SECONDARY, System, false);
|
||||
+ AddPath("/boot/system/develop/headers/" HAIKU_HYBRID_SECONDARY "/os", System,
|
||||
+ false);
|
||||
+ AddPath("/boot/system/develop/headers/" HAIKU_HYBRID_SECONDARY "/os/opengl",
|
||||
+ System, false);
|
||||
+#endif
|
||||
AddPath("/boot/system/develop/headers", System, false);
|
||||
break;
|
||||
case llvm::Triple::RTEMS:
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 4fd9edc50275663c3f551e242ee455c2841dcbb6 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 7 Apr 2016 18:30:52 +0000
|
||||
Subject: add a test for haiku driver.
|
||||
|
||||
* upstream wants a case for libcxx in ToolChains.cpp, so add it.
|
||||
|
||||
diff --git a/test/Driver/haiku.c b/test/Driver/haiku.c
|
||||
new file mode 100644
|
||||
index 0000000..9591739
|
||||
--- /dev/null
|
||||
+++ b/test/Driver/haiku.c
|
||||
@@ -0,0 +1,12 @@
|
||||
+// RUN: %clang -no-canonical-prefixes -target x86_64-unknown-haiku %s -### 2> %t.log
|
||||
+// RUN: FileCheck --check-prefix=CHECK-X86_64 -input-file %t.log %s
|
||||
+
|
||||
+// CHECK-X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-haiku"
|
||||
+// CHECK-X86_64: gcc{{.*}}" "-o" "a.out" "{{.*}}.o"
|
||||
+
|
||||
+// RUN: %clang -no-canonical-prefixes -target i586-pc-haiku %s -### 2> %t.log
|
||||
+// RUN: FileCheck --check-prefix=CHECK-X86 -input-file %t.log %s
|
||||
+
|
||||
+// CHECK-X86: clang{{.*}}" "-cc1" "-triple" "i586-pc-haiku"
|
||||
+// CHECK-X86: gcc{{.*}}" "-o" "a.out" "{{.*}}.o"
|
||||
+
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 8e50e0f821dced63fc949dd1624f827f85234877 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Mon, 18 Jul 2016 14:13:19 +0200
|
||||
Subject: Enable thread-local storage and disable PIE by default
|
||||
|
||||
|
||||
diff --git a/lib/Basic/Targets/OSTargets.h b/lib/Basic/Targets/OSTargets.h
|
||||
index c0373ff..3230ccc 100644
|
||||
--- a/lib/Basic/Targets/OSTargets.h
|
||||
+++ b/lib/Basic/Targets/OSTargets.h
|
||||
@@ -307,7 +307,6 @@ public:
|
||||
this->IntPtrType = TargetInfo::SignedLong;
|
||||
this->PtrDiffType = TargetInfo::SignedLong;
|
||||
this->ProcessIDType = TargetInfo::SignedLong;
|
||||
- this->TLSSupported = false;
|
||||
switch (Triple.getArch()) {
|
||||
default:
|
||||
break;
|
||||
diff --git a/lib/Driver/ToolChains/Haiku.h b/lib/Driver/ToolChains/Haiku.h
|
||||
index 2bc9832..50a20c2 100644
|
||||
--- a/lib/Driver/ToolChains/Haiku.h
|
||||
+++ b/lib/Driver/ToolChains/Haiku.h
|
||||
@@ -22,9 +22,7 @@ public:
|
||||
Haiku(const Driver &D, const llvm::Triple &Triple,
|
||||
const llvm::opt::ArgList &Args);
|
||||
|
||||
- bool isPIEDefault() const override {
|
||||
- return getTriple().getArch() == llvm::Triple::x86_64;
|
||||
- }
|
||||
+ bool isPIEDefault() const override { return false; }
|
||||
|
||||
void addLibCxxIncludePaths(
|
||||
const llvm::opt::ArgList &DriverArgs,
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 2471985e5500c8ba3aa06c68fb5d75c33165721b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 12 Mar 2019 21:08:57 +0100
|
||||
Subject: sysexits.h requires _BSD_SOURCE on Haiku beta1.
|
||||
|
||||
|
||||
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
|
||||
index 396ddf4..74a200d 100644
|
||||
--- a/lib/Driver/Driver.cpp
|
||||
+++ b/lib/Driver/Driver.cpp
|
||||
@@ -83,6 +83,9 @@
|
||||
#include <utility>
|
||||
#if LLVM_ON_UNIX
|
||||
#include <unistd.h> // getpid
|
||||
+#ifdef __HAIKU__
|
||||
+#define _BSD_SOURCE
|
||||
+#endif
|
||||
#include <sysexits.h> // EX_IOERR
|
||||
#endif
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
Reference in New Issue
Block a user