diff --git a/sys-devel/llvm/llvm-3.5.1.recipe b/sys-devel/llvm/llvm-3.5.1.recipe new file mode 100644 index 000000000..915475923 --- /dev/null +++ b/sys-devel/llvm/llvm-3.5.1.recipe @@ -0,0 +1,234 @@ +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/" +LICENSE="UIUC" +COPYRIGHT="2003-2014 University of Illinois at Urbana-Champaign" +SRC_URI="http://llvm.org/releases/${portVersion}/llvm-${portVersion}.src.tar.xz" +CHECKSUM_SHA256="bf3275d2d7890015c8d8f5e6f4f882f8cf3bf51967297ebe74111d6d8b53be15" +REVISION="1" +ARCHITECTURES="x86 x86_64" +if [ $effectiveTargetArchitecture != x86_gcc2 ]; then + ARCHITECTURES="$ARCHITECTURES x86_gcc2" +fi +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 >= $haikuVersion + lib:libstdc++$secondaryArchSuffix + lib:libgcc_s$secondaryArchSuffix + " +BUILD_REQUIRES=" + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + 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 + " + +PATCHES="llvm-${portVersion}.patchset" + +SOURCE_DIR="llvm-$portVersion.src" + +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 +} diff --git a/sys-devel/llvm/patches/llvm-3.5.1.patchset b/sys-devel/llvm/patches/llvm-3.5.1.patchset new file mode 100644 index 000000000..0f9980987 --- /dev/null +++ b/sys-devel/llvm/patches/llvm-3.5.1.patchset @@ -0,0 +1,47 @@ +From 9cc674f2aa0f54b900d1e773a6ffd201c23e4c05 Mon Sep 17 00:00:00 2001 +From: Alexander von Gluck IV +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 + #else + #if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32) +-- +1.8.3.4 + + +From 577d261e8e74bc442fe75515e043f268db923ed3 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +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 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 +