mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-18 17:50:06 +02:00
362 lines
14 KiB
Bash
362 lines
14 KiB
Bash
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"
|
|
SOURCE_URI_2="http://llvm.org/releases/${portVersion}/cfe-${portVersion}.src.tar.xz"
|
|
SOURCE_URI_3="http://llvm.org/releases/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz"
|
|
CHECKSUM_SHA256="44196156d5749eb4b4224fe471a29cc3984df92570a4a89fa859f7394fc0c575"
|
|
CHECKSUM_SHA256_2="4feb575f74fb3a74b6245400460230141bf610f235ef3a25008cfe6137828620"
|
|
CHECKSUM_SHA256_3="f21a374d74b194d8c984546266491b518859b5f12ed9abd49337b8060d3fc004"
|
|
SOURCE_DIR="llvm-$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: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: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: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: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:libLLVMIRReader$secondaryArchSuffix
|
|
devel:libLLVMInstCombine$secondaryArchSuffix
|
|
devel:libLLVMInstrumentation$secondaryArchSuffix
|
|
devel:libLLVMInterpreter$secondaryArchSuffix
|
|
devel:libLLVMJIT$secondaryArchSuffix
|
|
devel:libLLVMLineEditor$secondaryArchSuffix
|
|
devel:libLLVMLTO$secondaryArchSuffix
|
|
devel:libLLVMLinker$secondaryArchSuffix
|
|
devel:libLLVMMC$secondaryArchSuffix
|
|
devel:libLLVMMCAnalysis$secondaryArchSuffix
|
|
devel:libLLVMMCDisassembler$secondaryArchSuffix
|
|
devel:libLLVMMCJIT$secondaryArchSuffix
|
|
devel:libLLVMMCParser$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: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:libLLVMipa$secondaryArchSuffix
|
|
devel:libLLVMipo$secondaryArchSuffix
|
|
devel:libLTO$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_tblgen = $portVersion
|
|
cmd:clang_tidy = $portVersion
|
|
cmd:c_index_test = $portVersion
|
|
cmd:pp_trace = $portVersion
|
|
lib:libclang$secondaryArchSuffix = $portVersion
|
|
devel:libclang$secondaryArchSuffix = $portVersion
|
|
devel:libclangarcmigrate$secondaryArchSuffix = $portVersion
|
|
devel:libclangast$secondaryArchSuffix = $portVersion
|
|
devel:libclangastmatchers$secondaryArchSuffix = $portVersion
|
|
devel:libclanganalysis$secondaryArchSuffix = $portVersion
|
|
devel:libclangapplyreplacements$secondaryArchSuffix = $portVersion
|
|
devel:libclangbasic$secondaryArchSuffix = $portVersion
|
|
devel:libclangcodegen$secondaryArchSuffix = $portVersion
|
|
devel:libclangdriver$secondaryArchSuffix = $portVersion
|
|
devel:libclangdynamicastmatchers$secondaryArchSuffix = $portVersion
|
|
devel:libclangedit$secondaryArchSuffix = $portVersion
|
|
devel:libclangformat$secondaryArchSuffix = $portVersion
|
|
devel:libclangfrontend$secondaryArchSuffix = $portVersion
|
|
devel:libclangfrontendtool$secondaryArchSuffix = $portVersion
|
|
devel:libclangindex$secondaryArchSuffix = $portVersion
|
|
devel:libclanglex$secondaryArchSuffix = $portVersion
|
|
devel:libclangparse$secondaryArchSuffix = $portVersion
|
|
devel:libclangquery$secondaryArchSuffix = $portVersion
|
|
devel: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
|
|
"
|
|
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:groff
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:libtoolize$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:python
|
|
cmd:sed
|
|
cmd:grep
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
# Add clang tools
|
|
mkdir -p tools/clang
|
|
cp -rd $sourceDir2/cfe-${portVersion}.src/* tools/clang/
|
|
|
|
# Add clang tools's tool's (really llvm?)
|
|
mkdir -p tools/clang/tools/extra
|
|
cp -rd $sourceDir3/clang-tools-extra-${portVersion}.src/* tools/clang/tools/extra
|
|
|
|
# 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
|
|
}
|