LLVM: Remove older patches/recipes < LLVM v5.0.0. (#3234)

This commit is contained in:
kenmays
2018-10-20 03:33:27 -07:00
committed by fbrosson
parent c3522d20f5
commit 1eceb8da2f
41 changed files with 0 additions and 10747 deletions

View File

@@ -1,155 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="The LLVM Project is a collection of modular and reusable compiler \
and toolchain technologies. Despite its name, LLVM has little to do with \
traditional virtual machines, though it does provide helpful libraries that \
can be used to build them. The name \"LLVM\" itself is not an acronym; it is \
the full name of the project.
LLVM began as a research project at the University of Illinois, with the goal \
of providing a modern, SSA-based compilation strategy capable of supporting \
both static and dynamic compilation of arbitrary programming languages. Since \
then, LLVM has grown to be an umbrella project consisting of a number of \
subprojects, many of which are being used in production by a wide variety of \
commercial and open source projects as well as being widely used in academic \
research. Code in the LLVM project is licensed under the \"UIUC\" BSD-Style \
license.
The primary sub-projects of LLVM are:
The LLVM Core libraries provide a modern source- and target-independent \
optimizer, along with code generation support for many popular CPUs (as well \
as some less common ones!) These libraries are built around a well specified \
code representation known as the LLVM intermediate representation (\"LLVM \
IR\"). The LLVM Core libraries are well documented, and it is particularly \
easy to invent your own language (or port an existing compiler) to use LLVM as \
an optimizer and code generator.
Clang is an \"LLVM native\" C/C++/Objective-C compiler, which aims to deliver \
amazingly fast compiles (e.g. about 3x faster than GCC when compiling \
Objective-C code in a debug configuration), extremely useful error and warning \
messages and to provide a platform for building great source level tools. The \
Clang Static Analyzer is a tool that automatically finds bugs in your code, \
and is a great example of the sort of tool that can be built using the Clang \
frontend as a library to parse C/C++ code.
dragonegg integrates the LLVM optimizers and code generator with the GCC \
parsers. This allows LLVM to compile Ada, Fortran, and other languages \
supported by the GCC compiler frontends, and access to C features not \
supported by Clang (such as OpenMP).
The LLDB project builds on libraries provided by LLVM and Clang to provide a \
great native debugger. It uses the Clang ASTs and expression parser, LLVM JIT, \
LLVM disassembler, etc so that it provides an experience that \"just works\". \
It is also blazing fast and much more memory efficient than GDB at loading \
symbols.
The libc++ and libc++ ABI projects provide a standard conformant and high-\
performance implementation of the C++ Standard Library, including full support \
for C++11.
The compiler-rt project provides highly tuned implementations of the low-level \
code generator support routines like \"__fixunsdfdi\" and other calls \
generated when a target doesn't have a short sequence of native instructions \
to implement a core IR operation.
The vmkit project is an implementation of the Java and .NET Virtual Machines \
that is built on LLVM technologies.
The polly project implements a suite of cache-locality optimizations as well \
as auto-parallelism and vectorization using a polyhedral model.
The libclc project aims to implement the OpenCL standard library.
The klee project implements a \"symbolic virtual machine\" which uses a \
theorem prover to try to evaluate all dynamic paths through a program in an \
effort to find bugs and to prove properties of functions. A major feature of \
klee is that it can produce a testcase in the event that it detects a bug.
The SAFECode project is a memory safety compiler for C/C++ programs. It \
instruments code with run-time checks to detect memory safety errors (e.g., \
buffer overflows) at run-time. It can be used to protect software from \
security attacks and can also be used as a memory safety error debugging tool \
like Valgrind.
In addition to official subprojects of LLVM, there are a broad variety of \
other projects that use components of LLVM for various tasks. Through these \
external projects you can use LLVM to compile Ruby, Python, Haskell, Java, D, \
PHP, Pure, Lua, and a number of other languages. A major strength of LLVM is \
its versatility, flexibility, and reusability, which is why it is being used \
for such a wide variety of different tasks: everything from doing light-weight \
JIT compiles of embedded languages like Lua to compiling Fortran code for \
massive super computers."
HOMEPAGE="http://www.llvm.org/"
LICENSE="UIUC"
REVISION="1"
ARCHITECTURES="!x86_gcc2 x86"
SECONDARY_ARCHITECTURES="x86"
SOURCE_URI="http://llvm.org/releases/3.0/llvm-3.0.tar.gz"
CHECKSUM_SHA256="519eb11d3499ce99c6ffdb8718651fc91425ed7690eac91c8d6853474f7c0477"
COPYRIGHT="2003-2011 University of Illinois at Urbana-Champaign"
SOURCE_DIR="llvm-$portVersion.src"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion compat >= 3
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
# cmd:autoconf
# cmd:flex
cmd:groff
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
# cmd:makeinfo
cmd:perl
# cmd:sed
# cmd:strip
# cmd:tar
"
#POLICY WARNING: Invalid top-level package entry "docs"
#POLICY WARNING: Invalid top-level package entry "include"
#POLICY WARNING: Invalid top-level package entry "share"
#POLICY WARNING: no matching provides "cmd:bugpoint" for "bin/bugpoint"
#POLICY WARNING: no matching provides "cmd:llc" for "bin/llc"
#POLICY WARNING: no matching provides "cmd:lli" for "bin/lli"
#POLICY WARNING: no matching provides "cmd:llvm_ar" for "bin/llvm-ar"
#POLICY WARNING: no matching provides "cmd:llvm_as" for "bin/llvm-as"
#POLICY WARNING: no matching provides "cmd:llvm_bcanalyzer" for "bin/llvm-bcanalyzer"
#POLICY WARNING: no matching provides "cmd:llvm_config" for "bin/llvm-config"
#POLICY WARNING: no matching provides "cmd:llvm_cov" for "bin/llvm-cov"
#POLICY WARNING: no matching provides "cmd:llvm_diff" for "bin/llvm-diff"
#POLICY WARNING: no matching provides "cmd:llvm_dis" for "bin/llvm-dis"
#POLICY WARNING: no matching provides "cmd:llvm_dwarfdump" for "bin/llvm-dwarfdump"
#POLICY WARNING: no matching provides "cmd:llvm_extract" for "bin/llvm-extract"
#POLICY WARNING: no matching provides "cmd:llvm_ld" for "bin/llvm-ld"
#POLICY WARNING: no matching provides "cmd:llvm_link" for "bin/llvm-link"
#POLICY WARNING: no matching provides "cmd:llvm_mc" for "bin/llvm-mc"
#POLICY WARNING: no matching provides "cmd:llvm_nm" for "bin/llvm-nm"
#POLICY WARNING: no matching provides "cmd:llvm_objdump" for "bin/llvm-objdump"
#POLICY WARNING: no matching provides "cmd:llvm_prof" for "bin/llvm-prof"
#POLICY WARNING: no matching provides "cmd:llvm_ranlib" for "bin/llvm-ranlib"
#POLICY WARNING: no matching provides "cmd:llvm_rtdyld" for "bin/llvm-rtdyld"
#POLICY WARNING: no matching provides "cmd:llvm_size" for "bin/llvm-size"
#POLICY WARNING: no matching provides "cmd:llvm_stub" for "bin/llvm-stub"
#POLICY WARNING: no matching provides "cmd:llvm_tblgen" for "bin/llvm-tblgen"
#POLICY WARNING: no matching provides "cmd:macho_dump" for "bin/macho-dump"
#POLICY WARNING: no matching provides "cmd:opt" for "bin/opt"
BUILD()
{
runConfigure ./configure --enable-optimized
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -1,91 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and \
toolchain technologies."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2012 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="3"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
CHECKSUM_SHA256="125090c4d26740f1d5e9838477c931ed7d9ad70d599ba265f46f3a42cb066343"
SOURCE_DIR="llvm-${portVersion}.src"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:llc
cmd:lli
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_prof
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_tblgen
cmd:macho_dump
cmd:opt
lib:BugpointPasses
lib:libLTO
lib:libprofile_rt
lib:LLVMHello
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
PATCH()
{
find . -type f -exec sed -i 's/\/usr\/bin\/env/\/bin\/env/g' "{}" \;
}
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs
}
INSTALL()
{
make install
# TODO: $developLibDir doesn't get included in the base package
# llvm is for -devel only, so having a -devel is odd and would break
# how llvm works
#mv $libDir/*.a $developLibdir/
fixPkgconfig
}

View File

@@ -1,55 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and \
toolchain technologies."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2012 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
CHECKSUM_SHA256="68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578"
SOURCE_DIR="llvm-${portVersion}.src"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
PATCH()
{
find . -type f -exec sed -i 's/\/usr\/bin\/env/\/bin\/env/g' "{}" \;
}
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs
}
INSTALL()
{
make install
}

View File

@@ -1,214 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and \
toolchain technologies."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2013 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
CHECKSUM_SHA256="7d28bb6eca243a2bb6d65a05743ab915b57958a7770277364e93534b63eef93a"
SOURCE_DIR="llvm-$portVersion.src"
PATCHES="llvm-3.4.1.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:opt
devel:libLLVMAArch64AsmParser
devel:libLLVMAArch64AsmPrinter
devel:libLLVMAArch64CodeGen
devel:libLLVMAArch64Desc
devel:libLLVMAArch64Disassembler
devel:libLLVMAArch64Info
devel:libLLVMAArch64Utils
devel:libLLVMAnalysis
devel:libLLVMARMAsmParser
devel:libLLVMARMAsmPrinter
devel:libLLVMARMCodeGen
devel:libLLVMARMDesc
devel:libLLVMARMDisassembler
devel:libLLVMARMInfo
devel:libLLVMAsmParser
devel:libLLVMAsmPrinter
devel:libLLVMBitReader
devel:libLLVMBitWriter
devel:libLLVMCodeGen
devel:libLLVMCore
devel:libLLVMCppBackendCodeGen
devel:libLLVMCppBackendInfo
devel:libLLVMDebugInfo
devel:libLLVMExecutionEngine
devel:libLLVMHexagonAsmPrinter
devel:libLLVMHexagonCodeGen
devel:libLLVMHexagonDesc
devel:libLLVMHexagonInfo
devel:libLLVMInstCombine
devel:libLLVMInstrumentation
devel:libLLVMInterpreter
devel:libLLVMipa
devel:libLLVMipo
devel:libLLVMIRReader
devel:libLLVMJIT
devel:libLLVMLinker
devel:libLLVMLTO
devel:libLLVMMC
devel:libLLVMMCDisassembler
devel:libLLVMMCJIT
devel:libLLVMMCParser
devel:libLLVMMipsAsmParser
devel:libLLVMMipsAsmPrinter
devel:libLLVMMipsCodeGen
devel:libLLVMMipsDesc
devel:libLLVMMipsDisassembler
devel:libLLVMMipsInfo
devel:libLLVMMSP430AsmPrinter
devel:libLLVMMSP430CodeGen
devel:libLLVMMSP430Desc
devel:libLLVMMSP430Info
devel:libLLVMNVPTXAsmPrinter
devel:libLLVMNVPTXCodeGen
devel:libLLVMNVPTXDesc
devel:libLLVMNVPTXInfo
devel:libLLVMObjCARCOpts
devel:libLLVMObject
devel:libLLVMOption
devel:libLLVMPowerPCAsmParser
devel:libLLVMPowerPCAsmPrinter
devel:libLLVMPowerPCCodeGen
devel:libLLVMPowerPCDesc
devel:libLLVMPowerPCInfo
devel:libLLVMR600AsmPrinter
devel:libLLVMR600CodeGen
devel:libLLVMR600Desc
devel:libLLVMR600Info
devel:libLLVMRuntimeDyld
devel:libLLVMScalarOpts
devel:libLLVMSelectionDAG
devel:libLLVMSparcCodeGen
devel:libLLVMSparcDesc
devel:libLLVMSparcInfo
devel:libLLVMSupport
devel:libLLVMSystemZAsmParser
devel:libLLVMSystemZAsmPrinter
devel:libLLVMSystemZCodeGen
devel:libLLVMSystemZDesc
devel:libLLVMSystemZDisassembler
devel:libLLVMSystemZInfo
devel:libLLVMTableGen
devel:libLLVMTarget
devel:libLLVMTransformUtils
devel:libLLVMVectorize
devel:libLLVMX86AsmParser
devel:libLLVMX86AsmPrinter
devel:libLLVMX86CodeGen
devel:libLLVMX86Desc
devel:libLLVMX86Disassembler
devel:libLLVMX86Info
devel:libLLVMX86Utils
devel:libLLVMXCoreAsmPrinter
devel:libLLVMXCoreCodeGen
devel:libLLVMXCoreDesc
devel:libLLVMXCoreDisassembler
devel:libLLVMXCoreInfo
devel:libLTO
lib:BugpointPasses
lib:libLTO
lib:LLVMHello
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
prepareInstalledDevelLibs libLLVMAArch64AsmParser libLLVMAArch64Disassembler \
libLLVMAArch64Utils
prepareInstalledDevelLibs libLLVMARMAsmParser libLLVMARMDisassembler
prepareInstalledDevelLibs libLLVMMipsAsmParser libLLVMMipsDisassembler
prepareInstalledDevelLibs libLLVMPowerPCAsmParser
prepareInstalledDevelLibs libLLVMSystemZAsmParser libLLVMSystemZDisassembler
prepareInstalledDevelLibs libLLVMX86AsmParser libLLVMX86Disassembler libLLVMX86Utils
prepareInstalledDevelLibs libLLVMXCoreDisassembler
prepareInstalledDevelLibs libLLVMSparcCodeGen libLLVMSparcDesc libLLVMSparcInfo
for arch in AArch64 ARM Hexagon Mips MSP430 NVPTX PowerPC R600 SystemZ X86 XCore
do
prepareInstalledDevelLibs libLLVM${arch}AsmPrinter \
libLLVM${arch}CodeGen libLLVM${arch}Desc libLLVM${arch}Info
done
prepareInstalledDevelLibs libLLVMAnalysis libLLVMAsmParser \
libLLVMAsmPrinter libLLVMBitReader libLLVMBitWriter libLLVMCodeGen \
libLLVMCore libLLVMCppBackendCodeGen libLLVMCppBackendInfo \
libLLVMDebugInfo libLLVMExecutionEngine libLLVMIRReader \
libLLVMInstCombine libLLVMInstrumentation libLLVMInterpreter libLLVMJIT \
libLLVMLTO libLLVMLinker libLLVMMC libLLVMMCDisassembler libLLVMMCJIT \
libLLVMMCParser libLLVMObjCARCOpts libLLVMObject libLLVMOption \
libLLVMRuntimeDyld libLLVMScalarOpts libLLVMSelectionDAG libLLVMSupport \
libLLVMTableGen libLLVMTarget libLLVMTransformUtils libLLVMVectorize \
libLLVMipa libLLVMipo libLTO
}
TEST()
{
make check
}

View File

@@ -1,214 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and \
toolchain technologies."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="5"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
CHECKSUM_SHA256="17038d47069ad0700c063caed76f0c7259628b0e79651ce2b540d506f2f1efd7"
SOURCE_DIR="llvm-$portVersion.src"
PATCHES="llvm-3.4.2.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:opt
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfo$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonAsmPrinter$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMJIT$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMR600AsmPrinter$secondaryArchSuffix
devel:libLLVMR600CodeGen$secondaryArchSuffix
devel:libLLVMR600Desc$secondaryArchSuffix
devel:libLLVMR600Info$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure --omit-dirs binDir ./configure --bindir=$prefix/bin --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
prepareInstalledDevelLibs libLLVMAArch64AsmParser libLLVMAArch64Disassembler \
libLLVMAArch64Utils
prepareInstalledDevelLibs libLLVMARMAsmParser libLLVMARMDisassembler
prepareInstalledDevelLibs libLLVMMipsAsmParser libLLVMMipsDisassembler
prepareInstalledDevelLibs libLLVMPowerPCAsmParser
prepareInstalledDevelLibs libLLVMSystemZAsmParser libLLVMSystemZDisassembler
prepareInstalledDevelLibs libLLVMX86AsmParser libLLVMX86Disassembler libLLVMX86Utils
prepareInstalledDevelLibs libLLVMXCoreDisassembler
prepareInstalledDevelLibs libLLVMSparcCodeGen libLLVMSparcDesc libLLVMSparcInfo
for arch in AArch64 ARM Hexagon Mips MSP430 NVPTX PowerPC R600 SystemZ X86 XCore
do
prepareInstalledDevelLibs libLLVM${arch}AsmPrinter \
libLLVM${arch}CodeGen libLLVM${arch}Desc libLLVM${arch}Info
done
prepareInstalledDevelLibs libLLVMAnalysis libLLVMAsmParser \
libLLVMAsmPrinter libLLVMBitReader libLLVMBitWriter libLLVMCodeGen \
libLLVMCore libLLVMCppBackendCodeGen libLLVMCppBackendInfo \
libLLVMDebugInfo libLLVMExecutionEngine libLLVMIRReader \
libLLVMInstCombine libLLVMInstrumentation libLLVMInterpreter libLLVMJIT \
libLLVMLTO libLLVMLinker libLLVMMC libLLVMMCDisassembler libLLVMMCJIT \
libLLVMMCParser libLLVMObjCARCOpts libLLVMObject libLLVMOption \
libLLVMRuntimeDyld libLLVMScalarOpts libLLVMSelectionDAG libLLVMSupport \
libLLVMTableGen libLLVMTarget libLLVMTransformUtils libLLVMVectorize \
libLLVMipa libLLVMipo libLTO
}
TEST()
{
make check
}

View File

@@ -1,88 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="
LLVM is a collection of modular and reuseable compiler and toolchain \
technologies."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2012 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.gz"
CHECKSUM_SHA256="25a5612d692c48481b9b397e2b55f4870e447966d66c96d655241702d44a2628"
PATCHES="llvm-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:opt
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
PATCH()
{
find . -type f -exec sed -i 's/\/usr\/bin\/env/\/bin\/env/g' "{}" \;
}
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs
}
INSTALL()
{
make install
}
TEST()
{
make check
}

View File

@@ -1,226 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="
LLVM is a collection of modular and reuseable compiler and and toolchain \
technologies."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="28e199f368ef0a4666708f31c7991ad3bcc3a578342b0306526dd35f07595c03"
SOURCE_DIR="llvm-$portVersion.src"
PATCHES="llvm-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:opt
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfo$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonAsmPrinter$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMJIT$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCAnalysis$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMR600AsmPrinter$secondaryArchSuffix
devel:libLLVMR600CodeGen$secondaryArchSuffix
devel:libLLVMR600Desc$secondaryArchSuffix
devel:libLLVMR600Info$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
prepareInstalledDevelLibs libLLVMAArch64AsmParser libLLVMAArch64Disassembler \
libLLVMAArch64Utils
prepareInstalledDevelLibs libLLVMARMAsmParser libLLVMARMDisassembler
prepareInstalledDevelLibs libLLVMMipsAsmParser libLLVMMipsDisassembler
prepareInstalledDevelLibs libLLVMPowerPCAsmParser libLLVMPowerPCDisassembler
prepareInstalledDevelLibs libLLVMSystemZAsmParser libLLVMSystemZDisassembler
prepareInstalledDevelLibs libLLVMX86AsmParser libLLVMX86Disassembler libLLVMX86Utils
prepareInstalledDevelLibs libLLVMXCoreDisassembler
prepareInstalledDevelLibs libLLVMSparcAsmParser libLLVMSparcDisassembler
for arch in AArch64 ARM Hexagon Mips MSP430 NVPTX PowerPC R600 SystemZ Sparc X86 XCore
do
prepareInstalledDevelLibs libLLVM${arch}AsmPrinter \
libLLVM${arch}CodeGen libLLVM${arch}Desc libLLVM${arch}Info
done
prepareInstalledDevelLibs libLLVMAnalysis libLLVMAsmParser \
libLLVMAsmPrinter libLLVMBitReader libLLVMBitWriter libLLVMCodeGen \
libLLVMCore libLLVMCppBackendCodeGen libLLVMCppBackendInfo \
libLLVMDebugInfo libLLVMExecutionEngine libLLVMIRReader \
libLLVMInstCombine libLLVMInstrumentation libLLVMInterpreter libLLVMJIT \
libLLVMLTO libLLVMLinker libLLVMLineEditor libLLVMMC libLLVMMCAnalysis \
libLLVMMCDisassembler libLLVMMCJIT libLLVMMCParser libLLVMObjCARCOpts \
libLLVMObject libLLVMOption libLLVMProfileData libLLVMRuntimeDyld \
libLLVMScalarOpts libLLVMSelectionDAG libLLVMSupport libLLVMTableGen \
libLLVMTarget libLLVMTransformUtils libLLVMVectorize libLLVMipa \
libLLVMipo libLTO
}
TEST()
{
make check
}

View File

@@ -1,338 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="
LLVM is a collection of modular and reuseable compiler and and toolchain \
technologies.
"
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="3"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="bf3275d2d7890015c8d8f5e6f4f882f8cf3bf51967297ebe74111d6d8b53be15"
SOURCE_DIR="llvm-$portVersion.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="6773f3f9cf815631cc7e779ec134ddd228dc8e9a250e1ea3a910610c59eb8f5c"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="e8d011250389cfc36eb51557ca25ae66ab08173e8d53536a0747356105d72906"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:opt
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfo$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonAsmPrinter$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMJIT$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCAnalysis$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMR600AsmPrinter$secondaryArchSuffix
devel:libLLVMR600CodeGen$secondaryArchSuffix
devel:libLLVMR600Desc$secondaryArchSuffix
devel:libLLVMR600Info$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $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_tblgen = $portVersion
cmd:clang_tidy = $portVersion
cmd:pp_trace = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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: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:libclangtooling$secondaryArchSuffix = $portVersion
devel:libmodernizecore$secondaryArchSuffix = $portVersion
lib:libclang$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
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
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
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
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
prepareInstalledDevelLibs libLLVMAArch64AsmParser libLLVMAArch64Disassembler \
libLLVMAArch64Utils
prepareInstalledDevelLibs libLLVMARMAsmParser libLLVMARMDisassembler
prepareInstalledDevelLibs libLLVMMipsAsmParser libLLVMMipsDisassembler
prepareInstalledDevelLibs libLLVMPowerPCAsmParser libLLVMPowerPCDisassembler
prepareInstalledDevelLibs libLLVMSystemZAsmParser libLLVMSystemZDisassembler
prepareInstalledDevelLibs libLLVMX86AsmParser libLLVMX86Disassembler libLLVMX86Utils
prepareInstalledDevelLibs libLLVMXCoreDisassembler
prepareInstalledDevelLibs libLLVMSparcAsmParser libLLVMSparcDisassembler
for arch in AArch64 ARM Hexagon Mips MSP430 NVPTX PowerPC R600 SystemZ Sparc X86 XCore
do
prepareInstalledDevelLibs libLLVM${arch}AsmPrinter \
libLLVM${arch}CodeGen libLLVM${arch}Desc libLLVM${arch}Info
done
prepareInstalledDevelLibs libLLVMAnalysis libLLVMAsmParser \
libLLVMAsmPrinter libLLVMBitReader libLLVMBitWriter libLLVMCodeGen \
libLLVMCore libLLVMCppBackendCodeGen libLLVMCppBackendInfo \
libLLVMDebugInfo libLLVMExecutionEngine libLLVMIRReader \
libLLVMInstCombine libLLVMInstrumentation libLLVMInterpreter libLLVMJIT \
libLLVMLTO libLLVMLinker libLLVMLineEditor libLLVMMC libLLVMMCAnalysis \
libLLVMMCDisassembler libLLVMMCJIT libLLVMMCParser libLLVMObjCARCOpts \
libLLVMObject libLLVMOption libLLVMProfileData libLLVMRuntimeDyld \
libLLVMScalarOpts libLLVMSelectionDAG libLLVMSupport libLLVMTableGen \
libLLVMTarget libLLVMTransformUtils libLLVMVectorize 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* \
$manDir/man1/clang.1
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$developDir/tools/clang$secondaryArchSuffix
}
TEST()
{
make check
}

View File

@@ -1,363 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="3"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="44196156d5749eb4b4224fe471a29cc3984df92570a4a89fa859f7394fc0c575"
SOURCE_DIR="llvm-$portVersion.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="4feb575f74fb3a74b6245400460230141bf610f235ef3a25008cfe6137828620"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="f21a374d74b194d8c984546266491b518859b5f12ed9abd49337b8060d3fc004"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:opt
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfo$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonAsmPrinter$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMJIT$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCAnalysis$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMR600AsmPrinter$secondaryArchSuffix
devel:libLLVMR600CodeGen$secondaryArchSuffix
devel:libLLVMR600Desc$secondaryArchSuffix
devel:libLLVMR600Info$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $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_tblgen = $portVersion
cmd:clang_tidy = $portVersion
cmd:pp_trace = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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: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:libclangtooling$secondaryArchSuffix = $portVersion
devel:libmodernizecore$secondaryArchSuffix = $portVersion
lib:libclang$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
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
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
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
export REQUIRES_RTTI=1
runConfigure ./configure --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
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
prepareInstalledDevelLibs libLLVMAArch64AsmParser libLLVMAArch64Disassembler \
libLLVMAArch64Utils
prepareInstalledDevelLibs libLLVMARMAsmParser libLLVMARMDisassembler
prepareInstalledDevelLibs libLLVMMipsAsmParser libLLVMMipsDisassembler
prepareInstalledDevelLibs libLLVMPowerPCAsmParser libLLVMPowerPCDisassembler
prepareInstalledDevelLibs libLLVMSystemZAsmParser libLLVMSystemZDisassembler
prepareInstalledDevelLibs libLLVMX86AsmParser libLLVMX86Disassembler libLLVMX86Utils
prepareInstalledDevelLibs libLLVMXCoreDisassembler
prepareInstalledDevelLibs libLLVMSparcAsmParser libLLVMSparcDisassembler
for arch in AArch64 ARM Hexagon Mips MSP430 NVPTX PowerPC R600 SystemZ Sparc X86 XCore
do
prepareInstalledDevelLibs libLLVM${arch}AsmPrinter \
libLLVM${arch}CodeGen libLLVM${arch}Desc libLLVM${arch}Info
done
prepareInstalledDevelLibs libLLVMAnalysis libLLVMAsmParser \
libLLVMAsmPrinter libLLVMBitReader libLLVMBitWriter libLLVMCodeGen \
libLLVMCore libLLVMCppBackendCodeGen libLLVMCppBackendInfo \
libLLVMDebugInfo libLLVMExecutionEngine libLLVMIRReader \
libLLVMInstCombine libLLVMInstrumentation libLLVMInterpreter libLLVMJIT \
libLLVMLTO libLLVMLinker libLLVMLineEditor libLLVMMC libLLVMMCAnalysis \
libLLVMMCDisassembler libLLVMMCJIT libLLVMMCParser libLLVMObjCARCOpts \
libLLVMObject libLLVMOption libLLVMProfileData libLLVMRuntimeDyld \
libLLVMScalarOpts libLLVMSelectionDAG libLLVMSupport libLLVMTableGen \
libLLVMTarget libLLVMTransformUtils libLLVMVectorize 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* \
$manDir/man1/clang.1
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$developDir/tools/clang$secondaryArchSuffix
}
TEST()
{
make check
}

View File

@@ -1,472 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="3"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153"
SOURCE_DIR="llvm-$portVersion.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_pdbdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:obj2yaml
cmd:opt
cmd:verify_uselistorder
cmd:yaml2obj
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
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:pp_trace = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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
lib:libclang$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
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
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
export REQUIRES_RTTI=1
runConfigure ../configure --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
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
# 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 \
libLLVMAArch64CodeGen \
libLLVMAArch64Desc \
libLLVMAArch64Disassembler \
libLLVMAArch64Info \
libLLVMAArch64Utils \
libLLVMAMDGPUAsmParser \
libLLVMAMDGPUAsmPrinter \
libLLVMAMDGPUCodeGen \
libLLVMAMDGPUDesc \
libLLVMAMDGPUInfo \
libLLVMAMDGPUUtils \
libLLVMARMAsmParser \
libLLVMARMAsmPrinter \
libLLVMARMCodeGen \
libLLVMARMDesc \
libLLVMARMDisassembler \
libLLVMARMInfo \
libLLVMAnalysis \
libLLVMAsmParser \
libLLVMAsmPrinter \
libLLVMBPFAsmPrinter \
libLLVMBPFCodeGen \
libLLVMBPFDesc \
libLLVMBPFInfo \
libLLVMBitReader \
libLLVMBitWriter \
libLLVMCodeGen \
libLLVMCore \
libLLVMCppBackendCodeGen \
libLLVMCppBackendInfo \
libLLVMDebugInfoDWARF \
libLLVMDebugInfoPDB \
libLLVMExecutionEngine \
libLLVMHexagonCodeGen \
libLLVMHexagonDesc \
libLLVMHexagonDisassembler \
libLLVMHexagonInfo \
libLLVMIRReader \
libLLVMInstCombine \
libLLVMInstrumentation \
libLLVMInterpreter \
libLLVMLTO \
libLLVMLibDriver \
libLLVMLineEditor \
libLLVMLinker \
libLLVMMC \
libLLVMMCDisassembler \
libLLVMMCJIT \
libLLVMMCParser \
libLLVMMIRParser \
libLLVMMSP430AsmPrinter \
libLLVMMSP430CodeGen \
libLLVMMSP430Desc \
libLLVMMSP430Info \
libLLVMMipsAsmParser \
libLLVMMipsAsmPrinter \
libLLVMMipsCodeGen \
libLLVMMipsDesc \
libLLVMMipsDisassembler \
libLLVMMipsInfo \
libLLVMNVPTXAsmPrinter \
libLLVMNVPTXCodeGen \
libLLVMNVPTXDesc \
libLLVMNVPTXInfo \
libLLVMObjCARCOpts \
libLLVMObject \
libLLVMOption \
libLLVMOrcJIT \
libLLVMPasses \
libLLVMPowerPCAsmParser \
libLLVMPowerPCAsmPrinter \
libLLVMPowerPCCodeGen \
libLLVMPowerPCDesc \
libLLVMPowerPCDisassembler \
libLLVMPowerPCInfo \
libLLVMProfileData \
libLLVMRuntimeDyld \
libLLVMScalarOpts \
libLLVMSelectionDAG \
libLLVMSparcAsmParser \
libLLVMSparcAsmPrinter \
libLLVMSparcCodeGen \
libLLVMSparcDesc \
libLLVMSparcDisassembler \
libLLVMSparcInfo \
libLLVMSupport \
libLLVMSystemZAsmParser \
libLLVMSystemZAsmPrinter \
libLLVMSystemZCodeGen \
libLLVMSystemZDesc \
libLLVMSystemZDisassembler \
libLLVMSystemZInfo \
libLLVMTableGen \
libLLVMTarget \
libLLVMTransformUtils \
libLLVMVectorize \
libLLVMX86AsmParser \
libLLVMX86AsmPrinter \
libLLVMX86CodeGen \
libLLVMX86Desc \
libLLVMX86Disassembler \
libLLVMX86Info \
libLLVMX86Utils \
libLLVMXCoreAsmPrinter \
libLLVMXCoreCodeGen \
libLLVMXCoreDesc \
libLLVMXCoreDisassembler \
libLLVMXCoreInfo \
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/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()
{
make check
}

View File

@@ -1,365 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="be7794ed0cec42d6c682ca8e3517535b54555a3defabec83554dbc74db545ad5"
SOURCE_DIR="llvm-$portVersion.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="56e2164c7c2a1772d5ed2a3e57485ff73ff06c97dff12edbeea1acc4412b0674"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="4a91edaccad1ce984c7c49a4a87db186b7f7b21267b2b03bcf4bd7820715bc6b"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_extract
cmd:llvm_link
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_pdbdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:obj2yaml
cmd:opt
cmd:verify_uselistorder
cmd:yaml2obj
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $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:pp_trace = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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
lib:libclang$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
cmd:python
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
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
export REQUIRES_RTTI=1
runConfigure ../configure --enable-optimized
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
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
# 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 \
libLLVM* \
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* \
$libDir/clang \
$developLibDir/libclang* \
$developLibDir/libmodernizeCore*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$developDir/tools/clang$secondaryArchSuffix
}
TEST()
{
make check
}

View File

@@ -1,397 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="555b028e9ee0f6445ff8f949ea10e9cd8be0d084840e21fbbe1d31d51fc06e46"
SOURCE_DIR="llvm-${portVersion}.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="04149236de03cf05232d68eb7cb9c50f03062e339b68f4f8a03b650a11536cf9"
SOURCE_DIR_2="cfe-${portVersion}.src"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="afbda810106a6e64444bc164b921be928af46829117c95b996f2678ce4cb1ec4"
SOURCE_DIR_3="clang-tools-extra-${portVersion}.src"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_c_test
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_dwp
cmd:llvm_extract
cmd:llvm_lib
cmd:llvm_link
cmd:llvm_lto
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_pdbdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_split
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:obj2yaml
cmd:opt
cmd:sancov
cmd:verify_uselistorder
cmd:yaml2obj
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfoCodeView$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonAsmParser$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSymbolize$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:clang_3.8 = $portVersion
cmd:clang_apply_replacements = $portVersion
cmd:clang_check = $portVersion
cmd:clang_cl = $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:git_clang_format = $portVersion
cmd:modularize = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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:libclangtidycertmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
devel:libclangtooling$secondaryArchSuffix = $portVersion
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
lib:libclang$secondaryArchSuffix = $portVersion
"
REQUIRES_clang="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang_analysis="
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
cmd:c++_analyzer$secondaryArchSuffix = $portVersion
cmd:ccc_analyzer$secondaryArchSuffix = $portVersion
cmd:scan_build$secondaryArchSuffix = $portVersion
cmd:scan_view$secondaryArchSuffix = $portVersion
"
REQUIRES_clang_analysis="
llvm${secondaryArchSuffix}_clang == $portVersion base
cmd:python
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Add clang tools
mkdir -p tools/clang
cp -rd $sourceDir2/* tools/clang/
# Add clang tools's tool's (really llvm?)
mkdir -p tools/clang/tools/extra
cp -rd $sourceDir3/* tools/clang/tools/extra
mkdir -p build; cd build
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES \
-DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_THREADS=NO \
..
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
cd build
mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
if [ -n $secondaryArchSuffix ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
binDir=$prefix/bin
fi
# 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 \
libLLVM* \
libLTO \
libclang*
mv $prefix/include/* $includeDir/
mv $prefix/libexec/* $binDir/
mv $prefix/share/man/* $manDir/
mv $prefix/share/clang $dataDir/
mv $prefix/share/llvm $dataDir/
mv $prefix/share/scan-build $dataDir/
mv $prefix/share/scan-view $dataDir/
rmdir $prefix/include $prefix/libexec $prefix/share/man
sed -i 's|/libexec/|/bin/|' $binDir/scan-build
sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view
# clang package
packageEntries clang \
$binDir/c-index-test \
$binDir/clang* \
$binDir/git-clang-format \
$binDir/modularize \
$dataDir/clang \
$includeDir/clang* \
$libDir/libclang* \
$libDir/clang \
$developLibDir/libclang*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$binDir/c++-analyzer \
$binDir/ccc-analyzer \
$dataDir/scan-build \
$dataDir/scan-view \
$manDir/man1/scan-build.1
}
TEST()
{
cd build
make $jobArgs check
}

View File

@@ -1,411 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="3"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="6e82ce4adb54ff3afc18053d6981b6aed1406751b8742582ed50f04b5ab475f9"
SOURCE_DIR="llvm-${portVersion}.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="4cd3836dfb4b88b597e075341cae86d61c63ce3963e45c7fe6a8bf59bb382cdf"
SOURCE_DIR_2="cfe-${portVersion}.src"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="664a5c60220de9c290bf2a5b03d902ab731a4f95fe73a00856175ead494ec396"
SOURCE_DIR_3="clang-tools-extra-${portVersion}.src"
SOURCE_URI_4="http://llvm.org/releases/${portVersion}/compiler-rt-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_4="0df011dae14d8700499dfc961602ee0a9572fef926202ade5dcdfe7858411e5c"
SOURCE_DIR_4="compiler-rt-${portVersion}.src"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_c_test
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_dwp
cmd:llvm_extract
cmd:llvm_lib
cmd:llvm_link
cmd:llvm_lto
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_pdbdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_split
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:obj2yaml
cmd:opt
cmd:sancov
cmd:verify_uselistorder
cmd:yaml2obj
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfoCodeView$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMHexagonAsmParser$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSymbolize$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:clang_3.8 = $portVersion
cmd:clang_apply_replacements = $portVersion
cmd:clang_check = $portVersion
cmd:clang_cl = $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:git_clang_format = $portVersion
cmd:modularize = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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:libclangtidycertmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
devel:libclangtooling$secondaryArchSuffix = $portVersion
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
lib:libclang$secondaryArchSuffix = $portVersion
"
REQUIRES_clang="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang_analysis="
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
cmd:c++_analyzer = $portVersion
cmd:ccc_analyzer = $portVersion
cmd:scan_build = $portVersion
cmd:scan_view = $portVersion
"
REQUIRES_clang_analysis="
llvm${secondaryArchSuffix}_clang == $portVersion base
cmd:python
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Add clang tools
mkdir -p tools/clang
cp -rd $sourceDir2/* tools/clang/
# Add clang tools's tool's (really llvm?)
mkdir -p tools/clang/tools/extra
cp -rd $sourceDir3/* tools/clang/tools/extra
mkdir -p projects/compiler-rt
cp -rd $sourceDir4/* projects/compiler-rt
local cmakeFlags
if [ -n "$secondaryArchSuffix" ]; then
cmakeFlags=-DHAIKU_HYBRID_SECONDARY="\"${effectiveTargetArchitecture}\""
fi
mkdir -p build; cd build
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES $cmakeFlags \
-DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_THREADS=NO \
..
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
cd build
mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C projects/compiler-rt install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
if [ -n $secondaryArchSuffix ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
binDir=$prefix/bin
fi
# 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 \
libLLVM* \
libLTO \
libclang*
mv $prefix/include/* $includeDir/
mv $prefix/libexec/* $binDir/
mv $prefix/share/man/* $manDir/
mv $prefix/share/clang $dataDir/
mv $prefix/share/llvm $dataDir/
mv $prefix/share/scan-build $dataDir/
mv $prefix/share/scan-view $dataDir/
rmdir $prefix/include $prefix/libexec $prefix/share/man $prefix/share
sed -i 's|/libexec/|/bin/|' $binDir/scan-build
sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view
# clang package
packageEntries clang \
$binDir/c-index-test \
$binDir/clang* \
$binDir/git-clang-format \
$binDir/modularize \
$dataDir/clang \
$includeDir/clang* \
$libDir/libclang* \
$libDir/clang \
$developLibDir/libclang*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$binDir/c++-analyzer \
$binDir/ccc-analyzer \
$dataDir/scan-build \
$dataDir/scan-view \
$manDir/man1/scan-build.1
}
TEST()
{
cd build
make $jobArgs check
}

View File

@@ -1,422 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="1"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="66c73179da42cee1386371641241f79ded250e117a79f571bbd69e56daa48948"
SOURCE_DIR="llvm-${portVersion}.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="7596a7c7d9376d0c89e60028fe1ceb4d3e535e8ea8b89e0eb094e0dcb3183d28"
SOURCE_DIR_2="cfe-${portVersion}.src"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="5b7aec46ec8e999ec683c87ad744082e1133781ee4b01905b4bdae5d20785f14"
SOURCE_DIR_3="clang-tools-extra-${portVersion}.src"
SOURCE_URI_4="http://llvm.org/releases/${portVersion}/compiler-rt-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_4="e0e5224fcd5740b61e416c549dd3dcda92f10c524216c1edb5e979e42078a59a"
SOURCE_DIR_4="compiler-rt-${portVersion}.src"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:find_all_symbols
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_c_test
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_dwp
cmd:llvm_extract
cmd:llvm_lib
cmd:llvm_link
cmd:llvm_lto
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_pdbdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_split
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:obj2yaml
cmd:opt
cmd:sancov
cmd:sanstats
cmd:verify_uselistorder
cmd:yaml2obj
devel:libfindAllSymbols$secondaryArchSuffix
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUDisassembler$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCoverage$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfoCodeView$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMGlobalISel$secondaryArchSuffix
devel:libLLVMHexagonAsmParser$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMObjectYAML$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSymbolize$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:clang_3.9 = $portVersion
cmd:clang_apply_replacements = $portVersion
cmd:clang_check = $portVersion
cmd:clang_cl = $portVersion
cmd:clang_format = $portVersion
cmd:clang_include_fixer = $portVersion
cmd:clang_modernize = $portVersion
cmd:clang_query = $portVersion
cmd:clang_rename = $portVersion
cmd:clang_tblgen = $portVersion
cmd:clang_tidy = $portVersion
cmd:git_clang_format = $portVersion
cmd:modularize = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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:libclangincludefixer$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:libclangtidyboostmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyplugin$secondaryArchSuffix = $portVersion
devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
devel:libclangtooling$secondaryArchSuffix = $portVersion
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
lib:libclang$secondaryArchSuffix = $portVersion
"
REQUIRES_clang="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang_analysis="
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
cmd:c++_analyzer = $portVersion
cmd:ccc_analyzer = $portVersion
cmd:scan_build = $portVersion
cmd:scan_view = $portVersion
"
REQUIRES_clang_analysis="
llvm${secondaryArchSuffix}_clang == $portVersion base
cmd:python
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Add clang tools
mkdir -p tools/clang
cp -rd $sourceDir2/* tools/clang/
# Add clang tools's tool's (really llvm?)
mkdir -p tools/clang/tools/extra
cp -rd $sourceDir3/* tools/clang/tools/extra
mkdir -p projects/compiler-rt
cp -rd $sourceDir4/* projects/compiler-rt
local cmakeFlags
if [ -n "$secondaryArchSuffix" ]; then
cmakeFlags=-DHAIKU_HYBRID_SECONDARY="\"${effectiveTargetArchitecture}\""
fi
mkdir -p build; cd build
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES $cmakeFlags \
-DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_THREADS=NO \
..
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
cd build
mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C projects/compiler-rt install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
if [ -n $secondaryArchSuffix ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
binDir=$prefix/bin
fi
# 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 \
libfindAllSymbols \
libLLVM* \
libLTO \
libclang*
mv $prefix/include/* $includeDir/
mv $prefix/libexec/* $binDir/
mv $prefix/share/man/* $manDir/
mv $prefix/share/clang $dataDir/
mv $prefix/share/scan-build $dataDir/
mv $prefix/share/scan-view $dataDir/
rmdir $prefix/include $prefix/libexec $prefix/share/man $prefix/share
sed -i 's|/libexec/|/bin/|' $binDir/scan-build
sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view
# clang package
packageEntries clang \
$binDir/c-index-test \
$binDir/clang* \
$binDir/git-clang-format \
$binDir/modularize \
$dataDir/clang \
$includeDir/clang* \
$libDir/libclang* \
$libDir/clang \
$developLibDir/libclang*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$binDir/c++-analyzer \
$binDir/ccc-analyzer \
$dataDir/scan-build \
$dataDir/scan-view \
$manDir/man1/scan-build.1
}
TEST()
{
cd build
make $jobArgs check
}

View File

@@ -1,422 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="http://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="2"
SOURCE_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee"
SOURCE_DIR="llvm-${portVersion}.src"
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="e6c4cebb96dee827fa0470af313dff265af391cb6da8d429842ef208c8f25e63"
SOURCE_DIR_2="cfe-${portVersion}.src"
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="29a5b65bdeff7767782d4427c7c64d54c3a8684bc6b217b74a70e575e4813635"
SOURCE_DIR_3="clang-tools-extra-${portVersion}.src"
SOURCE_URI_4="http://llvm.org/releases/${portVersion}/compiler-rt-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_4="d30967b1a5fa51a2503474aacc913e69fd05ae862d37bf310088955bdb13ec99"
SOURCE_DIR_4="compiler-rt-${portVersion}.src"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:FileCheck
cmd:find_all_symbols
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_c_test
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_dwp
cmd:llvm_extract
cmd:llvm_lib
cmd:llvm_link
cmd:llvm_lto
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_pdbdump
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_split
cmd:llvm_stress
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:macho_dump
cmd:not
cmd:obj2yaml
cmd:opt
cmd:sancov
cmd:sanstats
cmd:verify_uselistorder
cmd:yaml2obj
devel:libfindAllSymbols$secondaryArchSuffix
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUDisassembler$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCoverage$secondaryArchSuffix
devel:libLLVMCppBackendCodeGen$secondaryArchSuffix
devel:libLLVMCppBackendInfo$secondaryArchSuffix
devel:libLLVMDebugInfoCodeView$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMGlobalISel$secondaryArchSuffix
devel:libLLVMHexagonAsmParser$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMObjectYAML$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSymbolize$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:clang_3.9 = $portVersion
cmd:clang_apply_replacements = $portVersion
cmd:clang_check = $portVersion
cmd:clang_cl = $portVersion
cmd:clang_format = $portVersion
cmd:clang_include_fixer = $portVersion
cmd:clang_modernize = $portVersion
cmd:clang_query = $portVersion
cmd:clang_rename = $portVersion
cmd:clang_tblgen = $portVersion
cmd:clang_tidy = $portVersion
cmd:git_clang_format = $portVersion
cmd:modularize = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$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:libclangincludefixer$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:libclangtidyboostmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyplugin$secondaryArchSuffix = $portVersion
devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
devel:libclangtooling$secondaryArchSuffix = $portVersion
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
lib:libclang$secondaryArchSuffix = $portVersion
"
REQUIRES_clang="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang_analysis="
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
cmd:c++_analyzer = $portVersion
cmd:ccc_analyzer = $portVersion
cmd:scan_build = $portVersion
cmd:scan_view = $portVersion
"
REQUIRES_clang_analysis="
llvm${secondaryArchSuffix}_clang == $portVersion base
cmd:python
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Add clang tools
mkdir -p tools/clang
cp -rd $sourceDir2/* tools/clang/
# Add clang tools's tool's (really llvm?)
mkdir -p tools/clang/tools/extra
cp -rd $sourceDir3/* tools/clang/tools/extra
mkdir -p projects/compiler-rt
cp -rd $sourceDir4/* projects/compiler-rt
local cmakeFlags
if [ -n "$secondaryArchSuffix" ]; then
cmakeFlags=-DHAIKU_HYBRID_SECONDARY="\"${effectiveTargetArchitecture}\""
fi
mkdir -p build; cd build
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES $cmakeFlags \
-DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_THREADS=NO \
..
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
cd build
mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C projects/compiler-rt install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
if [ -n $secondaryArchSuffix ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
binDir=$prefix/bin
fi
# 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 \
libfindAllSymbols \
libLLVM* \
libLTO \
libclang*
mv $prefix/include/* $includeDir/
mv $prefix/libexec/* $binDir/
mv $prefix/share/man/* $manDir/
mv $prefix/share/clang $dataDir/
mv $prefix/share/scan-build $dataDir/
mv $prefix/share/scan-view $dataDir/
rmdir $prefix/include $prefix/libexec $prefix/share/man $prefix/share
sed -i 's|/libexec/|/bin/|' $binDir/scan-build
sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view
# clang package
packageEntries clang \
$binDir/c-index-test \
$binDir/clang* \
$binDir/git-clang-format \
$binDir/modularize \
$dataDir/clang \
$includeDir/clang* \
$libDir/libclang* \
$libDir/clang \
$developLibDir/libclang*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$binDir/c++-analyzer \
$binDir/ccc-analyzer \
$dataDir/scan-build \
$dataDir/scan-view \
$manDir/man1/scan-build.1
}
TEST()
{
cd build
make $jobArgs check
}

View File

@@ -1,472 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="https://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="3"
SOURCE_URI="https://releases.llvm.org/${portVersion}/llvm-${portVersion}.src.tar.xz"
CHECKSUM_SHA256="da783db1f82d516791179fe103c71706046561f7972b18f0049242dee6712b51"
SOURCE_DIR="llvm-${portVersion}.src"
SOURCE_URI_2="https://releases.llvm.org/${portVersion}/cfe-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_2="61738a735852c23c3bdbe52d035488cdb2083013f384d67c1ba36fabebd8769b"
SOURCE_DIR_2="cfe-${portVersion}.src"
SOURCE_URI_3="https://releases.llvm.org/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_3="35d1e64efc108076acbe7392566a52c35df9ec19778eb9eb12245fc7d8b915b6"
SOURCE_DIR_3="clang-tools-extra-${portVersion}.src"
SOURCE_URI_4="https://releases.llvm.org/${portVersion}/compiler-rt-${portVersion}.src.tar.xz"
CHECKSUM_SHA256_4="a3c87794334887b93b7a766c507244a7cdcce1d48b2e9249fc9a94f2c3beb440"
SOURCE_DIR_4="compiler-rt-${portVersion}.src"
PATCHES="llvm-${portVersion}.patchset"
PATCHES_2="clang-${portVersion}.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:count
cmd:filecheck
cmd:find_all_symbols
cmd:llc
cmd:lli
cmd:lli_child_target
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_c_test
cmd:llvm_cat
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cxxdump
cmd:llvm_cxxfilt
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_dwp
cmd:llvm_extract
cmd:llvm_lib
cmd:llvm_link
cmd:llvm_lto
cmd:llvm_lto2
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_modextract
cmd:llvm_nm
cmd:llvm_objdump
cmd:llvm_opt_report
cmd:llvm_pdbdump
cmd:llvm_perfectshuffle
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_split
cmd:llvm_stress
cmd:llvm_strings
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:llvm_xray
cmd:not
cmd:obj2yaml
cmd:opt
cmd:sancov
cmd:sanstats
cmd:verify_uselistorder
cmd:yaml2obj
cmd:yaml_bench
devel:libfindAllSymbols$secondaryArchSuffix
devel:libLLVM$secondaryArchSuffix
devel:libLLVM_$portVersion$secondaryArchSuffix
devel:libLLVM_4.0$secondaryArchSuffix
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUDisassembler$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFDisassembler$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCoroutines$secondaryArchSuffix
devel:libLLVMCoverage$secondaryArchSuffix
devel:libLLVMDebugInfoCodeView$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoMSF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMDemangle$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMGlobalISel$secondaryArchSuffix
devel:libLLVMHexagonAsmParser$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLanaiAsmParser$secondaryArchSuffix
devel:libLLVMLanaiCodeGen$secondaryArchSuffix
devel:libLLVMLanaiDesc$secondaryArchSuffix
devel:libLLVMLanaiDisassembler$secondaryArchSuffix
devel:libLLVMLanaiInfo$secondaryArchSuffix
devel:libLLVMLanaiInstPrinter$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMObjectYAML$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRISCVCodeGen$secondaryArchSuffix
devel:libLLVMRISCVDesc$secondaryArchSuffix
devel:libLLVMRISCVInfo$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSymbolize$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLLVMXRay$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libLLVM_4.0$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:clang_4.0 = $portVersion
cmd:clang_apply_replacements = $portVersion
cmd:clang_change_namespace = $portVersion
cmd:clang_check = $portVersion
cmd:clang_cl = $portVersion
cmd:clang_cpp = $portVersion
cmd:clang_format = $portVersion
cmd:clang_import_test = $portVersion
cmd:clang_include_fixer = $portVersion
cmd:clang_offload_bundler = $portVersion
cmd:clang_query = $portVersion
cmd:clang_rename = $portVersion
cmd:clang_reorder_fields = $portVersion
cmd:clang_tidy = $portVersion
cmd:git_clang_format = $portVersion
cmd:modularize = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$secondaryArchSuffix = $portVersion
devel:libclangbasic$secondaryArchSuffix = $portVersion
devel:libclangchangenamespace$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:libclangincludefixer$secondaryArchSuffix = $portVersion
devel:libclangincludefixerplugin$secondaryArchSuffix = $portVersion
devel:libclangindex$secondaryArchSuffix = $portVersion
devel:libclanglex$secondaryArchSuffix = $portVersion
devel:libclangmove$secondaryArchSuffix = $portVersion
devel:libclangparse$secondaryArchSuffix = $portVersion
devel:libclangquery$secondaryArchSuffix = $portVersion
devel:libclangrename$secondaryArchSuffix = $portVersion
devel:libclangreorderfields$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:libclangtidyboostmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion
devel:libclangtidympimodule$secondaryArchSuffix = $portVersion
devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyplugin$secondaryArchSuffix = $portVersion
devel:libclangtidyreadability$secondaryArchSuffix = $portVersion
devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
devel:libclangtooling$secondaryArchSuffix = $portVersion
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
lib:libclang$secondaryArchSuffix = $portVersion
"
REQUIRES_clang="
haiku$secondaryArchSuffix
lib:libLLVM_4.0$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang_analysis="
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
cmd:c++_analyzer = $portVersion
cmd:ccc_analyzer = $portVersion
cmd:scan_build = $portVersion
cmd:scan_view = $portVersion
"
REQUIRES_clang_analysis="
llvm${secondaryArchSuffix}_clang == $portVersion base
cmd:python
"
PROVIDES_libs="
llvm${secondaryArchSuffix}_libs = $portVersion
lib:libLLVM_4.0$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
"
REQUIRES_libs="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Add clang tools
mkdir -p tools/clang
cp -rd $sourceDir2/* tools/clang/
# Add clang tools's tool's (really llvm?)
mkdir -p tools/clang/tools/extra
cp -rd $sourceDir3/* tools/clang/tools/extra
mkdir -p projects/compiler-rt
cp -rd $sourceDir4/* projects/compiler-rt
local cmakeFlags
if [ -n "$secondaryArchSuffix" ]; then
cmakeFlags=-DHAIKU_HYBRID_SECONDARY="\"${effectiveTargetArchitecture}\""
fi
mkdir -p build; cd build
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES $cmakeFlags -DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_RTTI=ON -DLLVM_LINK_LLVM_DYLIB=YES \
..
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
cd build
mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C projects/compiler-rt install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
if [ -n $secondaryArchSuffix ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
binDir=$prefix/bin
fi
# 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 \
libfindAllSymbols \
libLLVM* \
libLTO \
libclang*
mv $prefix/include/* $includeDir/
mv $prefix/libexec/* $binDir/
mv $prefix/share/man/* $manDir/
mv $prefix/share/clang $dataDir/
mv $prefix/share/scan-build $dataDir/
mv $prefix/share/scan-view $dataDir/
rmdir $prefix/include $prefix/libexec $prefix/share/man $prefix/share
sed -i 's|/libexec/|/bin/|' $binDir/scan-build
sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view
# clang package
packageEntries clang \
$binDir/c-index-test \
$binDir/clang* \
$binDir/git-clang-format \
$binDir/modularize \
$dataDir/clang \
$includeDir/clang* \
$libDir/libclang* \
$libDir/clang \
$libDir/cmake/clang \
$developLibDir/libclang*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$binDir/c++-analyzer \
$binDir/ccc-analyzer \
$dataDir/scan-build \
$dataDir/scan-view \
$manDir/man1/scan-build.1
# libs package
packageEntries libs \
$libDir/libLLVM* \
$libDir/libLTO*
}
TEST()
{
cd build
make $jobArgs check
make $jobArgs check-clang
}

View File

@@ -1,497 +0,0 @@
SUMMARY="Modular and reuseable compiler and toolchain technologies"
DESCRIPTION="LLVM is a collection of modular and reuseable compiler and and \
toolchain technologies.The LLVM compiler system for C and C++ includes the \
following:
- Front-ends for C, C++, Objective-C, Fortran, etc. based on the GCC 4.2 \
parsers. They support the ANSI-standard C and C++ languages to the same \
degree that GCC supports them. Additionally, many GCC extensions are \
supported.
- A stable implementation of the LLVM instruction set, which serves as both \
the online and offline code representation, together with assembly (ASCII) \
and bytecode (binary) readers and writers, and a verifier.
- A powerful pass-management system that automatically sequences passes \
(including analysis, transformation, and code-generation passes) based on \
their dependences, and pipelines them for efficiency.
- A wide range of global scalar optimizations.
- A link-time interprocedural optimization framework with a rich set of \
analyses and transformations, including sophisticated whole-program pointer \
analysis, call graph construction, and support for profile-guided optimizations.
- An easily retargettable code generator, which currently supports X86, \
X86-64, PowerPC, PowerPC-64, ARM, Thumb, SPARC, Alpha, CellSPU, MIPS, MSP430, \
SystemZ, and XCore.
- A Just-In-Time (JIT) code generation system, which currently supports X86, \
X86-64, ARM, AArch64, Mips, SystemZ, PowerPC, and PowerPC-64.
- Support for generating DWARF debugging information.
- A C back-end useful for testing and for generating native code on targets \
other than the ones listed above.
- A profiling system similar to gprof.
- A test framework with a number of benchmark codes and applications.
- APIs and debugging tools to simplify rapid development of LLVM components."
HOMEPAGE="https://www.llvm.org/"
COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign"
LICENSE="UIUC"
REVISION="1"
srcGitRev="343595467c91e2db33e7e157adc87b2e53ddbe1a"
SOURCE_URI="https://github.com/llvm-mirror/llvm/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="74a9b0a4dfd65082acb134ef865ee82f4e77dfbd33bb14458253a7937232ed7e"
SOURCE_FILENAME="llvm-${srcGitRev}.tar.gz"
SOURCE_DIR="llvm-$srcGitRev"
srcGitRev_2="ad56fa864310d75036da71597ca7381aada68c09"
SOURCE_URI_2="https://github.com/llvm-mirror/clang/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="fac6ac3e82a5b34a483d37c9aca82e514c58cebcf5b0520160de6efd5a53e351"
SOURCE_FILENAME_2="clang-${srcGitRev_2}.tar.gz"
SOURCE_DIR_2="clang-$srcGitRev_2"
srcGitRev_3="b294d892d607ba534dc900a5e165c72ce1070fe3"
SOURCE_URI_3="https://github.com/llvm-mirror/clang-tools-extra/archive/$srcGitRev_3.tar.gz"
CHECKSUM_SHA256_3="a937b55593e920bd5e46d9ad42ba1404e2d3ea7c40a49830604ae703b41796e6"
SOURCE_FILENAME_3="clang-tools-extra-${srcGitRev_3}.tar.gz"
SOURCE_DIR_3="clang-tools-extra-$srcGitRev_3"
srcGitRev_4="e7f4e4a3486317ee6287dc272427e0ae009f5362"
SOURCE_URI_4="https://github.com/llvm-mirror/compiler-rt/archive/$srcGitRev_4.tar.gz"
CHECKSUM_SHA256_4="22b1e58b1cba4116a48a05f8019bc7d697956517665a4ba36ce27469a379cbe5"
SOURCE_FILENAME_4="compiler-rt-${srcGitRev_4}.tar.gz"
SOURCE_DIR_4="compiler-rt-$srcGitRev_4"
PATCHES="llvm-$portVersion.patchset"
PATCHES_2="clang-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="!x86"
PROVIDES="
llvm$secondaryArchSuffix = $portVersion
cmd:bugpoint
cmd:find_all_symbols
cmd:llc
cmd:lli
cmd:llvm_ar
cmd:llvm_as
cmd:llvm_bcanalyzer
cmd:llvm_c_test
cmd:llvm_cat
cmd:llvm_config
cmd:llvm_cov
cmd:llvm_cvtres
cmd:llvm_cxxdump
cmd:llvm_cxxfilt
cmd:llvm_diff
cmd:llvm_dis
cmd:llvm_dlltool
cmd:llvm_dsymutil
cmd:llvm_dwarfdump
cmd:llvm_dwp
cmd:llvm_extract
cmd:llvm_lib
cmd:llvm_link
cmd:llvm_lto
cmd:llvm_lto2
cmd:llvm_mc
cmd:llvm_mcmarkup
cmd:llvm_modextract
cmd:llvm_mt
cmd:llvm_nm
cmd:llvm_objcopy
cmd:llvm_objdump
cmd:llvm_opt_report
cmd:llvm_pdbdump
cmd:llvm_pdbutil
cmd:llvm_profdata
cmd:llvm_ranlib
cmd:llvm_rc
cmd:llvm_readelf
cmd:llvm_readobj
cmd:llvm_rtdyld
cmd:llvm_size
cmd:llvm_split
cmd:llvm_stress
cmd:llvm_strings
cmd:llvm_symbolizer
cmd:llvm_tblgen
cmd:llvm_xray
cmd:obj2yaml
cmd:opt
cmd:sancov
cmd:sanstats
cmd:verify_uselistorder
cmd:yaml2obj
devel:libfindAllSymbols$secondaryArchSuffix
devel:libLLVM$secondaryArchSuffix
devel:libLLVM_6.0.0svn$secondaryArchSuffix
devel:libLLVM_6.0svn$secondaryArchSuffix
devel:libLLVMAArch64AsmParser$secondaryArchSuffix
devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix
devel:libLLVMAArch64CodeGen$secondaryArchSuffix
devel:libLLVMAArch64Desc$secondaryArchSuffix
devel:libLLVMAArch64Disassembler$secondaryArchSuffix
devel:libLLVMAArch64Info$secondaryArchSuffix
devel:libLLVMAArch64Utils$secondaryArchSuffix
devel:libLLVMAMDGPUAsmParser$secondaryArchSuffix
devel:libLLVMAMDGPUAsmPrinter$secondaryArchSuffix
devel:libLLVMAMDGPUCodeGen$secondaryArchSuffix
devel:libLLVMAMDGPUDesc$secondaryArchSuffix
devel:libLLVMAMDGPUDisassembler$secondaryArchSuffix
devel:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMARMUtils$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBinaryFormat$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$secondaryArchSuffix
devel:libLLVMBPFAsmParser$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFDisassembler$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMCodeGen$secondaryArchSuffix
devel:libLLVMCore$secondaryArchSuffix
devel:libLLVMCoroutines$secondaryArchSuffix
devel:libLLVMCoverage$secondaryArchSuffix
devel:libLLVMDebugInfoCodeView$secondaryArchSuffix
devel:libLLVMDebugInfoDWARF$secondaryArchSuffix
devel:libLLVMDebugInfoMSF$secondaryArchSuffix
devel:libLLVMDebugInfoPDB$secondaryArchSuffix
devel:libLLVMDemangle$secondaryArchSuffix
devel:libLLVMDlltoolDriver$secondaryArchSuffix
devel:libLLVMExecutionEngine$secondaryArchSuffix
devel:libLLVMFuzzMutate$secondaryArchSuffix
devel:libLLVMGlobalISel$secondaryArchSuffix
devel:libLLVMHexagonAsmParser$secondaryArchSuffix
devel:libLLVMHexagonCodeGen$secondaryArchSuffix
devel:libLLVMHexagonDesc$secondaryArchSuffix
devel:libLLVMHexagonDisassembler$secondaryArchSuffix
devel:libLLVMHexagonInfo$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMLanaiAsmParser$secondaryArchSuffix
devel:libLLVMLanaiAsmPrinter$secondaryArchSuffix
devel:libLLVMLanaiCodeGen$secondaryArchSuffix
devel:libLLVMLanaiDesc$secondaryArchSuffix
devel:libLLVMLanaiDisassembler$secondaryArchSuffix
devel:libLLVMLanaiInfo$secondaryArchSuffix
devel:libLLVMLanaiInstPrinter$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMNVPTXAsmPrinter$secondaryArchSuffix
devel:libLLVMNVPTXCodeGen$secondaryArchSuffix
devel:libLLVMNVPTXDesc$secondaryArchSuffix
devel:libLLVMNVPTXInfo$secondaryArchSuffix
devel:libLLVMObjCARCOpts$secondaryArchSuffix
devel:libLLVMObject$secondaryArchSuffix
devel:libLLVMObjectYAML$secondaryArchSuffix
devel:libLLVMOption$secondaryArchSuffix
devel:libLLVMOrcJIT$secondaryArchSuffix
devel:libLLVMPasses$secondaryArchSuffix
devel:libLLVMPowerPCAsmParser$secondaryArchSuffix
devel:libLLVMPowerPCAsmPrinter$secondaryArchSuffix
devel:libLLVMPowerPCCodeGen$secondaryArchSuffix
devel:libLLVMPowerPCDesc$secondaryArchSuffix
devel:libLLVMPowerPCDisassembler$secondaryArchSuffix
devel:libLLVMPowerPCInfo$secondaryArchSuffix
devel:libLLVMProfileData$secondaryArchSuffix
devel:libLLVMRISCVCodeGen$secondaryArchSuffix
devel:libLLVMRISCVDesc$secondaryArchSuffix
devel:libLLVMRISCVInfo$secondaryArchSuffix
devel:libLLVMRuntimeDyld$secondaryArchSuffix
devel:libLLVMScalarOpts$secondaryArchSuffix
devel:libLLVMSelectionDAG$secondaryArchSuffix
devel:libLLVMSparcAsmParser$secondaryArchSuffix
devel:libLLVMSparcAsmPrinter$secondaryArchSuffix
devel:libLLVMSparcCodeGen$secondaryArchSuffix
devel:libLLVMSparcDesc$secondaryArchSuffix
devel:libLLVMSparcDisassembler$secondaryArchSuffix
devel:libLLVMSparcInfo$secondaryArchSuffix
devel:libLLVMSupport$secondaryArchSuffix
devel:libLLVMSymbolize$secondaryArchSuffix
devel:libLLVMSystemZAsmParser$secondaryArchSuffix
devel:libLLVMSystemZAsmPrinter$secondaryArchSuffix
devel:libLLVMSystemZCodeGen$secondaryArchSuffix
devel:libLLVMSystemZDesc$secondaryArchSuffix
devel:libLLVMSystemZDisassembler$secondaryArchSuffix
devel:libLLVMSystemZInfo$secondaryArchSuffix
devel:libLLVMTableGen$secondaryArchSuffix
devel:libLLVMTarget$secondaryArchSuffix
devel:libLLVMTransformUtils$secondaryArchSuffix
devel:libLLVMVectorize$secondaryArchSuffix
devel:libLLVMWindowsManifest$secondaryArchSuffix
devel:libLLVMX86AsmParser$secondaryArchSuffix
devel:libLLVMX86AsmPrinter$secondaryArchSuffix
devel:libLLVMX86CodeGen$secondaryArchSuffix
devel:libLLVMX86Desc$secondaryArchSuffix
devel:libLLVMX86Disassembler$secondaryArchSuffix
devel:libLLVMX86Info$secondaryArchSuffix
devel:libLLVMX86Utils$secondaryArchSuffix
devel:libLLVMXCoreAsmPrinter$secondaryArchSuffix
devel:libLLVMXCoreCodeGen$secondaryArchSuffix
devel:libLLVMXCoreDesc$secondaryArchSuffix
devel:libLLVMXCoreDisassembler$secondaryArchSuffix
devel:libLLVMXCoreInfo$secondaryArchSuffix
devel:libLLVMXRay$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
lib:BugpointPasses$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libLLVM_6.0svn$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang="
llvm${secondaryArchSuffix}_clang = $portVersion
cmd:c_index_test = $portVersion
cmd:clang = $portVersion
cmd:clang++ = $portVersion
cmd:clang_6.0 = $portVersion
cmd:clang_apply_replacements = $portVersion
cmd:clang_change_namespace = $portVersion
cmd:clang_check = $portVersion
cmd:clang_cl = $portVersion
cmd:clang_cpp = $portVersion
cmd:clang_format = $portVersion
cmd:clang_import_test = $portVersion
cmd:clang_include_fixer = $portVersion
cmd:clang_offload_bundler = $portVersion
cmd:clang_query = $portVersion
cmd:clang_refactor = $portVersion
cmd:clang_rename = $portVersion
cmd:clang_reorder_fields = $portVersion
cmd:clang_tidy = $portVersion
cmd:clangd = $portVersion
cmd:git_clang_format = $portVersion
cmd:modularize = $portVersion
devel:libclang$secondaryArchSuffix = $portVersion
devel:libclanganalysis$secondaryArchSuffix = $portVersion
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
devel:libclangast$secondaryArchSuffix = $portVersion
devel:libclangastmatchers$secondaryArchSuffix = $portVersion
devel:libclangbasic$secondaryArchSuffix = $portVersion
devel:libclangchangenamespace$secondaryArchSuffix = $portVersion
devel:libclangcodegen$secondaryArchSuffix = $portVersion
devel:libclangdaemon$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:libclangincludefixer$secondaryArchSuffix = $portVersion
devel:libclangincludefixerplugin$secondaryArchSuffix = $portVersion
devel:libclangindex$secondaryArchSuffix = $portVersion
devel:libclanglex$secondaryArchSuffix = $portVersion
devel:libclangmove$secondaryArchSuffix = $portVersion
devel:libclangparse$secondaryArchSuffix = $portVersion
devel:libclangquery$secondaryArchSuffix = $portVersion
devel:libclangrename$secondaryArchSuffix = $portVersion
devel:libclangreorderfields$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:libclangtidyandroidmodule$secondaryArchSuffix = $portVersion
devel:libclangtidyboostmodule$secondaryArchSuffix = $portVersion
devel:libclangtidybugpronemodule$secondaryArchSuffix = $portVersion
devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion
devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion
devel:libclangtidygooglemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyhicppmodule$secondaryArchSuffix = $portVersion
devel:libclangtidyllvmmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymiscmodule$secondaryArchSuffix = $portVersion
devel:libclangtidymodernizemodule$secondaryArchSuffix = $portVersion
devel:libclangtidympimodule$secondaryArchSuffix = $portVersion
devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion
devel:libclangtidyplugin$secondaryArchSuffix = $portVersion
devel:libclangtidyreadability$secondaryArchSuffix = $portVersion
devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion
devel:libclangtidyutils$secondaryArchSuffix = $portVersion
devel:libclangtooling$secondaryArchSuffix = $portVersion
devel:libclangtoolingastdiff$secondaryArchSuffix = $portVersion
devel:libclangtoolingcore$secondaryArchSuffix = $portVersion
devel:libclangtoolingrefactor$secondaryArchSuffix = $portVersion
lib:libclang$secondaryArchSuffix = $portVersion
"
REQUIRES_clang="
haiku$secondaryArchSuffix
lib:libLLVM_6.0svn$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_clang_analysis="
llvm${secondaryArchSuffix}_clang_analysis = $portVersion
cmd:c++_analyzer = $portVersion
cmd:ccc_analyzer = $portVersion
cmd:scan_build = $portVersion
cmd:scan_view = $portVersion
"
REQUIRES_clang_analysis="
llvm${secondaryArchSuffix}_clang == $portVersion base
cmd:python
"
PROVIDES_libs="
llvm${secondaryArchSuffix}_libs = $portVersion
lib:libLLVM_6.0svn$secondaryArchSuffix
lib:libLTO$secondaryArchSuffix
"
REQUIRES_libs="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:diff
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:groff
cmd:ld$secondaryArchSuffix
cmd:make
cmd:python
cmd:sed
"
BUILD()
{
# Add clang tools
mkdir -p tools/clang
cp -rd $sourceDir2/* tools/clang/
# Add clang tools's tool's (really llvm?)
mkdir -p tools/clang/tools/extra
cp -rd $sourceDir3/* tools/clang/tools/extra
mkdir -p projects/compiler-rt
cp -rd $sourceDir4/* projects/compiler-rt
local cmakeFlags
if [ -n "$secondaryArchSuffix" ]; then
cmakeFlags=-DHAIKU_HYBRID_SECONDARY="\"${effectiveTargetArchitecture}\""
fi
mkdir -p build; cd build
# Haiku C++ requires rtti in a lot of central system components
# such as Mesa
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_SKIP_RPATH=YES $cmakeFlags \
-DLLVM_ENABLE_RTTI=ON -DLLVM_LINK_LLVM_DYLIB=YES \
..
make $jobArgs PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
}
INSTALL()
{
cd build
mkdir -p $binDir $developDir $dataDir $docDir $includeDir $manDir
make install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C tools/clang install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
make -C projects/compiler-rt install PROJ_datadir=$dataDir PROJ_docsdir=$docDir \
PROJ_mandir=$manDir PROJ_includedir=$includeDir PROJ_libdir=$libDir
if [ -n $secondaryArchSuffix ]; then
mv $prefix/lib $prefix/lib2
mkdir -p $libDir
mv $prefix/lib2/* $libDir/
rmdir $prefix/lib2
binDir=$prefix/bin
fi
# 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 \
libfindAllSymbols \
libLLVM* \
libLTO \
libclang*
mv $prefix/include/* $includeDir/
mv $prefix/libexec/* $binDir/
mv $prefix/share/man/* $manDir/
mv $prefix/share/clang $dataDir/
mv $prefix/share/opt-viewer $dataDir/
mv $prefix/share/scan-build $dataDir/
mv $prefix/share/scan-view $dataDir/
rmdir $prefix/include $prefix/libexec $prefix/share/man $prefix/share
sed -i 's|/libexec/|/bin/|' $binDir/scan-build
sed -i 's|/share/|/data/|' $binDir/scan-build $binDir/scan-view
# clang package
packageEntries clang \
$binDir/c-index-test \
$binDir/clang* \
$binDir/git-clang-format \
$binDir/modularize \
$dataDir/clang \
$includeDir/clang* \
$libDir/libclang* \
$libDir/clang \
$libDir/cmake/clang \
$developLibDir/libclang*
# analysis package
packageEntries clang_analysis \
$binDir/scan-build \
$binDir/scan-view \
$binDir/c++-analyzer \
$binDir/ccc-analyzer \
$dataDir/scan-build \
$dataDir/scan-view \
$manDir/man1/scan-build.1
# libs package
packageEntries libs \
$libDir/libLLVM* \
$libDir/libLTO*
}
TEST()
{
cd build
make $jobArgs check
make $jobArgs check-clang
}

View File

@@ -1,302 +0,0 @@
From 5cee69285df1bff7c1a8911e2a866457af414f50 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.5.1.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp
index d2edc94..f91346b 100644
--- a/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp
+++ b/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp
@@ -271,38 +271,41 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
llvm_unreachable("Include management is handled in the driver.");
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 899e1eb7ee73e55e68c4d139c73e7ddc3859d1c5 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.5.1.src/tools/libclang/Makefile b/cfe-3.5.1.src/tools/libclang/Makefile
index db3d4f8..149f245 100644
--- a/cfe-3.5.1.src/tools/libclang/Makefile
+++ b/cfe-3.5.1.src/tools/libclang/Makefile
@@ -33,7 +33,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 feedddcc5561774a081fecde1feb292a5a410982 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.5.1.src/lib/Driver/Driver.cpp b/cfe-3.5.1.src/lib/Driver/Driver.cpp
index ef26bfa..ca1f4c4 100644
--- a/cfe-3.5.1.src/lib/Driver/Driver.cpp
+++ b/cfe-3.5.1.src/lib/Driver/Driver.cpp
@@ -1982,6 +1982,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.5.1.src/lib/Driver/ToolChains.cpp b/cfe-3.5.1.src/lib/Driver/ToolChains.cpp
index b46f69d..0701013 100644
--- a/cfe-3.5.1.src/lib/Driver/ToolChains.cpp
+++ b/cfe-3.5.1.src/lib/Driver/ToolChains.cpp
@@ -2429,6 +2429,34 @@ bool TCEToolChain::isPICDefaultForced() const {
return false;
}
+/// 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, const ArgList &Args)
diff --git a/cfe-3.5.1.src/lib/Driver/ToolChains.h b/cfe-3.5.1.src/lib/Driver/ToolChains.h
index b5df866..add465d 100644
--- a/cfe-3.5.1.src/lib/Driver/ToolChains.h
+++ b/cfe-3.5.1.src/lib/Driver/ToolChains.h
@@ -528,6 +528,17 @@ protected:
};
+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:
diff --git a/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp
index f91346b..f778752 100644
--- a/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp
+++ b/cfe-3.5.1.src/lib/Frontend/InitHeaderSearch.cpp
@@ -299,8 +299,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 b04cceb968495b02dd32d305fca9769f22c02bc3 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.5.1.src/lib/Basic/Targets.cpp b/cfe-3.5.1.src/lib/Basic/Targets.cpp
index 075f905..09a4776 100644
--- a/cfe-3.5.1.src/lib/Basic/Targets.cpp
+++ b/cfe-3.5.1.src/lib/Basic/Targets.cpp
@@ -320,6 +320,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> {
@@ -3210,27 +3234,6 @@ public:
};
} // end anonymous namespace
-namespace {
-// 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__");
- }
-};
-} // end anonymous namespace
-
// RTEMS Target
template<typename Target>
class RTEMSTargetInfo : public OSTargetInfo<Target> {
@@ -6321,7 +6324,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:
@@ -6363,6 +6366,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);
default:
--
2.2.2

View File

@@ -1,302 +0,0 @@
From ec3c2cfd7b95a3c7c7904abafebab5c7f56a83e9 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.5.2.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp
index d2edc94..f91346b 100644
--- a/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp
+++ b/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp
@@ -271,38 +271,41 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
llvm_unreachable("Include management is handled in the driver.");
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 c504a37e10d3a064845342335c6330b638274031 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.5.2.src/tools/libclang/Makefile b/cfe-3.5.2.src/tools/libclang/Makefile
index db3d4f8..149f245 100644
--- a/cfe-3.5.2.src/tools/libclang/Makefile
+++ b/cfe-3.5.2.src/tools/libclang/Makefile
@@ -33,7 +33,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 321f0a6f34747b5fb2ac588242ddcf5539163cc1 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.5.2.src/lib/Driver/Driver.cpp b/cfe-3.5.2.src/lib/Driver/Driver.cpp
index ef26bfa..ca1f4c4 100644
--- a/cfe-3.5.2.src/lib/Driver/Driver.cpp
+++ b/cfe-3.5.2.src/lib/Driver/Driver.cpp
@@ -1982,6 +1982,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.5.2.src/lib/Driver/ToolChains.cpp b/cfe-3.5.2.src/lib/Driver/ToolChains.cpp
index b46f69d..0701013 100644
--- a/cfe-3.5.2.src/lib/Driver/ToolChains.cpp
+++ b/cfe-3.5.2.src/lib/Driver/ToolChains.cpp
@@ -2429,6 +2429,34 @@ bool TCEToolChain::isPICDefaultForced() const {
return false;
}
+/// 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, const ArgList &Args)
diff --git a/cfe-3.5.2.src/lib/Driver/ToolChains.h b/cfe-3.5.2.src/lib/Driver/ToolChains.h
index b5df866..add465d 100644
--- a/cfe-3.5.2.src/lib/Driver/ToolChains.h
+++ b/cfe-3.5.2.src/lib/Driver/ToolChains.h
@@ -528,6 +528,17 @@ protected:
};
+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:
diff --git a/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp
index f91346b..f778752 100644
--- a/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp
+++ b/cfe-3.5.2.src/lib/Frontend/InitHeaderSearch.cpp
@@ -299,8 +299,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 f1d18fb0afa3b4f1abb619747e4641d02c0c686d 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.5.2.src/lib/Basic/Targets.cpp b/cfe-3.5.2.src/lib/Basic/Targets.cpp
index 075f905..09a4776 100644
--- a/cfe-3.5.2.src/lib/Basic/Targets.cpp
+++ b/cfe-3.5.2.src/lib/Basic/Targets.cpp
@@ -320,6 +320,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> {
@@ -3210,27 +3234,6 @@ public:
};
} // end anonymous namespace
-namespace {
-// 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__");
- }
-};
-} // end anonymous namespace
-
// RTEMS Target
template<typename Target>
class RTEMSTargetInfo : public OSTargetInfo<Target> {
@@ -6321,7 +6324,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:
@@ -6363,6 +6366,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);
default:
--
2.2.2

View File

@@ -1,319 +0,0 @@
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

View File

@@ -1,319 +0,0 @@
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.1.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.7.1.src/lib/Frontend/InitHeaderSearch.cpp
index e3a17c9..e785bec 100644
--- a/cfe-3.7.1.src/lib/Frontend/InitHeaderSearch.cpp
+++ b/cfe-3.7.1.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.1.src/tools/libclang/Makefile b/cfe-3.7.1.src/tools/libclang/Makefile
index 84914e0..b9a6b74 100644
--- a/cfe-3.7.1.src/tools/libclang/Makefile
+++ b/cfe-3.7.1.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.1.src/lib/Driver/Driver.cpp b/cfe-3.7.1.src/lib/Driver/Driver.cpp
index 180c412..df42ca2 100644
--- a/cfe-3.7.1.src/lib/Driver/Driver.cpp
+++ b/cfe-3.7.1.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.1.src/lib/Driver/ToolChains.cpp b/cfe-3.7.1.src/lib/Driver/ToolChains.cpp
index 15e36a1..8599754 100644
--- a/cfe-3.7.1.src/lib/Driver/ToolChains.cpp
+++ b/cfe-3.7.1.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.1.src/lib/Driver/ToolChains.h b/cfe-3.7.1.src/lib/Driver/ToolChains.h
index 59eaade..4d38413 100644
--- a/cfe-3.7.1.src/lib/Driver/ToolChains.h
+++ b/cfe-3.7.1.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.1.src/lib/Frontend/InitHeaderSearch.cpp b/cfe-3.7.1.src/lib/Frontend/InitHeaderSearch.cpp
index e785bec..eda9455 100644
--- a/cfe-3.7.1.src/lib/Frontend/InitHeaderSearch.cpp
+++ b/cfe-3.7.1.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.1.src/lib/Basic/Targets.cpp b/cfe-3.7.1.src/lib/Basic/Targets.cpp
index e4db004..a638e24 100644
--- a/cfe-3.7.1.src/lib/Basic/Targets.cpp
+++ b/cfe-3.7.1.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

View File

@@ -1,293 +0,0 @@
From 65ee8527e8cf8d9b9f1868aa9933027eed73ea15 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/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 26bab0d..6066d2b 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -267,38 +267,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.7.0
From 42991b0fe8f1c57eb774b39bb0e9a8f33998a0ee 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/tools/libclang/Makefile b/tools/libclang/Makefile
index 84914e0..b9a6b74 100644
--- a/tools/libclang/Makefile
+++ b/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.7.0
From c6495beaecdc85d3d87128964bfcbe94de996ea8 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/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 1e0a48d..f31b274 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -2206,6 +2206,9 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
ToolChain *&TC = ToolChains[Target.str()];
if (!TC) {
switch (Target.getOS()) {
+ case llvm::Triple::Haiku:
+ TC = new toolchains::Haiku(*this, Target, Args);
+ break;
case llvm::Triple::CloudABI:
TC = new toolchains::CloudABI(*this, Target, Args);
break;
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 99c7b8e..5e95668 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -2971,6 +2971,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/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index f940e58..7b7125e 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -667,6 +667,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/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 6066d2b..d8f0881 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -295,8 +295,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.7.0
From dbc718a980b634d358968b0b0339876c9febd684 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/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index af8aea0..e2c2031 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -373,6 +373,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> {
@@ -3875,21 +3899,16 @@ public:
};
// x86-32 Haiku target
-class HaikuX86_32TargetInfo : public X86_32TargetInfo {
+class HaikuX86_32TargetInfo : public HaikuTargetInfo<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;
+ HaikuX86_32TargetInfo(const llvm::Triple &Triple)
+ : HaikuTargetInfo<X86_32TargetInfo>(Triple) {
}
+
void getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const override {
- X86_32TargetInfo::getTargetDefines(Opts, Builder);
+ HaikuTargetInfo<X86_32TargetInfo>::getTargetDefines(Opts, Builder);
Builder.defineMacro("__INTEL__");
- Builder.defineMacro("__HAIKU__");
}
};
@@ -7903,6 +7922,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.7.0

View File

@@ -1,416 +0,0 @@
From e0469a87db42cc56e973f0e871b932dfada77f4c 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/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 26bab0d..6066d2b 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -267,38 +267,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.7.0
From 85d89241bbcbc0cbc8a62e637a8a4fbb76568a3f 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/tools/libclang/Makefile b/tools/libclang/Makefile
index 84914e0..b9a6b74 100644
--- a/tools/libclang/Makefile
+++ b/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.7.0
From 3441f2eca85f72ab93dae5a6e645748e5578fd0f 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/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 1e0a48d..f31b274 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -2206,6 +2206,9 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
ToolChain *&TC = ToolChains[Target.str()];
if (!TC) {
switch (Target.getOS()) {
+ case llvm::Triple::Haiku:
+ TC = new toolchains::Haiku(*this, Target, Args);
+ break;
case llvm::Triple::CloudABI:
TC = new toolchains::CloudABI(*this, Target, Args);
break;
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 99c7b8e..5e95668 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -2971,6 +2971,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/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index f940e58..7b7125e 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -667,6 +667,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/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 6066d2b..d8f0881 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -295,8 +295,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.7.0
From 005da8695c9e7213a48f44d78e81ae48b8d75d4a 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/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 9c6eaff..0dca18f 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -373,6 +373,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> {
@@ -3875,21 +3899,16 @@ public:
};
// x86-32 Haiku target
-class HaikuX86_32TargetInfo : public X86_32TargetInfo {
+class HaikuX86_32TargetInfo : public HaikuTargetInfo<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;
+ HaikuX86_32TargetInfo(const llvm::Triple &Triple)
+ : HaikuTargetInfo<X86_32TargetInfo>(Triple) {
}
+
void getTargetDefines(const LangOptions &Opts,
MacroBuilder &Builder) const override {
- X86_32TargetInfo::getTargetDefines(Opts, Builder);
+ HaikuTargetInfo<X86_32TargetInfo>::getTargetDefines(Opts, Builder);
Builder.defineMacro("__INTEL__");
- Builder.defineMacro("__HAIKU__");
}
};
@@ -7909,6 +7928,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.7.0
From eb8c787ef742e36b3f9c1511b4b3a700fa73d9f4 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 ad2ac42..7d06c55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -511,6 +511,10 @@ endif()
if(CLANG_ENABLE_STATIC_ANALYZER)
add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER)
endif()
+if(DEFINED HAIKU_HYBRID_SECONDARY)
+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY})
+endif()
+
# Clang version information
set(CLANG_EXECUTABLE_VERSION
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 5e95668..00cbca7 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -2976,6 +2976,13 @@ Tool *CloudABI::buildLinker() const {
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::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
@@ -2986,6 +2993,19 @@ void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
switch (GetCXXStdlibType(DriverArgs)) {
case ToolChain::CST_Libstdcxx:
+#ifdef HAIKU_HYBRID_SECONDARY
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++");
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++/backward");
+
+ StringRef Triple = getTriple().str();
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++/" + Triple);
+#else
addSystemInclude(DriverArgs, CC1Args,
getDriver().SysRoot + "/system/develop/headers/c++");
addSystemInclude(DriverArgs, CC1Args,
@@ -2995,6 +3015,7 @@ void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
addSystemInclude(DriverArgs, CC1Args,
getDriver().SysRoot + "/system/develop/headers/c++/" +
Triple);
+#endif
break;
}
}
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index d8f0881..ddb5157 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -234,7 +234,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, HAIKU_HYBRID_SECONDARY, Clang, Ver);
+#else
SmallString<128> P = StringRef(HSOpts.ResourceDir);
+#endif
+
llvm::sys::path::append(P, "include");
AddUnmappedPath(P, ExternCSystem, false);
}
@@ -267,7 +280,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);
@@ -299,6 +317,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.7.0

View File

@@ -1,151 +0,0 @@
From f67820d19fb6cd2077149cd749c62c48b7407300 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 cfcd221..5ae28fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,6 +370,10 @@ endif()
if(CLANG_ENABLE_STATIC_ANALYZER)
add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER)
endif()
+if(DEFINED HAIKU_HYBRID_SECONDARY)
+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY})
+endif()
+
# Clang version information
set(CLANG_EXECUTABLE_VERSION
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 347aa29..8fc2b85 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -3314,6 +3314,13 @@ SanitizerMask CloudABI::getDefaultSanitizers() const {
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::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
@@ -3328,6 +3335,19 @@ void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
getDriver().SysRoot + "/system/develop/headers/c++/v1");
break;
case ToolChain::CST_Libstdcxx:
+#ifdef HAIKU_HYBRID_SECONDARY
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++");
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++/backward");
+
+ StringRef Triple = getTriple().str();
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++/" + Triple);
+#else
addSystemInclude(DriverArgs, CC1Args,
getDriver().SysRoot + "/system/develop/headers/c++");
addSystemInclude(DriverArgs, CC1Args,
@@ -3337,6 +3357,7 @@ void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
addSystemInclude(DriverArgs, CC1Args,
getDriver().SysRoot + "/system/develop/headers/c++/" +
Triple);
+#endif
break;
}
}
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 1b5c760..48b3357 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -234,7 +234,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, HAIKU_HYBRID_SECONDARY, Clang, Ver);
+#else
SmallString<128> P = StringRef(HSOpts.ResourceDir);
+#endif
+
llvm::sys::path::append(P, "include");
AddUnmappedPath(P, ExternCSystem, false);
}
@@ -267,7 +280,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);
@@ -299,6 +317,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.2.2
From 224324a9fa29ffacbe31329790909bf16983abe2 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.2.2

View File

@@ -1,151 +0,0 @@
From f67820d19fb6cd2077149cd749c62c48b7407300 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 cfcd221..5ae28fd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -370,6 +370,10 @@ endif()
if(CLANG_ENABLE_STATIC_ANALYZER)
add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER)
endif()
+if(DEFINED HAIKU_HYBRID_SECONDARY)
+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY})
+endif()
+
# Clang version information
set(CLANG_EXECUTABLE_VERSION
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 347aa29..8fc2b85 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -3314,6 +3314,13 @@ SanitizerMask CloudABI::getDefaultSanitizers() const {
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::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
@@ -3328,6 +3335,19 @@ void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
getDriver().SysRoot + "/system/develop/headers/c++/v1");
break;
case ToolChain::CST_Libstdcxx:
+#ifdef HAIKU_HYBRID_SECONDARY
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++");
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++/backward");
+
+ StringRef Triple = getTriple().str();
+ addSystemInclude(DriverArgs, CC1Args,
+ getDriver().SysRoot + "/system/develop/headers/"
+ HAIKU_HYBRID_SECONDARY "/c++/" + Triple);
+#else
addSystemInclude(DriverArgs, CC1Args,
getDriver().SysRoot + "/system/develop/headers/c++");
addSystemInclude(DriverArgs, CC1Args,
@@ -3337,6 +3357,7 @@ void Haiku::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
addSystemInclude(DriverArgs, CC1Args,
getDriver().SysRoot + "/system/develop/headers/c++/" +
Triple);
+#endif
break;
}
}
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index 1b5c760..48b3357 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -234,7 +234,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, HAIKU_HYBRID_SECONDARY, Clang, Ver);
+#else
SmallString<128> P = StringRef(HSOpts.ResourceDir);
+#endif
+
llvm::sys::path::append(P, "include");
AddUnmappedPath(P, ExternCSystem, false);
}
@@ -267,7 +280,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);
@@ -299,6 +317,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.2.2
From 224324a9fa29ffacbe31329790909bf16983abe2 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.2.2

View File

@@ -1,161 +0,0 @@
From 61c5cccbbe786e6b3b6ca581232c28c4eaeaea98 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.
add a test for haiku driver.
* upstream wants a case for libcxx in ToolChains.cpp, so add it.
Enable thread-local storage and disable PIE by default
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff1ff21..3739e5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -392,6 +392,10 @@ endif()
if(CLANG_ENABLE_STATIC_ANALYZER)
add_definitions(-DCLANG_ENABLE_STATIC_ANALYZER)
endif()
+if(DEFINED HAIKU_HYBRID_SECONDARY)
+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY})
+endif()
+
# Clang version information
set(CLANG_EXECUTABLE_VERSION
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 445b412..dffeddb 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -420,8 +420,6 @@ public:
this->IntPtrType = TargetInfo::SignedLong;
this->PtrDiffType = TargetInfo::SignedLong;
this->ProcessIDType = TargetInfo::SignedLong;
- this->TLSSupported = false;
-
}
};
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index 9bc9ae4..3484367 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -3592,6 +3592,13 @@ SanitizerMask CloudABI::getDefaultSanitizers() const {
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
}
std::string Haiku::findLibCxxIncludePath() const {
@@ -3600,8 +3607,14 @@ std::string Haiku::findLibCxxIncludePath() const {
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
}
/// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly.
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 3240357..bcd0f87 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -736,9 +736,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; }
std::string findLibCxxIncludePath() const override;
void addLibStdCxxIncludePaths(
diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp
index d50fb6d..8c0a978 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -233,7 +233,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, HAIKU_HYBRID_SECONDARY, Clang, Ver);
+#else
SmallString<128> P = StringRef(HSOpts.ResourceDir);
+#endif
+
llvm::sys::path::append(P, "include");
AddUnmappedPath(P, ExternCSystem, false);
}
@@ -266,7 +279,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);
@@ -298,6 +316,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:
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.12.2

View File

@@ -1,174 +0,0 @@
From ddcd2987576bee7b9804c169d7d928c583b66e5d 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 b55c64d..73788af 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -384,6 +384,10 @@ option(CLANG_ENABLE_PROTO_FUZZER "Build Clang protobuf fuzzer." OFF)
if(NOT CLANG_ENABLE_STATIC_ANALYZER AND (CLANG_ENABLE_ARCMT OR CLANG_ANALYZER_BUILD_Z3))
message(FATAL_ERROR "Cannot disable static analyzer while enabling ARCMT or Z3")
endif()
+if(DEFINED HAIKU_HYBRID_SECONDARY)
+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY})
+endif()
+
if(CLANG_ANALYZER_BUILD_Z3)
find_package(Z3 4.5)
diff --git a/lib/Driver/ToolChains/Haiku.cpp b/lib/Driver/ToolChains/Haiku.cpp
index 284d269..3a816aa 100644
--- a/lib/Driver/ToolChains/Haiku.cpp
+++ b/lib/Driver/ToolChains/Haiku.cpp
@@ -20,6 +20,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
}
std::string Haiku::findLibCxxIncludePath() const {
@@ -28,6 +35,12 @@ std::string Haiku::findLibCxxIncludePath() const {
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 d0b4e45..91ebebd 100644
--- a/lib/Frontend/InitHeaderSearch.cpp
+++ b/lib/Frontend/InitHeaderSearch.cpp
@@ -233,7 +233,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, HAIKU_HYBRID_SECONDARY, Clang, Ver);
+#else
SmallString<128> P = StringRef(HSOpts.ResourceDir);
+#endif
+
llvm::sys::path::append(P, "include");
AddUnmappedPath(P, ExternCSystem, false);
}
@@ -266,7 +279,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);
@@ -298,6 +316,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.13.1
From 08d1b5203f9c0b8e07ec694c8f839f9f73662233 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.13.1
From e4614aa2cf4d49fe4486a0ba8533f0d2b827b7ab 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 ca84a87..d5c0b63 100644
--- a/lib/Basic/Targets/OSTargets.h
+++ b/lib/Basic/Targets/OSTargets.h
@@ -260,7 +260,6 @@ public:
this->IntPtrType = TargetInfo::SignedLong;
this->PtrDiffType = TargetInfo::SignedLong;
this->ProcessIDType = TargetInfo::SignedLong;
- this->TLSSupported = false;
}
};
diff --git a/lib/Driver/ToolChains/Haiku.h b/lib/Driver/ToolChains/Haiku.h
index 8b5b48e..ccd851f 100644
--- a/lib/Driver/ToolChains/Haiku.h
+++ b/lib/Driver/ToolChains/Haiku.h
@@ -23,9 +23,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; }
std::string findLibCxxIncludePath() const override;
void addLibStdCxxIncludePaths(
--
2.13.1

View File

@@ -1,48 +0,0 @@
From 8bf543218812e2419f65ac444edbb2d86bad1708 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 28c4cc7..ab985a4 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)
--
1.8.3.4
From 64d6eca1a47b91ff89fc41d8f4eb20b64a0e68d6 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 18 Jun 2014 15:32:09 +0000
Subject: llvm: add a soname to libLTO.
This makes PrepareInstalledDevelLib happy.
diff --git a/tools/lto/Makefile b/tools/lto/Makefile
index cedbee1..5ce530d 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -22,6 +22,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
--
1.8.3.4

View File

@@ -1,437 +0,0 @@
From 4b015738184f2746c282c02b45c5f0a3747d1fa6 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 28c4cc7..ab985a4 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 a2db9ce7f1e6645c3034551aa38391ec0fb11d0a Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 18 Jun 2014 15:32:09 +0000
Subject: llvm: add a soname to libLTO.
This makes PrepareInstalledDevelLib happy.
diff --git a/tools/lto/Makefile b/tools/lto/Makefile
index cedbee1..5ce530d 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -22,6 +22,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 7a01e9f8b6141494e7ba36b9600f36c443526e33 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Sat, 9 May 2015 13:50:54 +1200
Subject: Haiku: Use PROJ_libdir when embedding RPATH.
* With Haiku packages, PROJ_libdir will be a
path local to the package itself, so we
don't need a path relative to $ORIGIN, which
can break with our hybrid installations.
diff --git a/Makefile.rules b/Makefile.rules
index fde77f9..542b631 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -578,7 +578,7 @@ ifeq ($(TARGET_OS),Darwin)
endif
ifdef SHARED_LIBRARY
-ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW Haiku))
ifneq ($(HOST_OS),Darwin)
LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
endif
@@ -615,7 +615,11 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
endif
ifneq ($(HOST_OS), Darwin)
ifdef TOOLNAME
- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
+ ifneq ($(HOST_OS), Haiku)
+ LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
+ else
+ LD.Flags += $(RPATH) -Wl,${PROJ_libdir}
+ endif
endif
else
ifneq ($(DARWIN_MAJVERS),4)
--
2.2.2
From 866845211a56ab1c5748713d151d7fb99c028270 Mon Sep 17 00:00:00 2001
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
Date: Sat, 9 May 2015 17:21:33 +1200
Subject: Haiku: Use configured paths, rather than hardcoding them.
* Also updates llvm-config to use the configured paths.
* Updates libtool.m4 to use the FindPath API for locating
the runtime library paths for the correct architecture.
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index fcf5e3b..5b0a74b 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -1808,13 +1808,14 @@ if test "${prefix}" = "NONE" ; then
prefix="/usr/local"
fi
eval LLVM_PREFIX="${prefix}";
-eval LLVM_BINDIR="${prefix}/bin";
-eval LLVM_DATADIR="${prefix}/share/llvm";
-eval LLVM_DOCSDIR="${prefix}/share/doc/llvm";
-eval LLVM_ETCDIR="${prefix}/etc/llvm";
-eval LLVM_INCLUDEDIR="${prefix}/include";
-eval LLVM_INFODIR="${prefix}/info";
-eval LLVM_MANDIR="${prefix}/man";
+eval LLVM_BINDIR="${bindir}";
+eval LLVM_DATADIR="${datadir}/llvm";
+eval LLVM_DOCSDIR="${docdir}";
+eval LLVM_ETCDIR="${sysconfdir}/llvm";
+eval LLVM_INCLUDEDIR="${includedir}";
+eval LLVM_INFODIR="${infodir}";
+eval LLVM_LIBDIR="${libdir}";
+eval LLVM_MANDIR="${mandir}";
LLVM_CONFIGTIME=`date`
AC_SUBST(LLVM_PREFIX)
AC_SUBST(LLVM_BINDIR)
@@ -1823,6 +1824,7 @@ AC_SUBST(LLVM_DOCSDIR)
AC_SUBST(LLVM_ETCDIR)
AC_SUBST(LLVM_INCLUDEDIR)
AC_SUBST(LLVM_INFODIR)
+AC_SUBST(LLVM_LIBDIR)
AC_SUBST(LLVM_MANDIR)
AC_SUBST(LLVM_CONFIGTIME)
@@ -1847,6 +1849,8 @@ AC_DEFINE_UNQUOTED(LLVM_INCLUDEDIR, "$LLVM_INCLUDEDIR",
[Installation directory for include files])
AC_DEFINE_UNQUOTED(LLVM_INFODIR, "$LLVM_INFODIR",
[Installation directory for .info files])
+AC_DEFINE_UNQUOTED(LLVM_LIBDIR, "$LLVM_LIBDIR",
+ [Installation directory for library files])
AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR",
[Installation directory for man pages])
AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
diff --git a/autoconf/m4/libtool.m4 b/autoconf/m4/libtool.m4
index 385d00b..6116201 100644
--- a/autoconf/m4/libtool.m4
+++ b/autoconf/m4/libtool.m4
@@ -1454,6 +1454,14 @@ gnu*)
hardcode_into_libs=yes
;;
+haiku*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ haiku_arch=`getarch`
+ sys_lib_dlsearch_path_spec="`findpaths -a ${haiku_arch} -c ' ' B_FIND_PATH_LIB_DIRECTORY`"
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
diff --git a/configure b/configure
index 17b958c..aff513d 100755
--- a/configure
+++ b/configure
@@ -795,6 +795,7 @@ LLVM_DOCSDIR
LLVM_ETCDIR
LLVM_INCLUDEDIR
LLVM_INFODIR
+LLVM_LIBDIR
LLVM_MANDIR
LLVM_CONFIGTIME
BINDINGS_TO_BUILD
@@ -9139,6 +9140,14 @@ gnu*)
hardcode_into_libs=yes
;;
+haiku*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ haiku_arch=`getarch`
+ sys_lib_dlsearch_path_spec="`findpaths -a ${haiku_arch} -c ' ' B_FIND_PATH_LIB_DIRECTORY`"
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
@@ -22048,13 +22057,14 @@ if test "${prefix}" = "NONE" ; then
prefix="/usr/local"
fi
eval LLVM_PREFIX="${prefix}";
-eval LLVM_BINDIR="${prefix}/bin";
-eval LLVM_DATADIR="${prefix}/share/llvm";
-eval LLVM_DOCSDIR="${prefix}/share/doc/llvm";
-eval LLVM_ETCDIR="${prefix}/etc/llvm";
-eval LLVM_INCLUDEDIR="${prefix}/include";
-eval LLVM_INFODIR="${prefix}/info";
-eval LLVM_MANDIR="${prefix}/man";
+eval LLVM_BINDIR="${bindir}";
+eval LLVM_DATADIR="${datadir}/llvm";
+eval LLVM_DOCSDIR="${docdir}";
+eval LLVM_ETCDIR="${sysconfdir}/llvm";
+eval LLVM_INCLUDEDIR="${includedir}";
+eval LLVM_LIBDIR="${libdir}";
+eval LLVM_INFODIR="${infodir}";
+eval LLVM_MANDIR="${mandir}";
LLVM_CONFIGTIME=`date`
@@ -22107,6 +22117,11 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
+#define LLVM_LIBDIR "$LLVM_LIBDIR"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
#define LLVM_MANDIR "$LLVM_MANDIR"
_ACEOF
@@ -23257,10 +23272,11 @@ LLVM_DOCSDIR!$LLVM_DOCSDIR$ac_delim
LLVM_ETCDIR!$LLVM_ETCDIR$ac_delim
LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim
LLVM_INFODIR!$LLVM_INFODIR$ac_delim
+LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim
LLVM_MANDIR!$LLVM_MANDIR$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 98; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake
index 5c72ad8..642a2ea 100644
--- a/include/llvm/Config/config.h.cmake
+++ b/include/llvm/Config/config.h.cmake
@@ -531,6 +531,9 @@
/* Installation directory for .info files */
#cmakedefine LLVM_INFODIR "${LLVM_INFODIR}"
+/* Installation directory for library files */
+#cmakedefine LLVM_LIBDIR "${LLVM_LIBDIR}"
+
/* Installation directory for man pages */
#cmakedefine LLVM_MANDIR "${LLVM_MANDIR}"
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in
index 2317823..f0cc2f4 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -566,6 +566,9 @@
/* Installation directory for .info files */
#undef LLVM_INFODIR
+/* Installation directory library files */
+#undef LLVM_LIBDIR
+
/* Installation directory for man pages */
#undef LLVM_MANDIR
diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake
index 80616ef..9b88a6a 100644
--- a/include/llvm/Config/llvm-config.h.cmake
+++ b/include/llvm/Config/llvm-config.h.cmake
@@ -49,6 +49,9 @@
/* Installation directory for .info files */
#cmakedefine LLVM_INFODIR "${LLVM_INFODIR}"
+/* Installation directory for library files */
+#cmakedefine LLVM_LIBDIR "${LLVM_LIBDIR}"
+
/* Installation directory for man pages */
#cmakedefine LLVM_MANDIR "${LLVM_MANDIR}"
diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in
index a4fae55..e2598f8 100644
--- a/include/llvm/Config/llvm-config.h.in
+++ b/include/llvm/Config/llvm-config.h.in
@@ -49,6 +49,9 @@
/* Installation directory for .info files */
#undef LLVM_INFODIR
+/* Installation directory for library files */
+#undef LLVM_LIBDIR
+
/* Installation directory for man pages */
#undef LLVM_MANDIR
diff --git a/projects/sample/autoconf/configure.ac b/projects/sample/autoconf/configure.ac
index 03cd214..f3455e7 100644
--- a/projects/sample/autoconf/configure.ac
+++ b/projects/sample/autoconf/configure.ac
@@ -1412,13 +1412,14 @@ if test "${prefix}" = "NONE" ; then
prefix="/usr/local"
fi
eval LLVM_PREFIX="${prefix}";
-eval LLVM_BINDIR="${prefix}/bin";
-eval LLVM_DATADIR="${prefix}/share/llvm";
-eval LLVM_DOCSDIR="${prefix}/share/doc/llvm";
-eval LLVM_ETCDIR="${prefix}/etc/llvm";
-eval LLVM_INCLUDEDIR="${prefix}/include";
-eval LLVM_INFODIR="${prefix}/info";
-eval LLVM_MANDIR="${prefix}/man";
+eval LLVM_BINDIR="${bindir}";
+eval LLVM_DATADIR="${datadir}/llvm";
+eval LLVM_DOCSDIR="${docdir}";
+eval LLVM_ETCDIR="${sysconfdir}/llvm";
+eval LLVM_INCLUDEDIR="${includedir}";
+eval LLVM_INFODIR="${infodir}";
+eval LLVM_LIBDIR="${libdir}";
+eval LLVM_MANDIR="${mandir}";
LLVM_CONFIGTIME=`date`
AC_SUBST(LLVM_PREFIX)
AC_SUBST(LLVM_BINDIR)
@@ -1427,6 +1428,7 @@ AC_SUBST(LLVM_DOCSDIR)
AC_SUBST(LLVM_ETCDIR)
AC_SUBST(LLVM_INCLUDEDIR)
AC_SUBST(LLVM_INFODIR)
+AC_SUBST(LLVM_LIBDIR)
AC_SUBST(LLVM_MANDIR)
AC_SUBST(LLVM_CONFIGTIME)
@@ -1446,6 +1448,8 @@ AC_DEFINE_UNQUOTED(LLVM_INCLUDEDIR, "$LLVM_INCLUDEDIR",
[Installation directory for include files])
AC_DEFINE_UNQUOTED(LLVM_INFODIR, "$LLVM_INFODIR",
[Installation directory for .info files])
+AC_DEFINE_UNQUOTED(LLVM_LIBDIR, "$LLVM_LIBDIR",
+ [Installation directory for library files])
AC_DEFINE_UNQUOTED(LLVM_MANDIR, "$LLVM_MANDIR",
[Installation directory for man pages])
AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
diff --git a/projects/sample/autoconf/m4/libtool.m4 b/projects/sample/autoconf/m4/libtool.m4
index b8bd4b8..e504b05 100644
--- a/projects/sample/autoconf/m4/libtool.m4
+++ b/projects/sample/autoconf/m4/libtool.m4
@@ -1454,6 +1454,14 @@ gnu*)
hardcode_into_libs=yes
;;
+haiku*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ haiku_arch=`getarch`
+ sys_lib_dlsearch_path_spec="`findpaths -a ${haiku_arch} -c ' ' B_FIND_PATH_LIB_DIRECTORY`"
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
diff --git a/projects/sample/configure b/projects/sample/configure
index bc04c96..b511655 100755
--- a/projects/sample/configure
+++ b/projects/sample/configure
@@ -779,6 +779,7 @@ LLVM_DOCSDIR
LLVM_ETCDIR
LLVM_INCLUDEDIR
LLVM_INFODIR
+LLVM_LIBDIR
LLVM_MANDIR
LLVM_CONFIGTIME
BINDINGS_TO_BUILD
@@ -8916,6 +8917,14 @@ gnu*)
hardcode_into_libs=yes
;;
+haiku*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ haiku_arch=`getarch`
+ sys_lib_dlsearch_path_spec="`findpaths -a ${haiku_arch} -c ' ' B_FIND_PATH_LIB_DIRECTORY`"
+ ;;
+
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
@@ -21281,6 +21290,7 @@ eval LLVM_DOCSDIR="${prefix}/share/doc/llvm";
eval LLVM_ETCDIR="${prefix}/etc/llvm";
eval LLVM_INCLUDEDIR="${prefix}/include";
eval LLVM_INFODIR="${prefix}/info";
+eval LLVM_LIBDIR="${prefix}/lib";
eval LLVM_MANDIR="${prefix}/man";
LLVM_CONFIGTIME=`date`
@@ -21332,6 +21342,11 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
+#define LLVM_LIBDIR "$LLVM_LIBDIR"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
#define LLVM_MANDIR "$LLVM_MANDIR"
_ACEOF
@@ -22400,6 +22415,7 @@ LLVM_DOCSDIR!$LLVM_DOCSDIR$ac_delim
LLVM_ETCDIR!$LLVM_ETCDIR$ac_delim
LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim
LLVM_INFODIR!$LLVM_INFODIR$ac_delim
+LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim
LLVM_MANDIR!$LLVM_MANDIR$ac_delim
LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
@@ -22412,7 +22428,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 3924e2e..dc69158 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -252,6 +252,13 @@ int main(int argc, char **argv) {
ActiveBinDir = ActivePrefix + "/bin";
ActiveLibDir = ActivePrefix + "/lib";
ActiveIncludeOption = "-I" + ActiveIncludeDir;
+ #if defined(LLVM_PREFIX) && defined(LLVM_INCLUDEDIR) && defined(LLVM_BINDIR) && defined(LLVM_LIBDIR)
+ ActivePrefix = LLVM_PREFIX;
+ ActiveIncludeDir = LLVM_INCLUDEDIR;
+ ActiveBinDir = LLVM_BINDIR;
+ ActiveLibDir = LLVM_LIBDIR;
+ ActiveIncludeOption = "-I" + std::string(LLVM_INCLUDEDIR);
+ #endif
}
raw_ostream &OS = outs();
--
2.2.2

View File

@@ -1,25 +0,0 @@
From 744634aa845c403f5a39b8257bbacd36dc1dd351 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: [PATCH] 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 28c4cc7..ab985a4 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)
--
1.8.3.4

File diff suppressed because it is too large Load Diff

View File

@@ -1,95 +0,0 @@
From 42a5734462221c17c6888e521b53599f37145d43 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 f2a83ee50fe6b4ad4a79996864a95c1a8ac9145c 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 8829b50366b40ed55c1c54d7b2fce9c1b3b3465c 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

View File

@@ -1,95 +0,0 @@
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

View File

@@ -1,95 +0,0 @@
From b3b154c6783c97da7e9336d50016364426cdfa17 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 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..ffa76d2 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -17,6 +17,10 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
include $(LEVEL)/Makefile.common
+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 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

View File

@@ -1,95 +0,0 @@
From 0bf8fa31fb049edda14a40cbc7e09ec3c6b194b9 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 497ff8cdee5a4643776d5d26d8e41faa770b4ad8 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..ffa76d2 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -17,6 +17,10 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
include $(LEVEL)/Makefile.common
+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 0178a4ef01a4f860586e7b7f4c0f937367851158 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

View File

@@ -1,362 +0,0 @@
From d6ee5488845a252d380cd25890136de7b54a7ce0 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.7.0
From 8974eea683319522bb0e0dafeb409224c2d00768 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..ffa76d2 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -17,6 +17,10 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
include $(LEVEL)/Makefile.common
+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.7.0
From 89aaec4cfcfd3f0f8bbc15fc81bae45b1c74b00b 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 80f6279..8275aac 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -309,7 +309,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;
@@ -497,10 +501,16 @@ int main(int argc, char **argv) {
OS << LLVM_HAS_RTTI << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } 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.7.0
From 4e245f44390a3b549b535892d06777e9e4f1009f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 31 Jan 2016 10:23:24 +0000
Subject: patch cmake build for Haiku.
diff --git a/autoconf/config.guess b/autoconf/config.guess
index b209a1a..776ef5c 100755
--- a/autoconf/config.guess
+++ b/autoconf/config.guess
@@ -2,13 +2,13 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012, 2013 Free Software Foundation, Inc.
-timestamp='2011-08-20'
+timestamp='2012-12-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -17,26 +17,22 @@ timestamp='2011-08-20'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -57,8 +53,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +141,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,14 +198,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@@ -308,7 +304,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -807,10 +803,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- *:MSYS*:*)
+ i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -867,8 +866,12 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
- aarch64*:Linux:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -904,13 +907,16 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@@ -952,7 +958,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@@ -971,9 +977,6 @@ EOF
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
- ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-gnu
- exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
@@ -996,7 +999,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -1203,6 +1206,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1258,7 +1264,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1327,11 +1333,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index f699211..c5be442 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -13,7 +13,7 @@ include(TestBigEndian)
include(HandleLLVMStdlib)
-if( UNIX AND NOT BEOS )
+if( UNIX AND NOT (BEOS OR HAIKU) )
# Used by check_symbol_exists:
set(CMAKE_REQUIRED_LIBRARIES m)
endif()
diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake
index 551de6a..d43fd7b 100644
--- a/cmake/modules/CheckAtomic.cmake
+++ b/cmake/modules/CheckAtomic.cmake
@@ -32,8 +32,6 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
message(FATAL_ERROR "Host compiler must support std::atomic!")
endif()
- else()
- message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
endif()
endif()
endif()
diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt
index 75b3e89..db5c555 100644
--- a/lib/Support/CMakeLists.txt
+++ b/lib/Support/CMakeLists.txt
@@ -24,7 +24,9 @@ if( NOT MSVC )
if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
set(system_libs ${system_libs} z)
endif()
- set(system_libs ${system_libs} m)
+ if( UNIX AND NOT (BEOS OR HAIKU) )
+ set(system_libs ${system_libs} m)
+ endif()
endif( MINGW )
endif( NOT MSVC )
--
2.7.0

View File

@@ -1,362 +0,0 @@
From f59ba1f51de1d4d20ea6cbfd5e2469bba2cec1cb 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.7.0
From c5876fe33f9184a892fb426ad44af34f33f6863f 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..ffa76d2 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -17,6 +17,10 @@ EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
include $(LEVEL)/Makefile.common
+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.7.0
From 08538bfcbb4917e8952c00ef425694ca97dfdb31 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 80f6279..8275aac 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -309,7 +309,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;
@@ -497,10 +501,16 @@ int main(int argc, char **argv) {
OS << LLVM_HAS_RTTI << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } 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.7.0
From 0338c143a0764b2c449c6ecd246ca4e5a76be4c5 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sun, 31 Jan 2016 10:23:24 +0000
Subject: patch cmake build for Haiku.
diff --git a/autoconf/config.guess b/autoconf/config.guess
index b209a1a..776ef5c 100755
--- a/autoconf/config.guess
+++ b/autoconf/config.guess
@@ -2,13 +2,13 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012, 2013 Free Software Foundation, Inc.
-timestamp='2011-08-20'
+timestamp='2012-12-29'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -17,26 +17,22 @@ timestamp='2011-08-20'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -57,8 +53,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -145,7 +141,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,14 +198,14 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
@@ -308,7 +304,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -807,10 +803,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- *:MSYS*:*)
+ i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -867,8 +866,12 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
- aarch64*:Linux:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -904,13 +907,16 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@@ -952,7 +958,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@@ -971,9 +977,6 @@ EOF
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
- ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-gnu
- exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
@@ -996,7 +999,7 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -1203,6 +1206,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1258,7 +1264,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1327,11 +1333,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index f699211..c5be442 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -13,7 +13,7 @@ include(TestBigEndian)
include(HandleLLVMStdlib)
-if( UNIX AND NOT BEOS )
+if( UNIX AND NOT (BEOS OR HAIKU) )
# Used by check_symbol_exists:
set(CMAKE_REQUIRED_LIBRARIES m)
endif()
diff --git a/cmake/modules/CheckAtomic.cmake b/cmake/modules/CheckAtomic.cmake
index 551de6a..d43fd7b 100644
--- a/cmake/modules/CheckAtomic.cmake
+++ b/cmake/modules/CheckAtomic.cmake
@@ -32,8 +32,6 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
message(FATAL_ERROR "Host compiler must support std::atomic!")
endif()
- else()
- message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
endif()
endif()
endif()
diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt
index 75b3e89..db5c555 100644
--- a/lib/Support/CMakeLists.txt
+++ b/lib/Support/CMakeLists.txt
@@ -24,7 +24,9 @@ if( NOT MSVC )
if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
set(system_libs ${system_libs} z)
endif()
- set(system_libs ${system_libs} m)
+ if( UNIX AND NOT (BEOS OR HAIKU) )
+ set(system_libs ${system_libs} m)
+ endif()
endif( MINGW )
endif( NOT MSVC )
--
2.7.0

View File

@@ -1,54 +0,0 @@
From 99fd5918bd3259536ec5bb32f7ab57e0d5d98caa 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.
* use /develop/lib instead of /lib
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 94d426b..9dfc43c 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -327,9 +327,17 @@ int main(int argc, char **argv) {
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+#else
ActiveIncludeDir = ActivePrefix + "/include";
+#endif
ActiveBinDir = ActivePrefix + "/bin";
+#ifdef __HAIKU__
+ ActiveLibDir = ActivePrefix + "/develop/lib";
+#else
ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+#endif
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
@@ -537,10 +545,16 @@ int main(int argc, char **argv) {
OS << LLVM_HAS_GLOBAL_ISEL << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } 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 if (Arg == "--link-shared") {
LinkMode = LinkModeShared;
} else if (Arg == "--link-static") {
--
2.2.2

View File

@@ -1,54 +0,0 @@
From 99fd5918bd3259536ec5bb32f7ab57e0d5d98caa 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.
* use /develop/lib instead of /lib
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 94d426b..9dfc43c 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -327,9 +327,17 @@ int main(int argc, char **argv) {
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+#else
ActiveIncludeDir = ActivePrefix + "/include";
+#endif
ActiveBinDir = ActivePrefix + "/bin";
+#ifdef __HAIKU__
+ ActiveLibDir = ActivePrefix + "/develop/lib";
+#else
ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+#endif
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
@@ -537,10 +545,16 @@ int main(int argc, char **argv) {
OS << LLVM_HAS_GLOBAL_ISEL << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } 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 if (Arg == "--link-shared") {
LinkMode = LinkModeShared;
} else if (Arg == "--link-static") {
--
2.2.2

View File

@@ -1,74 +0,0 @@
From b08432486912bafc8e058577cb90271b2117eff1 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 25344e4..11901bf 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -332,9 +332,14 @@ int main(int argc, char **argv) {
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+ ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX;
+#else
ActiveIncludeDir = ActivePrefix + "/include";
- ActiveBinDir = ActivePrefix + "/bin";
ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+#endif
+ ActiveBinDir = ActivePrefix + "/bin";
ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
@@ -554,10 +559,16 @@ int main(int argc, char **argv) {
OS << (LLVM_HAS_GLOBAL_ISEL ? "ON" : "OFF") << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } 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 if (Arg == "--ignore-libllvm") {
LinkDyLib = false;
LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto;
--
2.12.2
From 4c58933420077f3520c2a9348ad560eddcd676a7 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 4 Jul 2017 20:41:17 +0200
Subject: --whole-archive also on Haiku for GNU ld.
diff --git a/tools/llvm-shlib/CMakeLists.txt b/tools/llvm-shlib/CMakeLists.txt
index edadb82..f96b016 100644
--- a/tools/llvm-shlib/CMakeLists.txt
+++ b/tools/llvm-shlib/CMakeLists.txt
@@ -37,7 +37,7 @@ endif()
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
list(REMOVE_DUPLICATES LIB_NAMES)
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW) # FIXME: It should be "GNU ld for elf"
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR MINGW OR HAIKU) # FIXME: It should be "GNU ld for elf"
# GNU ld doesn't resolve symbols in the version script.
set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
--
2.12.2

View File

@@ -1,77 +0,0 @@
From 6f326bc4064aa7a42fe2a4bcef8add79eca1a9f7 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 08b096a..01cc38d 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -332,11 +332,16 @@ int main(int argc, char **argv) {
("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
} else {
ActivePrefix = CurrentExecPrefix;
+#ifdef __HAIKU__
+ ActiveIncludeDir = ActivePrefix + "/develop/headers";
+ ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX;
+#else
ActiveIncludeDir = ActivePrefix + "/include";
+ ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+#endif
SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
sys::fs::make_absolute(ActivePrefix, path);
ActiveBinDir = path.str();
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
@@ -556,10 +560,16 @@ int main(int argc, char **argv) {
OS << (LLVM_HAS_GLOBAL_ISEL ? "ON" : "OFF") << '\n';
} else if (Arg == "--shared-mode") {
PrintSharedMode = true;
- } 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 if (Arg == "--ignore-libllvm") {
LinkDyLib = false;
LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto;
--
2.13.1
From 725a79b6e375e7132bb15c1a9cef856f48e67525 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 16 Sep 2017 15:02:46 +0200
Subject: Haiku doesn't expose whether a FS is local or remote.
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index 3099c27..c9ee624 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -380,6 +380,9 @@ static bool is_local_impl(struct STATVFS &Vfs) {
#elif defined(__CYGWIN__)
// Cygwin doesn't expose this information; would need to use Win32 API.
return false;
+#elif defined(__HAIKU__)
+ // Haiku doesn't expose this information
+ return false;
#elif defined(__sun)
// statvfs::f_basetype contains a null-terminated FSType name of the mounted target
StringRef fstype(Vfs.f_basetype);
--
2.13.1