llvm: Add 3.7.0 recipe

This commit is contained in:
Alexander von Gluck IV
2015-09-27 08:17:57 -05:00
parent 31ff8d32b8
commit 003a62d4b8
2 changed files with 415 additions and 0 deletions

View File

@@ -0,0 +1,363 @@
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="ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153"
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: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:verify_uselistorder
cmd:obj2yaml
cmd:yaml2obj
cmd:opt
cmd:FileCheck
cmd:count
cmd:not
lib:BugpointPasses$secondaryArchSuffix
lib:LLVMHello$secondaryArchSuffix
lib:libLTO$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:libLLVMAMDGPUInfo$secondaryArchSuffix
devel:libLLVMAMDGPUUtils$secondaryArchSuffix
devel:libLLVMARMAsmParser$secondaryArchSuffix
devel:libLLVMARMAsmPrinter$secondaryArchSuffix
devel:libLLVMARMCodeGen$secondaryArchSuffix
devel:libLLVMARMDesc$secondaryArchSuffix
devel:libLLVMARMDisassembler$secondaryArchSuffix
devel:libLLVMARMInfo$secondaryArchSuffix
devel:libLLVMAnalysis$secondaryArchSuffix
devel:libLLVMAsmParser$secondaryArchSuffix
devel:libLLVMAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFAsmPrinter$secondaryArchSuffix
devel:libLLVMBPFCodeGen$secondaryArchSuffix
devel:libLLVMBPFDesc$secondaryArchSuffix
devel:libLLVMBPFInfo$secondaryArchSuffix
devel:libLLVMBitReader$secondaryArchSuffix
devel:libLLVMBitWriter$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:libLLVMIRReader$secondaryArchSuffix
devel:libLLVMInstCombine$secondaryArchSuffix
devel:libLLVMInstrumentation$secondaryArchSuffix
devel:libLLVMInterpreter$secondaryArchSuffix
devel:libLLVMLTO$secondaryArchSuffix
devel:libLLVMLibDriver$secondaryArchSuffix
devel:libLLVMLineEditor$secondaryArchSuffix
devel:libLLVMLinker$secondaryArchSuffix
devel:libLLVMMC$secondaryArchSuffix
devel:libLLVMMCDisassembler$secondaryArchSuffix
devel:libLLVMMCJIT$secondaryArchSuffix
devel:libLLVMMCParser$secondaryArchSuffix
devel:libLLVMMIRParser$secondaryArchSuffix
devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix
devel:libLLVMMSP430CodeGen$secondaryArchSuffix
devel:libLLVMMSP430Desc$secondaryArchSuffix
devel:libLLVMMSP430Info$secondaryArchSuffix
devel:libLLVMMipsAsmParser$secondaryArchSuffix
devel:libLLVMMipsAsmPrinter$secondaryArchSuffix
devel:libLLVMMipsCodeGen$secondaryArchSuffix
devel:libLLVMMipsDesc$secondaryArchSuffix
devel:libLLVMMipsDisassembler$secondaryArchSuffix
devel:libLLVMMipsInfo$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:libLLVMipa$secondaryArchSuffix
devel:libLLVMipo$secondaryArchSuffix
devel:libLTO$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize
cmd:make
cmd:python
cmd:sed
cmd:find
cmd:grep
"
BUILD()
{
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
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
}
TEST()
{
make check
}

View File

@@ -0,0 +1,52 @@
From 35e926dee49e69f4327dae3466e0def8512cc65e Mon Sep 17 00:00:00 2001
From: Alexander von Gluck IV <kallisti5@unixzen.com>
Date: Sat, 26 Sep 2015 17:50:18 -0500
Subject: [PATCH 1/2] haiku: fix Host.h for endian.h
---
include/llvm/Support/Host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
index 8f4bf3c..8114f9b 100644
--- 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 3cdc2f2c1892bbee5102aeee5228b4ccdde8d4d9 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sat, 26 Sep 2015 17:51:06 -0500
Subject: [PATCH 2/2] libLTO: add soname when building on Haiku.
---
tools/lto/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/lto/Makefile b/tools/lto/Makefile
index 530c05a..654f313 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