mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
llvm_clang: apply to 3.7.0 recipe.
This commit is contained in:
@@ -31,11 +31,16 @@ other than the ones listed above.
|
||||
HOMEPAGE="http://www.llvm.org/"
|
||||
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
|
||||
LICENSE="UIUC"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
|
||||
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
|
||||
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
|
||||
CHECKSUM_SHA256="ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153"
|
||||
CHECKSUM_SHA256_2="4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc"
|
||||
CHECKSUM_SHA256_3="8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd"
|
||||
SOURCE_DIR="llvm-$portVersion.src"
|
||||
PATCHES="llvm-${portVersion}.patchset"
|
||||
PATCHES_2="clang-${portVersion}.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -198,11 +203,72 @@ PROVIDES="
|
||||
devel:libLTO$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix >= $haikuVersion
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_clang="
|
||||
llvm${secondaryArchSuffix}_clang = $portVersion
|
||||
cmd:clang = $portVersion
|
||||
cmd:clang++ = $portVersion
|
||||
cmd:clang_apply_replacements = $portVersion
|
||||
cmd:clang_check = $portVersion
|
||||
cmd:clang_format = $portVersion
|
||||
cmd:clang_modernize = $portVersion
|
||||
cmd:clang_query = $portVersion
|
||||
cmd:clang_rename = $portVersion
|
||||
cmd:clang_tblgen = $portVersion
|
||||
cmd:clang_tidy = $portVersion
|
||||
cmd:c_index_test = $portVersion
|
||||
cmd:pp_trace = $portVersion
|
||||
lib:libclang$secondaryArchSuffix = $portVersion
|
||||
devel:libclang$secondaryArchSuffix = $portVersion
|
||||
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
|
||||
devel:libclangast$secondaryArchSuffix = $portVersion
|
||||
devel:libclangastmatchers$secondaryArchSuffix = $portVersion
|
||||
devel:libclanganalysis$secondaryArchSuffix = $portVersion
|
||||
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
|
||||
devel:libclangbasic$secondaryArchSuffix = $portVersion
|
||||
devel:libclangcodegen$secondaryArchSuffix = $portVersion
|
||||
devel:libclangdriver$secondaryArchSuffix = $portVersion
|
||||
devel:libclangdynamicastmatchers$secondaryArchSuffix = $portVersion
|
||||
devel:libclangedit$secondaryArchSuffix = $portVersion
|
||||
devel:libclangformat$secondaryArchSuffix = $portVersion
|
||||
devel:libclangfrontend$secondaryArchSuffix = $portVersion
|
||||
devel:libclangfrontendtool$secondaryArchSuffix = $portVersion
|
||||
devel:libclangindex$secondaryArchSuffix = $portVersion
|
||||
devel:libclanglex$secondaryArchSuffix = $portVersion
|
||||
devel:libclangparse$secondaryArchSuffix = $portVersion
|
||||
devel:libclangquery$secondaryArchSuffix = $portVersion
|
||||
devel:libclangrename$secondaryArchSuffix = $portVersion
|
||||
devel:libclangrewrite$secondaryArchSuffix = $portVersion
|
||||
devel:libclangrewritefrontend$secondaryArchSuffix = $portVersion
|
||||
devel:libclangsema$secondaryArchSuffix = $portVersion
|
||||
devel:libclangserialization$secondaryArchSuffix = $portVersion
|
||||
devel:libclangstaticanalyzercheckers$secondaryArchSuffix = $portVersion
|
||||
devel:libclangstaticanalyzercore$secondaryArchSuffix = $portVersion
|
||||
devel:libclangstaticanalyzerfrontend$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidy$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidyreadability$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtooling$secondaryArchSuffix = $portVersion
|
||||
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
|
||||
devel:libmodernizecore$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_clang="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
PROVIDES_clang_analysis="
|
||||
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
|
||||
cmd:scan_build$secondaryArchSuffix = $portVersion
|
||||
cmd:scan_view$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_clang_analysis="
|
||||
llvm${secondaryArchSuffix}_clang == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel >= $haikuVersion
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
@@ -210,17 +276,25 @@ BUILD_PREREQUIRES="
|
||||
cmd:automake
|
||||
cmd:find
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:groff
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
cmd:python
|
||||
cmd:sed
|
||||
cmd:find
|
||||
cmd:grep
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# Add clang tools
|
||||
mkdir -p tools/clang
|
||||
cp -rd $sourceDir2/cfe-${portVersion}.src/* tools/clang/
|
||||
|
||||
# Add clang tools's tool's (really llvm?)
|
||||
mkdir -p tools/clang/tools/extra
|
||||
cp -rd $sourceDir3/clang-tools-extra-${portVersion}.src/* tools/clang/tools/extra
|
||||
|
||||
mkdir -p build; cd build
|
||||
# Haiku C++ requires rtti in a lot of central system components
|
||||
# such as Mesa
|
||||
@@ -233,6 +307,9 @@ BUILD()
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
mkdir -p $developDir
|
||||
mkdir -p $docDir
|
||||
mkdir -p $binDir
|
||||
|
||||
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
|
||||
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
|
||||
@@ -240,7 +317,6 @@ INSTALL()
|
||||
# You can try and be fancy here parsing each arch in a for loop... but
|
||||
# not all arches contain the same libraries. The inventory for each arch
|
||||
# also changes between releases... so lets KISS.
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libLLVMAArch64AsmParser \
|
||||
libLLVMAArch64AsmPrinter \
|
||||
@@ -355,6 +431,39 @@ INSTALL()
|
||||
libLLVMipa \
|
||||
libLLVMipo \
|
||||
libLTO
|
||||
|
||||
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
|
||||
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
|
||||
|
||||
# Install static analysis tools
|
||||
mkdir -p $developDir/tools/clang$secondaryArchSuffix
|
||||
cp -Ra ../tools/clang/tools/scan-build $developDir/tools/clang$secondaryArchSuffix/
|
||||
cp -Ra ../tools/clang/tools/scan-view $developDir/tools/clang$secondaryArchSuffix/
|
||||
|
||||
ln -s $developDir/tools/clang$secondaryArchSuffix/scan-build/scan-build $binDir/scan-build
|
||||
ln -s $developDir/tools/clang$secondaryArchSuffix/scan-view/scan-view $binDir/scan-view
|
||||
ln -s $binDir/clang $developDir/tools/clang$secondaryArchSuffix/scan-build/clang
|
||||
|
||||
prepareInstalledDevelLibs libclang* libmodernizeCore
|
||||
|
||||
mv $prefix/include/* $includeDir/
|
||||
rmdir $prefix/include
|
||||
|
||||
# analysis package
|
||||
packageEntries clang \
|
||||
$binDir/c-index-test \
|
||||
$binDir/clang* \
|
||||
$binDir/pp-trace \
|
||||
$includeDir/clang* \
|
||||
$libDir/libclang* \
|
||||
$developLibDir/libclang* \
|
||||
$developLibDir/libmodernizeCore*
|
||||
|
||||
# analysis package
|
||||
packageEntries clang_analysis \
|
||||
$binDir/scan-build \
|
||||
$binDir/scan-view \
|
||||
$developDir/tools/clang$secondaryArchSuffix
|
||||
}
|
||||
|
||||
TEST()
|
||||
|
||||
319
sys-devel/llvm/patches/clang-3.7.0.patchset
Normal file
319
sys-devel/llvm/patches/clang-3.7.0.patchset
Normal file
@@ -0,0 +1,319 @@
|
||||
From 7e932ef0ad9c4d3411213235f8a04038fd2fa873 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Sun, 1 Feb 2015 15:13:57 +0000
|
||||
Subject: haiku: fix header search paths
|
||||
|
||||
* /boot/develop no longer exists
|
||||
* /boot/common no longer exists
|
||||
|
||||
diff --git a/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp
|
||||
index e3a17c9..e785bec 100644
|
||||
--- a/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp
|
||||
+++ b/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp
|
||||
@@ -266,38 +266,41 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
}
|
||||
|
||||
case llvm::Triple::Haiku:
|
||||
- AddPath("/boot/common/include", System, false);
|
||||
- AddPath("/boot/develop/headers/os", System, false);
|
||||
- AddPath("/boot/develop/headers/os/app", System, false);
|
||||
- AddPath("/boot/develop/headers/os/arch", System, false);
|
||||
- AddPath("/boot/develop/headers/os/device", System, false);
|
||||
- AddPath("/boot/develop/headers/os/drivers", System, false);
|
||||
- AddPath("/boot/develop/headers/os/game", System, false);
|
||||
- AddPath("/boot/develop/headers/os/interface", System, false);
|
||||
- AddPath("/boot/develop/headers/os/kernel", System, false);
|
||||
- AddPath("/boot/develop/headers/os/locale", System, false);
|
||||
- AddPath("/boot/develop/headers/os/mail", System, false);
|
||||
- AddPath("/boot/develop/headers/os/media", System, false);
|
||||
- AddPath("/boot/develop/headers/os/midi", System, false);
|
||||
- AddPath("/boot/develop/headers/os/midi2", System, false);
|
||||
- AddPath("/boot/develop/headers/os/net", System, false);
|
||||
- AddPath("/boot/develop/headers/os/storage", System, false);
|
||||
- AddPath("/boot/develop/headers/os/support", System, false);
|
||||
- AddPath("/boot/develop/headers/os/translation", System, false);
|
||||
- AddPath("/boot/develop/headers/os/add-ons/graphics", System, false);
|
||||
- AddPath("/boot/develop/headers/os/add-ons/input_server", System, false);
|
||||
- AddPath("/boot/develop/headers/os/add-ons/screen_saver", System, false);
|
||||
- AddPath("/boot/develop/headers/os/add-ons/tracker", System, false);
|
||||
- AddPath("/boot/develop/headers/os/be_apps/Deskbar", System, false);
|
||||
- AddPath("/boot/develop/headers/os/be_apps/NetPositive", System, false);
|
||||
- AddPath("/boot/develop/headers/os/be_apps/Tracker", System, false);
|
||||
- AddPath("/boot/develop/headers/cpp", System, false);
|
||||
- AddPath("/boot/develop/headers/cpp/i586-pc-haiku", System, false);
|
||||
- AddPath("/boot/develop/headers/3rdparty", System, false);
|
||||
- AddPath("/boot/develop/headers/bsd", System, false);
|
||||
- AddPath("/boot/develop/headers/glibc", System, false);
|
||||
- AddPath("/boot/develop/headers/posix", System, false);
|
||||
- AddPath("/boot/develop/headers", System, false);
|
||||
+ AddPath("/boot/system/non-packaged/develop/headers", System, false);
|
||||
+ 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);
|
||||
+ AddPath("/boot/system/develop/headers/os/device", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/drivers", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/game", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/interface", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/kernel", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/locale", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/mail", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/media", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/midi", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/midi2", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/net", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/opengl", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/storage", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/support", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/translation", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/add-ons/graphics", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/add-ons/input_server", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/add-ons/mail_daemon", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/add-ons/registrar", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/add-ons/screen_saver", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/add-ons/tracker", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/be_apps/Deskbar", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/be_apps/NetPositive", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/os/be_apps/Tracker", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/cpp", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/cpp/i586-pc-haiku", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/3rdparty", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/bsd", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/glibc", System, false);
|
||||
+ AddPath("/boot/system/develop/headers/posix", System, false);
|
||||
+ AddPath("/boot/system/develop/headers", System, false);
|
||||
break;
|
||||
case llvm::Triple::RTEMS:
|
||||
break;
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 738f547cb46e175685c2e5edbdf51953daaf095c Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 1 Feb 2015 15:15:45 +0000
|
||||
Subject: libclang: add soname when building on Haiku.
|
||||
|
||||
|
||||
diff --git a/cfe-3.7.0.src/tools/libclang/Makefile b/cfe-3.7.0.src/tools/libclang/Makefile
|
||||
index 84914e0..b9a6b74 100644
|
||||
--- a/cfe-3.7.0.src/tools/libclang/Makefile
|
||||
+++ b/cfe-3.7.0.src/tools/libclang/Makefile
|
||||
@@ -35,7 +35,7 @@ USEDLIBS = clangIndex.a clangARCMigrate.a \
|
||||
include $(CLANG_LEVEL)/Makefile
|
||||
|
||||
# Add soname to the library.
|
||||
-ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD))
|
||||
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD Haiku))
|
||||
LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT)
|
||||
endif
|
||||
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 80c9e0757b75f1a1d1bbfdf1d927e27426ae8089 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Tue, 22 Dec 2015 22:07:06 +0000
|
||||
Subject: don't include c++ headers in C include search paths.
|
||||
|
||||
* define a Haiku toolchain, and add c++ headers path.
|
||||
|
||||
diff --git a/cfe-3.7.0.src/lib/Driver/Driver.cpp b/cfe-3.7.0.src/lib/Driver/Driver.cpp
|
||||
index 180c412..df42ca2 100644
|
||||
--- a/cfe-3.7.0.src/lib/Driver/Driver.cpp
|
||||
+++ b/cfe-3.7.0.src/lib/Driver/Driver.cpp
|
||||
@@ -2195,6 +2195,9 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
|
||||
case llvm::Triple::Solaris:
|
||||
TC = new toolchains::Solaris(*this, Target, Args);
|
||||
break;
|
||||
+ case llvm::Triple::Haiku:
|
||||
+ TC = new toolchains::Haiku(*this, Target, Args);
|
||||
+ break;
|
||||
case llvm::Triple::Win32:
|
||||
switch (Target.getEnvironment()) {
|
||||
default:
|
||||
diff --git a/cfe-3.7.0.src/lib/Driver/ToolChains.cpp b/cfe-3.7.0.src/lib/Driver/ToolChains.cpp
|
||||
index 15e36a1..8599754 100644
|
||||
--- a/cfe-3.7.0.src/lib/Driver/ToolChains.cpp
|
||||
+++ b/cfe-3.7.0.src/lib/Driver/ToolChains.cpp
|
||||
@@ -2523,6 +2523,34 @@ Tool *CloudABI::buildLinker() const {
|
||||
return new tools::cloudabi::Linker(*this);
|
||||
}
|
||||
|
||||
+/// Haiku - Haiku tool chain which can call as(1) and ld(1) directly.
|
||||
+
|
||||
+Haiku::Haiku(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
|
||||
+ : Generic_ELF(D, Triple, Args) {
|
||||
+
|
||||
+}
|
||||
+
|
||||
+void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
|
||||
+ ArgStringList &CC1Args) const {
|
||||
+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||
|
||||
+ DriverArgs.hasArg(options::OPT_nostdincxx))
|
||||
+ return;
|
||||
+
|
||||
+ switch (GetCXXStdlibType(DriverArgs)) {
|
||||
+ case ToolChain::CST_Libstdcxx:
|
||||
+ addSystemInclude(DriverArgs, CC1Args,
|
||||
+ getDriver().SysRoot + "/system/develop/headers/c++");
|
||||
+ addSystemInclude(DriverArgs, CC1Args,
|
||||
+ getDriver().SysRoot + "/system/develop/headers/c++/backward");
|
||||
+
|
||||
+ StringRef Triple = getTriple().str();
|
||||
+ addSystemInclude(DriverArgs, CC1Args,
|
||||
+ getDriver().SysRoot + "/system/develop/headers/c++/" +
|
||||
+ Triple);
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly.
|
||||
|
||||
OpenBSD::OpenBSD(const Driver &D, const llvm::Triple &Triple,
|
||||
diff --git a/cfe-3.7.0.src/lib/Driver/ToolChains.h b/cfe-3.7.0.src/lib/Driver/ToolChains.h
|
||||
index 59eaade..4d38413 100644
|
||||
--- a/cfe-3.7.0.src/lib/Driver/ToolChains.h
|
||||
+++ b/cfe-3.7.0.src/lib/Driver/ToolChains.h
|
||||
@@ -560,6 +560,18 @@ private:
|
||||
void findGccLibDir();
|
||||
};
|
||||
|
||||
+class LLVM_LIBRARY_VISIBILITY Haiku : public Generic_ELF {
|
||||
+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; }
|
||||
+
|
||||
+ void
|
||||
+ AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs,
|
||||
+ llvm::opt::ArgStringList &CC1Args) const override;
|
||||
+};
|
||||
+
|
||||
class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF {
|
||||
public:
|
||||
OpenBSD(const Driver &D, const llvm::Triple &Triple,
|
||||
diff --git a/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp
|
||||
index e785bec..eda9455 100644
|
||||
--- a/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp
|
||||
+++ b/cfe-3.7.0.src/lib/Frontend/InitHeaderSearch.cpp
|
||||
@@ -294,8 +294,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
AddPath("/boot/system/develop/headers/os/be_apps/Deskbar", System, false);
|
||||
AddPath("/boot/system/develop/headers/os/be_apps/NetPositive", System, false);
|
||||
AddPath("/boot/system/develop/headers/os/be_apps/Tracker", System, false);
|
||||
- AddPath("/boot/system/develop/headers/cpp", System, false);
|
||||
- AddPath("/boot/system/develop/headers/cpp/i586-pc-haiku", System, false);
|
||||
AddPath("/boot/system/develop/headers/3rdparty", System, false);
|
||||
AddPath("/boot/system/develop/headers/bsd", System, false);
|
||||
AddPath("/boot/system/develop/headers/glibc", System, false);
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 1d519905e76daca8c007259a7f9f3a9c5c37ae3f Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 14 Jan 2016 19:19:14 +0000
|
||||
Subject: add Haiku target info for x86_64
|
||||
|
||||
|
||||
diff --git a/cfe-3.7.0.src/lib/Basic/Targets.cpp b/cfe-3.7.0.src/lib/Basic/Targets.cpp
|
||||
index e4db004..a638e24 100644
|
||||
--- a/cfe-3.7.0.src/lib/Basic/Targets.cpp
|
||||
+++ b/cfe-3.7.0.src/lib/Basic/Targets.cpp
|
||||
@@ -351,6 +351,30 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
+// Haiku Target
|
||||
+template<typename Target>
|
||||
+class HaikuTargetInfo : public OSTargetInfo<Target> {
|
||||
+protected:
|
||||
+ void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
|
||||
+ MacroBuilder &Builder) const override {
|
||||
+ // Haiku defines; list based off of gcc output
|
||||
+ Builder.defineMacro("__HAIKU__");
|
||||
+ Builder.defineMacro("__ELF__");
|
||||
+ DefineStd(Builder, "unix", Opts);
|
||||
+ }
|
||||
+public:
|
||||
+ HaikuTargetInfo(const llvm::Triple &Triple)
|
||||
+ : OSTargetInfo<Target>(Triple) {
|
||||
+ this->SizeType = TargetInfo::UnsignedLong;
|
||||
+ this->IntPtrType = TargetInfo::SignedLong;
|
||||
+ this->PtrDiffType = TargetInfo::SignedLong;
|
||||
+ this->ProcessIDType = TargetInfo::SignedLong;
|
||||
+ this->TLSSupported = false;
|
||||
+ this->UserLabelPrefix = "";
|
||||
+
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
// Minix Target
|
||||
template<typename Target>
|
||||
class MinixTargetInfo : public OSTargetInfo<Target> {
|
||||
@@ -3772,25 +3796,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
-// x86-32 Haiku target
|
||||
-class HaikuX86_32TargetInfo : public X86_32TargetInfo {
|
||||
-public:
|
||||
- HaikuX86_32TargetInfo(const llvm::Triple &Triple) : X86_32TargetInfo(Triple) {
|
||||
- SizeType = UnsignedLong;
|
||||
- IntPtrType = SignedLong;
|
||||
- PtrDiffType = SignedLong;
|
||||
- ProcessIDType = SignedLong;
|
||||
- this->UserLabelPrefix = "";
|
||||
- this->TLSSupported = false;
|
||||
- }
|
||||
- void getTargetDefines(const LangOptions &Opts,
|
||||
- MacroBuilder &Builder) const override {
|
||||
- X86_32TargetInfo::getTargetDefines(Opts, Builder);
|
||||
- Builder.defineMacro("__INTEL__");
|
||||
- Builder.defineMacro("__HAIKU__");
|
||||
- }
|
||||
-};
|
||||
-
|
||||
// RTEMS Target
|
||||
template<typename Target>
|
||||
class RTEMSTargetInfo : public OSTargetInfo<Target> {
|
||||
@@ -4412,7 +4417,7 @@ public:
|
||||
if(Name == "generic") {
|
||||
auto subarch = getTriple().getSubArch();
|
||||
switch (subarch) {
|
||||
- case llvm::Triple::SubArchType::ARMSubArch_v8_1a:
|
||||
+ case llvm::Triple::SubArchType::ARMSubArch_v8_1a:
|
||||
return "8_1A";
|
||||
default:
|
||||
break;
|
||||
@@ -4451,7 +4456,7 @@ public:
|
||||
if(Name == "generic") {
|
||||
auto subarch = getTriple().getSubArch();
|
||||
switch (subarch) {
|
||||
- case llvm::Triple::SubArchType::ARMSubArch_v8_1a:
|
||||
+ case llvm::Triple::SubArchType::ARMSubArch_v8_1a:
|
||||
return "A";
|
||||
default:
|
||||
break;
|
||||
@@ -7311,7 +7316,7 @@ static TargetInfo *AllocateTarget(const llvm::Triple &Triple) {
|
||||
}
|
||||
}
|
||||
case llvm::Triple::Haiku:
|
||||
- return new HaikuX86_32TargetInfo(Triple);
|
||||
+ return new HaikuTargetInfo<X86_32TargetInfo>(Triple);
|
||||
case llvm::Triple::RTEMS:
|
||||
return new RTEMSX86_32TargetInfo(Triple);
|
||||
case llvm::Triple::NaCl:
|
||||
@@ -7358,6 +7363,8 @@ static TargetInfo *AllocateTarget(const llvm::Triple &Triple) {
|
||||
return new MicrosoftX86_64TargetInfo(Triple);
|
||||
}
|
||||
}
|
||||
+ case llvm::Triple::Haiku:
|
||||
+ return new HaikuTargetInfo<X86_64TargetInfo>(Triple);
|
||||
case llvm::Triple::NaCl:
|
||||
return new NaClTargetInfo<X86_64TargetInfo>(Triple);
|
||||
case llvm::Triple::PS4:
|
||||
--
|
||||
2.2.2
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
From 35e926dee49e69f4327dae3466e0def8512cc65e Mon Sep 17 00:00:00 2001
|
||||
From b3b154c6783c97da7e9336d50016364426cdfa17 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander von Gluck IV <kallisti5@unixzen.com>
|
||||
Date: Sat, 26 Sep 2015 17:50:18 -0500
|
||||
Subject: [PATCH 1/2] haiku: fix Host.h for endian.h
|
||||
Date: Wed, 22 Jan 2014 05:04:31 +0000
|
||||
Subject: haiku: fix Host.h for endian.h
|
||||
|
||||
---
|
||||
include/llvm/Support/Host.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
|
||||
index 8f4bf3c..8114f9b 100644
|
||||
@@ -23,17 +20,15 @@ index 8f4bf3c..8114f9b 100644
|
||||
--
|
||||
2.2.2
|
||||
|
||||
From 3cdc2f2c1892bbee5102aeee5228b4ccdde8d4d9 Mon Sep 17 00:00:00 2001
|
||||
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
||||
Date: Sat, 26 Sep 2015 17:51:06 -0500
|
||||
Subject: [PATCH 2/2] libLTO: add soname when building on Haiku.
|
||||
|
||||
---
|
||||
tools/lto/Makefile | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
From c5722091d833cc7569a960efa775dc33f2d2a485 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 530c05a..654f313 100644
|
||||
index 530c05a..ffa76d2 100644
|
||||
--- a/tools/lto/Makefile
|
||||
+++ b/tools/lto/Makefile
|
||||
@@ -17,6 +17,10 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
|
||||
@@ -50,3 +45,51 @@ index 530c05a..654f313 100644
|
||||
--
|
||||
2.2.2
|
||||
|
||||
|
||||
From 15f54ff914d0193b2ea2e0a8bb12c0dc4868fb5d 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 879b9ab..0ec9c9d 100644
|
||||
--- a/tools/llvm-config/llvm-config.cpp
|
||||
+++ b/tools/llvm-config/llvm-config.cpp
|
||||
@@ -263,7 +263,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" + LLVM_LIBDIR_SUFFIX;
|
||||
ActiveIncludeOption = "-I" + ActiveIncludeDir;
|
||||
@@ -323,10 +327,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user