diff --git a/sys-devel/llvm/llvm-5.0.0.recipe b/sys-devel/llvm/llvm-5.0.0.recipe deleted file mode 100644 index d93a1d1e7..000000000 --- a/sys-devel/llvm/llvm-5.0.0.recipe +++ /dev/null @@ -1,484 +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="4" -SOURCE_URI="https://releases.llvm.org/${portVersion}/llvm-${portVersion}.src.tar.xz" -CHECKSUM_SHA256="e35dcbae6084adcf4abb32514127c5eabd7d63b733852ccdb31e06f1373136da" -SOURCE_DIR="llvm-$portVersion.src" -SOURCE_URI_2="https://releases.llvm.org/${portVersion}/cfe-${portVersion}.src.tar.xz" -CHECKSUM_SHA256_2="019f23c2192df793ac746595e94a403908749f8e0c484b403476d2611dd20970" -SOURCE_DIR_2="cfe-$portVersion.src" -SOURCE_URI_3="https://releases.llvm.org/${portVersion}/clang-tools-extra-${portVersion}.src.tar.xz" -CHECKSUM_SHA256_3="87d078b959c4a6e5ff9fd137c2f477cadb1245f93812512996f73986a6d973c6" -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="d5ad5266462134a482b381f1f8115b6cad3473741b3bb7d1acc7f69fd0f0c0b3" -SOURCE_DIR_4="compiler-rt-$portVersion.src" -PATCHES="llvm-$portVersion.patchset" -PATCHES_2="clang-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2 ?x86" -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_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_objdump - cmd:llvm_opt_report - cmd:llvm_pdbdump - cmd:llvm_pdbutil - cmd:llvm_perfectshuffle - cmd:llvm_profdata - cmd:llvm_ranlib - 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: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_5.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:libLLVMBinaryFormat$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:libLLVMDlltoolDriver$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: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: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_5.0$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " - -PROVIDES_clang=" - llvm${secondaryArchSuffix}_clang = $portVersion - cmd:c_index_test = $portVersion - cmd:clang = $portVersion - cmd:clang++ = $portVersion - cmd:clang_5.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: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:libclangtoolingcore$secondaryArchSuffix = $portVersion - devel:libclangtoolingrefactor$secondaryArchSuffix = $portVersion - lib:libclang$secondaryArchSuffix = $portVersion - " -REQUIRES_clang=" - haiku$secondaryArchSuffix - lib:libLLVM_5.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_5.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}\"" - cmakeFlags="$cmakeFlags -DLLVM_LIBDIR_SUFFIX=/${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 $libDir - - 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 - 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 -} diff --git a/sys-devel/llvm/llvm6-6.0.1.recipe b/sys-devel/llvm/llvm6-6.0.1.recipe deleted file mode 100644 index 78b7bb0fb..000000000 --- a/sys-devel/llvm/llvm6-6.0.1.recipe +++ /dev/null @@ -1,506 +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-2018 University of Illinois at Urbana-Champaign" -LICENSE="UIUC" -REVISION="6" -SOURCE_URI="https://releases.llvm.org/$portVersion/llvm-$portVersion.src.tar.xz" -CHECKSUM_SHA256="b6d6c324f9c71494c0ccaf3dac1f16236d970002b42bb24a6c9e1634f7d0f4e2" -SOURCE_DIR="llvm-$portVersion.src" -SOURCE_URI_2="https://releases.llvm.org/$portVersion/cfe-$portVersion.src.tar.xz" -CHECKSUM_SHA256_2="7c243f1485bddfdfedada3cd402ff4792ea82362ff91fbdac2dae67c6026b667" -SOURCE_DIR_2="cfe-$portVersion.src" -SOURCE_URI_3="https://releases.llvm.org/$portVersion/clang-tools-extra-$portVersion.src.tar.xz" -CHECKSUM_SHA256_3="0d2e3727786437574835b75135f9e36f861932a958d8547ced7e13ebdda115f1" -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="f4cd1e15e7d5cb708f9931d4844524e4904867240c306b06a4287b22ac1c99b9" -SOURCE_DIR_4="compiler-rt-$portVersion.src" -PATCHES="llvm-$portVersion.patchset" -PATCHES_2="clang-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2 ?x86" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - llvm6$secondaryArchSuffix = $portVersion compat >= 6 - 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_cfi_verify - cmd:llvm_config = $portVersion compat >= 6 - 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 = $portVersion compat >= 6 - devel:libLLVM_6.0$secondaryArchSuffix = $portVersion compat >= 6 - devel:libLLVM_6.0.1$secondaryArchSuffix = $portVersion compat >= 6 - 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 = $portVersion compat >= 6 - lib:BugpointPasses$secondaryArchSuffix - lib:LLVMHello$secondaryArchSuffix - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libLLVM_6.0$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " -CONFLICTS=" - llvm$secondaryArchSuffix - " - -PROVIDES_clang=" - llvm6${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_func_mapping = $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 compat >= 6 - 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:libclangcrosstu$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:libclanghandlecxx$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:libclangtidyfuchsiamodule$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:libclangtidyobjcmodule$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 compat >= 6 - " -REQUIRES_clang=" - haiku$secondaryArchSuffix - lib:libLLVM_6.0$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " -CONFLICTS_clang=" - llvm${secondaryArchSuffix}_clang - " - -PROVIDES_clang_analysis=" - llvm6${secondaryArchSuffix}_clang_analysis = $portVersion - cmd:c++_analyzer = $portVersion - cmd:ccc_analyzer = $portVersion - cmd:scan_build = $portVersion - cmd:scan_view = $portVersion - " -REQUIRES_clang_analysis=" - llvm6${secondaryArchSuffix}_clang == $portVersion base - cmd:python - " -CONFLICTS_clang_analysis=" - llvm${secondaryArchSuffix}_clang_analysis - " - -PROVIDES_libs=" - llvm6${secondaryArchSuffix}_libs = $portVersion - lib:libLLVM_6.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:ninja - 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}\"" - cmakeFlags="$cmakeFlags -DLLVM_LIBDIR_SUFFIX=/${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 \ - -DLLVM_ENABLE_BUILD_TESTS=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 $libDir - - 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 - 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 - export LIBRARY_PATH=$LIBRARY_PATH:$sourceDir/build/lib - export LIT_ARGS="-v" - make check-llvm -} diff --git a/sys-devel/llvm/llvm7-7.0.1.recipe b/sys-devel/llvm/llvm7-7.0.1.recipe deleted file mode 100644 index d6530039a..000000000 --- a/sys-devel/llvm/llvm7-7.0.1.recipe +++ /dev/null @@ -1,516 +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-2018 University of Illinois at Urbana-Champaign" -LICENSE="UIUC" -REVISION="2" -SOURCE_URI="https://releases.llvm.org/$portVersion/llvm-$portVersion.src.tar.xz" -CHECKSUM_SHA256="a38dfc4db47102ec79dcc2aa61e93722c5f6f06f0a961073bd84b78fb949419b" -SOURCE_DIR="llvm-$portVersion.src" -SOURCE_URI_2="https://releases.llvm.org/$portVersion/cfe-$portVersion.src.tar.xz" -CHECKSUM_SHA256_2="a45b62dde5d7d5fdcdfa876b0af92f164d434b06e9e89b5d0b1cbc65dfe3f418" -SOURCE_DIR_2="cfe-$portVersion.src" -SOURCE_URI_3="https://releases.llvm.org/$portVersion/clang-tools-extra-$portVersion.src.tar.xz" -CHECKSUM_SHA256_3="4c93c7d2bb07923a8b272da3ef7914438080aeb693725f4fc5c19cd0e2613bed" -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="782edfc119ee172f169c91dd79f2c964fb6b248bd9b73523149030ed505bbe18" -SOURCE_DIR_4="compiler-rt-$portVersion.src" -PATCHES="llvm-$portVersion.patchset" -PATCHES_2="clang-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2 ?x86" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - llvm7$secondaryArchSuffix = $portVersion compat >= 7 - cmd:bugpoint - cmd:diagtool - cmd:dsymutil - cmd:find_all_symbols - cmd:hmaptool - cmd:llc - cmd:lli - cmd:llvm_ar - cmd:llvm_as - cmd:llvm_bcanalyzer - cmd:llvm_c_test - cmd:llvm_cat - cmd:llvm_cfi_verify - cmd:llvm_config = $portVersion compat >= 7 - cmd:llvm_cov - cmd:llvm_cvtres - cmd:llvm_cxxdump - cmd:llvm_cxxfilt - cmd:llvm_diff - cmd:llvm_dis - cmd:llvm_dlltool - cmd:llvm_dwarfdump - cmd:llvm_dwp - cmd:llvm_exegesis - cmd:llvm_extract - cmd:llvm_lib - cmd:llvm_link - cmd:llvm_lto - cmd:llvm_lto2 - cmd:llvm_mc - cmd:llvm_mca - cmd:llvm_modextract - cmd:llvm_mt - cmd:llvm_nm - cmd:llvm_objcopy - cmd:llvm_objdump - cmd:llvm_opt_report - 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_strip - cmd:llvm_symbolizer - cmd:llvm_tblgen - cmd:llvm_undname - cmd:llvm_xray - cmd:obj2yaml - cmd:opt - cmd:sancov - cmd:sanstats - cmd:verify_uselistorder - cmd:yaml2obj - devel:libfindAllSymbols$secondaryArchSuffix - devel:libLLVM$secondaryArchSuffix = $portVersion compat >= 7 - devel:libLLVM_$portVersion$secondaryArchSuffix = $portVersion compat >= 7 - devel:libLLVM_7$secondaryArchSuffix = $portVersion compat >= 7 - devel:libLLVMAArch64AsmParser$secondaryArchSuffix - devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix - devel:libLLVMAArch64CodeGen$secondaryArchSuffix - devel:libLLVMAArch64Desc$secondaryArchSuffix - devel:libLLVMAArch64Disassembler$secondaryArchSuffix - devel:libLLVMAArch64Info$secondaryArchSuffix - devel:libLLVMAArch64Utils$secondaryArchSuffix - devel:libLLVMAggressiveInstCombine$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: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: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 = $portVersion compat >= 7 - lib:BugpointPasses$secondaryArchSuffix - lib:LLVMHello$secondaryArchSuffix - lib:testplugin$secondaryArchSuffix - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libLLVM_7$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " -CONFLICTS=" - llvm$secondaryArchSuffix - llvm6$secondaryArchSuffix - " - -PROVIDES_clang=" - llvm7${secondaryArchSuffix}_clang = $portVersion - cmd:c_index_test = $portVersion - cmd:clang = $portVersion - cmd:clang++ = $portVersion - cmd:clang_7 = $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_func_mapping = $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 compat >= 7 - 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:libclangcrosstu$secondaryArchSuffix = $portVersion - devel:libclangdaemon$secondaryArchSuffix = $portVersion - devel:libclangdoc$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:libclanghandlecxx$secondaryArchSuffix = $portVersion - devel:libclanghandlellvm$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: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:libclangtidyabseilmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyandroidmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyboostmodule$secondaryArchSuffix = $portVersion - devel:libclangtidybugpronemodule$secondaryArchSuffix = $portVersion - devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion - devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyfuchsiamodule$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:libclangtidyobjcmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion - devel:libclangtidyplugin$secondaryArchSuffix = $portVersion - devel:libclangtidyportabilitymodule$secondaryArchSuffix = $portVersion - devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion - devel:libclangtidyutils$secondaryArchSuffix = $portVersion - devel:libclangtidyzirconmodule$secondaryArchSuffix = $portVersion - devel:libclangtooling$secondaryArchSuffix = $portVersion - devel:libclangtoolingastdiff$secondaryArchSuffix = $portVersion - devel:libclangtoolingcore$secondaryArchSuffix = $portVersion - devel:libclangtoolinginclusions$secondaryArchSuffix = $portVersion - devel:libclangtoolingrefactor$secondaryArchSuffix = $portVersion - " -REQUIRES_clang=" - haiku$secondaryArchSuffix - lib:libclang$secondaryArchSuffix - lib:libLLVM_7$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " -CONFLICTS_clang=" - llvm${secondaryArchSuffix}_clang - llvm6${secondaryArchSuffix}_clang - " - -PROVIDES_clang_analysis=" - llvm7${secondaryArchSuffix}_clang_analysis = $portVersion - cmd:c++_analyzer = $portVersion - cmd:ccc_analyzer = $portVersion - cmd:scan_build = $portVersion - cmd:scan_view = $portVersion - " -REQUIRES_clang_analysis=" - llvm7${secondaryArchSuffix}_clang == $portVersion base - cmd:python - " -CONFLICTS_clang_analysis=" - llvm${secondaryArchSuffix}_clang_analysis - llvm6${secondaryArchSuffix}_clang_analysis - " - -PROVIDES_libs=" - llvm7${secondaryArchSuffix}_libs = $portVersion - lib:libclang$secondaryArchSuffix = $portVersion compat >= 7 - lib:libLLVM_7$secondaryArchSuffix = 7.0.0 compat >= 7.0 - lib:libLTO$secondaryArchSuffix = 7.0.0 compat >= 7 - " -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:ninja - 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}\"" - cmakeFlags="$cmakeFlags -DLLVM_LIBDIR_SUFFIX=/${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 \ - -DLLVM_ENABLE_BUILD_TESTS=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 $libDir - - 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 - 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/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/libclang* \ - $libDir/libLLVM* \ - $libDir/libLTO* -} - -TEST() -{ - cd build - export LIBRARY_PATH=$LIBRARY_PATH:$sourceDir/build/lib - export LIT_ARGS="-v" - make check-llvm -} diff --git a/sys-devel/llvm/llvm8-8.0.0.recipe b/sys-devel/llvm/llvm8-8.0.0.recipe deleted file mode 100644 index 43868cd34..000000000 --- a/sys-devel/llvm/llvm8-8.0.0.recipe +++ /dev/null @@ -1,537 +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-2018 University of Illinois at Urbana-Champaign" -LICENSE="UIUC" -REVISION="1" -SOURCE_URI="https://releases.llvm.org/$portVersion/llvm-$portVersion.src.tar.xz" -CHECKSUM_SHA256="8872be1b12c61450cacc82b3d153eab02be2546ef34fa3580ed14137bb26224c" -SOURCE_DIR="llvm-$portVersion.src" -SOURCE_URI_2="https://releases.llvm.org/$portVersion/cfe-$portVersion.src.tar.xz" -CHECKSUM_SHA256_2="084c115aab0084e63b23eee8c233abb6739c399e29966eaeccfc6e088e0b736b" -SOURCE_DIR_2="cfe-$portVersion.src" -SOURCE_URI_3="https://releases.llvm.org/$portVersion/clang-tools-extra-$portVersion.src.tar.xz" -CHECKSUM_SHA256_3="4f00122be408a7482f2004bcf215720d2b88cf8dc78b824abb225da8ad359d4b" -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="b435c7474f459e71b2831f1a4e3f1d21203cb9c0172e94e9d9b69f50354f21b1" -SOURCE_DIR_4="compiler-rt-$portVersion.src" -PATCHES="llvm-$portVersion.patchset" -PATCHES_2="clang-$portVersion.patchset" - -ARCHITECTURES="all !x86_gcc2 ?x86" -SECONDARY_ARCHITECTURES="?x86" - -PROVIDES=" - llvm8$secondaryArchSuffix = $portVersion compat >= 8 - cmd:bugpoint - cmd:diagtool - cmd:dsymutil - cmd:find_all_symbols - cmd:hmaptool - cmd:llc - cmd:lli - cmd:llvm_ar - cmd:llvm_as - cmd:llvm_bcanalyzer - cmd:llvm_c_test - cmd:llvm_cat - cmd:llvm_cfi_verify - cmd:llvm_config = $portVersion compat >= 8 - cmd:llvm_cov - cmd:llvm_cvtres - cmd:llvm_cxxdump - cmd:llvm_cxxfilt - cmd:llvm_cxxmap - cmd:llvm_diff - cmd:llvm_dis - cmd:llvm_dlltool - cmd:llvm_dwarfdump - cmd:llvm_dwp - cmd:llvm_elfabi - cmd:llvm_exegesis - cmd:llvm_extract - cmd:llvm_lib - cmd:llvm_link - cmd:llvm_lto - cmd:llvm_lto2 - cmd:llvm_mc - cmd:llvm_mca - cmd:llvm_modextract - cmd:llvm_mt - cmd:llvm_nm - cmd:llvm_objcopy - cmd:llvm_objdump - cmd:llvm_opt_report - 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_strip - cmd:llvm_symbolizer - cmd:llvm_tblgen - cmd:llvm_undname - cmd:llvm_xray - cmd:obj2yaml - cmd:opt - cmd:sancov - cmd:sanstats - cmd:verify_uselistorder - cmd:yaml2obj - devel:libfindAllSymbols$secondaryArchSuffix - devel:libLLVM$secondaryArchSuffix = $portVersion compat >= 8 - devel:libLLVM_$portVersion$secondaryArchSuffix = $portVersion compat >= 8 - devel:libLLVM_8$secondaryArchSuffix = $portVersion compat >= 8 - devel:libLLVMAArch64AsmParser$secondaryArchSuffix - devel:libLLVMAArch64AsmPrinter$secondaryArchSuffix - devel:libLLVMAArch64CodeGen$secondaryArchSuffix - devel:libLLVMAArch64Desc$secondaryArchSuffix - devel:libLLVMAArch64Disassembler$secondaryArchSuffix - devel:libLLVMAArch64Info$secondaryArchSuffix - devel:libLLVMAArch64Utils$secondaryArchSuffix - devel:libLLVMAggressiveInstCombine$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:libLLVMLibDriver$secondaryArchSuffix - devel:libLLVMLineEditor$secondaryArchSuffix - devel:libLLVMLinker$secondaryArchSuffix - devel:libLLVMLTO$secondaryArchSuffix - devel:libLLVMMC$secondaryArchSuffix - devel:libLLVMMCA$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:libLLVMMSP430AsmParser$secondaryArchSuffix - devel:libLLVMMSP430AsmPrinter$secondaryArchSuffix - devel:libLLVMMSP430CodeGen$secondaryArchSuffix - devel:libLLVMMSP430Desc$secondaryArchSuffix - devel:libLLVMMSP430Disassembler$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:libLLVMOptRemarks$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:libLLVMTextAPI$secondaryArchSuffix - devel:libLLVMTransformUtils$secondaryArchSuffix - devel:libLLVMVectorize$secondaryArchSuffix - devel:libLLVMWebAssemblyAsmParser$secondaryArchSuffix - devel:libLLVMWebAssemblyAsmPrinter$secondaryArchSuffix - devel:libLLVMWebAssemblyCodeGen$secondaryArchSuffix - devel:libLLVMWebAssemblyDesc$secondaryArchSuffix - devel:libLLVMWebAssemblyDisassembler$secondaryArchSuffix - devel:libLLVMWebAssemblyInfo$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 = $portVersion compat >= 8 - devel:libOptRemarks$secondaryArchSuffix = 8.0.0 compat >= 8 - lib:BugpointPasses$secondaryArchSuffix - lib:LLVMHello$secondaryArchSuffix - lib:testplugin$secondaryArchSuffix - " -REQUIRES=" - haiku$secondaryArchSuffix - lib:libLLVM_8$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " -CONFLICTS=" - llvm$secondaryArchSuffix - llvm6$secondaryArchSuffix - llvm7$secondaryArchSuffix - " - -PROVIDES_clang=" - llvm8${secondaryArchSuffix}_clang = $portVersion - cmd:c_index_test = $portVersion - cmd:clang = $portVersion - cmd:clang++ = $portVersion - cmd:clang_8 = $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_extdef_mapping = $portVersion - cmd:clang_format = $portVersion - cmd:clang_func_mapping = $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 compat >= 8 - 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:libclangcrosstu$secondaryArchSuffix = $portVersion - devel:libclangdaemon$secondaryArchSuffix = $portVersion - devel:libclangdoc$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:libclanghandlecxx$secondaryArchSuffix = $portVersion - devel:libclanghandlellvm$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: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:libclangtidyabseilmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyandroidmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyboostmodule$secondaryArchSuffix = $portVersion - devel:libclangtidybugpronemodule$secondaryArchSuffix = $portVersion - devel:libclangtidycertmodule$secondaryArchSuffix = $portVersion - devel:libclangtidycppcoreguidelinesmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyfuchsiamodule$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:libclangtidyobjcmodule$secondaryArchSuffix = $portVersion - devel:libclangtidyperformancemodule$secondaryArchSuffix = $portVersion - devel:libclangtidyplugin$secondaryArchSuffix = $portVersion - devel:libclangtidyportabilitymodule$secondaryArchSuffix = $portVersion - devel:libclangtidyreadabilitymodule$secondaryArchSuffix = $portVersion - devel:libclangtidyutils$secondaryArchSuffix = $portVersion - devel:libclangtidyzirconmodule$secondaryArchSuffix = $portVersion - devel:libclangtooling$secondaryArchSuffix = $portVersion - devel:libclangtoolingastdiff$secondaryArchSuffix = $portVersion - devel:libclangtoolingcore$secondaryArchSuffix = $portVersion - devel:libclangtoolinginclusions$secondaryArchSuffix = $portVersion - devel:libclangtoolingrefactor$secondaryArchSuffix = $portVersion - " -REQUIRES_clang=" - haiku$secondaryArchSuffix - lib:libclang$secondaryArchSuffix - lib:libLLVM_8$secondaryArchSuffix - lib:libz$secondaryArchSuffix - " -CONFLICTS_clang=" - llvm${secondaryArchSuffix}_clang - llvm6${secondaryArchSuffix}_clang - llvm7${secondaryArchSuffix}_clang - " - -PROVIDES_clang_analysis=" - llvm8${secondaryArchSuffix}_clang_analysis = $portVersion - cmd:c++_analyzer = $portVersion - cmd:ccc_analyzer = $portVersion - cmd:scan_build = $portVersion - cmd:scan_view = $portVersion - " -REQUIRES_clang_analysis=" - llvm8${secondaryArchSuffix}_clang == $portVersion base - cmd:python - " -CONFLICTS_clang_analysis=" - llvm${secondaryArchSuffix}_clang_analysis - llvm6${secondaryArchSuffix}_clang_analysis - llvm7${secondaryArchSuffix}_clang_analysis - " - -PROVIDES_libs=" - llvm8${secondaryArchSuffix}_libs = $portVersion - lib:libclang$secondaryArchSuffix = $portVersion compat >= 8 - lib:libLLVM_8$secondaryArchSuffix = 8.0.0 compat >= 8.0 - lib:libLTO$secondaryArchSuffix = 8.0.0 compat >= 8 - lib:libOptRemarks$secondaryArchSuffix = 8.0.0 compat >= 8 - " -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:ninja - 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}\"" - cmakeFlags="$cmakeFlags -DLLVM_LIBDIR_SUFFIX=/${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 \ - -DLLVM_ENABLE_BUILD_TESTS=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 $libDir - - 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 - 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* \ - libOptRemarks - - 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/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/libclang* \ - $libDir/libLLVM* \ - $libDir/libLTO* \ - $libDir/libOptRemarks* -} - -TEST() -{ - cd build - export LIBRARY_PATH=$LIBRARY_PATH:$sourceDir/build/lib - export LIT_ARGS="-v" - make check-llvm -} diff --git a/sys-devel/llvm/patches/clang-5.0.0.patchset b/sys-devel/llvm/patches/clang-5.0.0.patchset deleted file mode 100644 index 395728af1..000000000 --- a/sys-devel/llvm/patches/clang-5.0.0.patchset +++ /dev/null @@ -1,198 +0,0 @@ -From c4c6ca93bb942b351dba3492420251d0a95b3e1f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -Date: Mon, 18 Jul 2016 14:13:19 +0200 -Subject: support for secondary arch. - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2667b1d..92b6f7a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -387,6 +387,10 @@ if(CLANG_ANALYZER_BUILD_Z3) - message(FATAL_ERROR "Cannot find Z3 header file or shared library") - endif() - endif() -+if(DEFINED HAIKU_HYBRID_SECONDARY) -+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY}) -+endif() -+ - - if(CLANG_ENABLE_ARCMT) - set(CLANG_ENABLE_OBJC_REWRITER ON) -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 1d7c8a0..e8ccd4e 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.14.2 - - -From 0d61fcd6b1c27258753303a630b3cc99c126b969 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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.14.2 - - -From 901fbf16d7c1281f3104574853622b7e3e01f6b0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -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.cpp b/lib/Basic/Targets.cpp -index 5d75aa5..47b4e07 100644 ---- a/lib/Basic/Targets.cpp -+++ b/lib/Basic/Targets.cpp -@@ -436,8 +436,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.14.2 - - -From aad43660c2aee5827862e63518c9d40b33a0f4fa Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sat, 11 Nov 2017 14:32:45 +0100 -Subject: Haiku: default to PIC - - -diff --git a/lib/Driver/ToolChains/Haiku.h b/lib/Driver/ToolChains/Haiku.h -index ccd851f..df98cd6 100644 ---- a/lib/Driver/ToolChains/Haiku.h -+++ b/lib/Driver/ToolChains/Haiku.h -@@ -25,6 +25,8 @@ public: - - bool isPIEDefault() const override { return false; } - -+ bool isPICDefault() const override { return true; } -+ - std::string findLibCxxIncludePath() const override; - void addLibStdCxxIncludePaths( - const llvm::opt::ArgList &DriverArgs, --- -2.14.2 - diff --git a/sys-devel/llvm/patches/clang-6.0.1.patchset b/sys-devel/llvm/patches/clang-6.0.1.patchset deleted file mode 100644 index 8420874a2..000000000 --- a/sys-devel/llvm/patches/clang-6.0.1.patchset +++ /dev/null @@ -1,229 +0,0 @@ -From 2224160e6b72457a3b386f412831f48c21710bf3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -Date: Mon, 18 Jul 2016 14:13:19 +0200 -Subject: support for secondary arch. - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2eee8e6..1a3b180 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -402,6 +402,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 8c6face..4c04668 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, 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.19.1 - - -From 01c867dbd8530f5531532cba7d07f1e3e47f38c5 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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.19.1 - - -From c889c9ad0249e680afd209729ee87259f78f59c3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -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 5af6361..790732b 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.19.1 - - -From 90022e621a8d44fd7f3d865f34568cb2c9213ad5 Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Wed, 24 Oct 2018 10:47:00 +0100 -Subject: clang: Enable float128 support in clang with tests. - - -diff --git a/lib/Basic/Targets/OSTargets.h b/lib/Basic/Targets/OSTargets.h -index 790732b..11692b6 100644 ---- a/lib/Basic/Targets/OSTargets.h -+++ b/lib/Basic/Targets/OSTargets.h -@@ -251,6 +251,10 @@ protected: - Builder.defineMacro("__HAIKU__"); - Builder.defineMacro("__ELF__"); - DefineStd(Builder, "unix", Opts); -+ if (this->HasFloat128) { -+ Builder.defineMacro("__FLOAT128__"); -+ Builder.defineMacro("_GLIBCXX_USE_FLOAT128"); -+ } - } - - public: -@@ -260,6 +264,14 @@ public: - this->IntPtrType = TargetInfo::SignedLong; - this->PtrDiffType = TargetInfo::SignedLong; - this->ProcessIDType = TargetInfo::SignedLong; -+ switch (Triple.getArch()) { -+ default: -+ break; -+ case llvm::Triple::x86: -+ case llvm::Triple::x86_64: -+ this->HasFloat128 = true; -+ break; -+ } - } - }; - -diff --git a/test/CodeGenCXX/float128-declarations.cpp b/test/CodeGenCXX/float128-declarations.cpp -index f1db8f4..11a49c9 100644 ---- a/test/CodeGenCXX/float128-declarations.cpp -+++ b/test/CodeGenCXX/float128-declarations.cpp -@@ -12,6 +12,10 @@ - // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 - // RUN: %clang_cc1 -emit-llvm -triple amd64-pc-openbsd -std=c++11 \ - // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 -+// RUN: %clang_cc1 -emit-llvm -triple i586-pc-haiku -std=c++11 \ -+// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 -+// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-haiku -std=c++11 \ -+// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 - // - /* Various contexts where type __float128 can appear. The different check - prefixes are due to different mangling on X86 and different calling --- -2.19.1 - diff --git a/sys-devel/llvm/patches/clang-7.0.1.patchset b/sys-devel/llvm/patches/clang-7.0.1.patchset deleted file mode 100644 index 156f41dbd..000000000 --- a/sys-devel/llvm/patches/clang-7.0.1.patchset +++ /dev/null @@ -1,229 +0,0 @@ -From d6de87bba8dd243cdf649785f709363462de1d51 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -Date: Mon, 18 Jul 2016 14:13:19 +0200 -Subject: support for secondary arch. - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 52b8819..54fe8fd 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -411,6 +411,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 12461ec..643b62b 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 - } - - void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, -@@ -30,6 +37,12 @@ void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, - - 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 8a70404..c80c3da 100644 ---- a/lib/Frontend/InitHeaderSearch.cpp -+++ b/lib/Frontend/InitHeaderSearch.cpp -@@ -238,7 +238,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, Clang, Ver); -+#else - SmallString<128> P = StringRef(HSOpts.ResourceDir); -+#endif -+ - llvm::sys::path::append(P, "include"); - AddUnmappedPath(P, ExternCSystem, false); - } -@@ -272,7 +285,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); -@@ -304,6 +322,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.19.1 - - -From c23d8bc4ba199a2ee2171407a164889af480a911 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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.19.1 - - -From 8ce6ce6dfde5419b126572cc07d0b05a642a55c2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -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 d035478..d373382 100644 ---- a/lib/Basic/Targets/OSTargets.h -+++ b/lib/Basic/Targets/OSTargets.h -@@ -266,7 +266,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 a12a48e..9f6eb52 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; } - - void addLibCxxIncludePaths( - const llvm::opt::ArgList &DriverArgs, --- -2.19.1 - - -From 970c902cea0d3b31148586ef6901f781c0b3e880 Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sat, 20 Oct 2018 23:45:16 +0100 -Subject: clang: Enable float128 support in clang with tests. - - -diff --git a/lib/Basic/Targets/OSTargets.h b/lib/Basic/Targets/OSTargets.h -index d373382..0033560 100644 ---- a/lib/Basic/Targets/OSTargets.h -+++ b/lib/Basic/Targets/OSTargets.h -@@ -257,6 +257,10 @@ protected: - Builder.defineMacro("__HAIKU__"); - Builder.defineMacro("__ELF__"); - DefineStd(Builder, "unix", Opts); -+ if (this->HasFloat128) { -+ Builder.defineMacro("__FLOAT128__"); -+ Builder.defineMacro("_GLIBCXX_USE_FLOAT128"); -+ } - } - - public: -@@ -266,6 +270,14 @@ public: - this->IntPtrType = TargetInfo::SignedLong; - this->PtrDiffType = TargetInfo::SignedLong; - this->ProcessIDType = TargetInfo::SignedLong; -+ switch (Triple.getArch()) { -+ default: -+ break; -+ case llvm::Triple::x86: -+ case llvm::Triple::x86_64: -+ this->HasFloat128 = true; -+ break; -+ } - } - }; - -diff --git a/test/CodeGenCXX/float128-declarations.cpp b/test/CodeGenCXX/float128-declarations.cpp -index 07e73b2..c5a8c52 100644 ---- a/test/CodeGenCXX/float128-declarations.cpp -+++ b/test/CodeGenCXX/float128-declarations.cpp -@@ -16,6 +16,10 @@ - // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 - // RUN: %clang_cc1 -emit-llvm -triple x86_64-pc-solaris2.11 -std=c++11 \ - // RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 -+// RUN: %clang_cc1 -emit-llvm -triple i586-pc-haiku -std=c++11 \ -+// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 -+// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-haiku -std=c++11 \ -+// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86 - // - /* Various contexts where type __float128 can appear. The different check - prefixes are due to different mangling on X86 and different calling --- -2.19.1 - diff --git a/sys-devel/llvm/patches/clang-8.0.0.patchset b/sys-devel/llvm/patches/clang-8.0.0.patchset deleted file mode 100644 index e1c8a9c5c..000000000 --- a/sys-devel/llvm/patches/clang-8.0.0.patchset +++ /dev/null @@ -1,198 +0,0 @@ -From 232161b64d10cea8caeb70c4e91479506d912fab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -Date: Mon, 18 Jul 2016 14:13:19 +0200 -Subject: support for secondary arch. - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c2016a4..d7a6533 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -420,6 +420,10 @@ if (CLANG_ANALYZER_Z3_INSTALL_DIR) - message(FATAL_ERROR "Z3 4.7.1 has not been found in CLANG_ANALYZER_Z3_INSTALL_DIR: ${CLANG_ANALYZER_Z3_INSTALL_DIR}.") - endif() - endif() -+if(DEFINED HAIKU_HYBRID_SECONDARY) -+ add_definitions(-DHAIKU_HYBRID_SECONDARY=${HAIKU_HYBRID_SECONDARY}) -+endif() -+ - - set(CLANG_ANALYZER_ENABLE_Z3_SOLVER_DEFAULT "${Z3_FOUND}") - -diff --git a/lib/Driver/ToolChains/Haiku.cpp b/lib/Driver/ToolChains/Haiku.cpp -index 12461ec..643b62b 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 - } - - void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, -@@ -30,6 +37,12 @@ void Haiku::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, - - 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 67842b5..f80bbc2 100644 ---- a/lib/Frontend/InitHeaderSearch.cpp -+++ b/lib/Frontend/InitHeaderSearch.cpp -@@ -238,7 +238,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, Clang, Ver); -+#else - SmallString<128> P = StringRef(HSOpts.ResourceDir); -+#endif -+ - llvm::sys::path::append(P, "include"); - AddUnmappedPath(P, ExternCSystem, false); - } -@@ -273,7 +286,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); -@@ -305,6 +323,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.19.1 - - -From 24a5b1a303ef3b899d5c30f833e0ae69a1b4814a Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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.19.1 - - -From 7563792bf072390c88e77df5776a936390ceb8fc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= -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 09867d8..7741410 100644 ---- a/lib/Basic/Targets/OSTargets.h -+++ b/lib/Basic/Targets/OSTargets.h -@@ -277,7 +277,6 @@ public: - this->IntPtrType = TargetInfo::SignedLong; - this->PtrDiffType = TargetInfo::SignedLong; - this->ProcessIDType = TargetInfo::SignedLong; -- this->TLSSupported = false; - switch (Triple.getArch()) { - default: - break; -diff --git a/lib/Driver/ToolChains/Haiku.h b/lib/Driver/ToolChains/Haiku.h -index a12a48e..9f6eb52 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; } - - void addLibCxxIncludePaths( - const llvm::opt::ArgList &DriverArgs, --- -2.19.1 - - -From 0caa55b50e4916e84eb3a2fb6e3836930092a077 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Tue, 12 Mar 2019 21:08:57 +0100 -Subject: sysexits.h requires _BSD_SOURCE on Haiku beta1. - - -diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp -index a784e21..448639f 100644 ---- a/lib/Driver/Driver.cpp -+++ b/lib/Driver/Driver.cpp -@@ -83,6 +83,9 @@ - #include - #if LLVM_ON_UNIX - #include // getpid -+#ifdef __HAIKU__ -+#define _BSD_SOURCE -+#endif - #include // EX_IOERR - #endif - --- -2.19.1 - diff --git a/sys-devel/llvm/patches/llvm-5.0.0.patchset b/sys-devel/llvm/patches/llvm-5.0.0.patchset deleted file mode 100644 index 5b0a89bbf..000000000 --- a/sys-devel/llvm/patches/llvm-5.0.0.patchset +++ /dev/null @@ -1,126 +0,0 @@ -From 53e2eb5ceae404e8a6d1f7b0d49156adcd4eff53 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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..739213c 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 +561,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.28.0 - - -From 067ab4ceab5dea9125e33cb24f3c3bda04f85b1d Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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 45097eb..1790a0a 100644 ---- a/lib/Support/Unix/Path.inc -+++ b/lib/Support/Unix/Path.inc -@@ -381,6 +381,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.28.0 - - -From 03fdaf9dbfadbe7b708dcb9e6fdbeb8dc5db04ff Mon Sep 17 00:00:00 2001 -From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Thu, 7 Jun 2018 21:43:47 +1000 -Subject: Fix header dir suffix - - -diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index 739213c..ab7b46c 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -333,7 +333,7 @@ int main(int argc, char **argv) { - } else { - ActivePrefix = CurrentExecPrefix; - #ifdef __HAIKU__ -- ActiveIncludeDir = ActivePrefix + "/develop/headers"; -+ ActiveIncludeDir = ActivePrefix + "/develop/headers" + LLVM_LIBDIR_SUFFIX; - ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX; - #else - ActiveIncludeDir = ActivePrefix + "/include"; --- -2.28.0 - - -From 1f728f5ace9298bd0e6b481e83e2634a5505cbe2 Mon Sep 17 00:00:00 2001 -From: begasus -Date: Mon, 21 Dec 2020 18:10:43 +0000 -Subject: Fix building with gcc8 - -Taken from https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2deb2d52d186165bf0d2d45405438e91f6a9a6de - -diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h -index da02250..bed472e 100644 ---- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h -+++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h -@@ -713,8 +713,8 @@ private: - - uint32_t getTrampolineSize() const { return RemoteTrampolineSize; } - -- Expected> readMem(char *Dst, JITTargetAddress Src, -- uint64_t Size) { -+ Expected> readMem(char *Dst, JITTargetAddress Src, -+ uint64_t Size) { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); --- -2.28.0 - diff --git a/sys-devel/llvm/patches/llvm-6.0.1.patchset b/sys-devel/llvm/patches/llvm-6.0.1.patchset deleted file mode 100644 index b3a334c5e..000000000 --- a/sys-devel/llvm/patches/llvm-6.0.1.patchset +++ /dev/null @@ -1,124 +0,0 @@ -From d50678784604cce370b98050e5eb2792610c71b9 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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..739213c 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 +561,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.16.4 - - -From 4e37cee8e89f8a130a42b1db3dfb486770975fae Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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 2ecb973..4fe5bda 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.16.4 - - -From efb68990c8752383520ccb6987a98a10aba076c5 Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 9 Sep 2018 16:11:42 +0100 -Subject: import header dir suffix patch from 3dEyes. - - -diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index 739213c..ab7b46c 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -333,7 +333,7 @@ int main(int argc, char **argv) { - } else { - ActivePrefix = CurrentExecPrefix; - #ifdef __HAIKU__ -- ActiveIncludeDir = ActivePrefix + "/develop/headers"; -+ ActiveIncludeDir = ActivePrefix + "/develop/headers" + LLVM_LIBDIR_SUFFIX; - ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX; - #else - ActiveIncludeDir = ActivePrefix + "/include"; --- -2.16.4 - - -From 6032d781e41b460855fccb25cafeebb5985687c3 Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 9 Sep 2018 16:17:33 +0100 -Subject: llvm: allow llvm gtests to build on Haiku. - - -diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/utils/unittest/googletest/include/gtest/internal/gtest-port.h -index d36e820..e6dbb2d 100644 ---- a/utils/unittest/googletest/include/gtest/internal/gtest-port.h -+++ b/utils/unittest/googletest/include/gtest/internal/gtest-port.h -@@ -793,7 +793,8 @@ using ::std::tuple_size; - (GTEST_OS_MAC && !GTEST_OS_IOS) || \ - (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ - GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ -- GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD) -+ GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD \ -+ || GTEST_OS_HAIKU) - # define GTEST_HAS_DEATH_TEST 1 - #endif - --- -2.16.4 - diff --git a/sys-devel/llvm/patches/llvm-7.0.1.patchset b/sys-devel/llvm/patches/llvm-7.0.1.patchset deleted file mode 100644 index 63752b10f..000000000 --- a/sys-devel/llvm/patches/llvm-7.0.1.patchset +++ /dev/null @@ -1,100 +0,0 @@ -From fc04fa4da521a34685b4b47955533b9b0b23502c Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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 892adc3..c7d458b 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -333,11 +333,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; - } -@@ -557,10 +562,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.19.0 - - -From 794ef1780b5ce41f7b1d3580de7c25ac5fc41c0e Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 9 Sep 2018 16:11:42 +0100 -Subject: import header dir suffix patch from 3dEyes. - - -diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index c7d458b..1466ced 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -334,7 +334,7 @@ int main(int argc, char **argv) { - } else { - ActivePrefix = CurrentExecPrefix; - #ifdef __HAIKU__ -- ActiveIncludeDir = ActivePrefix + "/develop/headers"; -+ ActiveIncludeDir = ActivePrefix + "/develop/headers" + LLVM_LIBDIR_SUFFIX; - ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX; - #else - ActiveIncludeDir = ActivePrefix + "/include"; --- -2.19.0 - - -From 6ea7bafd02033fede16964fab563808ba035ae86 Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 9 Sep 2018 16:17:33 +0100 -Subject: llvm: allow llvm gtests to build on Haiku. - - -diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/utils/unittest/googletest/include/gtest/internal/gtest-port.h -index d36e820..e6dbb2d 100644 ---- a/utils/unittest/googletest/include/gtest/internal/gtest-port.h -+++ b/utils/unittest/googletest/include/gtest/internal/gtest-port.h -@@ -793,7 +793,8 @@ using ::std::tuple_size; - (GTEST_OS_MAC && !GTEST_OS_IOS) || \ - (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ - GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ -- GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD) -+ GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD \ -+ || GTEST_OS_HAIKU) - # define GTEST_HAS_DEATH_TEST 1 - #endif - --- -2.19.0 - diff --git a/sys-devel/llvm/patches/llvm-8.0.0.patchset b/sys-devel/llvm/patches/llvm-8.0.0.patchset deleted file mode 100644 index f92300649..000000000 --- a/sys-devel/llvm/patches/llvm-8.0.0.patchset +++ /dev/null @@ -1,124 +0,0 @@ -From eb6f95dbed91c4a8cb219db19d98ba1d95038743 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -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 bec89fe..1444561 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -333,11 +333,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; - } -@@ -557,10 +562,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.19.1 - - -From 3411cf7727e15f692d7d310e6e37405ed695010a Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 9 Sep 2018 16:11:42 +0100 -Subject: import header dir suffix patch from 3dEyes. - - -diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp -index 1444561..8ad7737 100644 ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp -@@ -334,7 +334,7 @@ int main(int argc, char **argv) { - } else { - ActivePrefix = CurrentExecPrefix; - #ifdef __HAIKU__ -- ActiveIncludeDir = ActivePrefix + "/develop/headers"; -+ ActiveIncludeDir = ActivePrefix + "/develop/headers" + LLVM_LIBDIR_SUFFIX; - ActiveLibDir = ActivePrefix + "/develop/lib" + LLVM_LIBDIR_SUFFIX; - #else - ActiveIncludeDir = ActivePrefix + "/include"; --- -2.19.1 - - -From 0cac6f3dfad3612a67d35cb39812ebf5a8671e4d Mon Sep 17 00:00:00 2001 -From: Calvin Hill -Date: Sun, 9 Sep 2018 16:17:33 +0100 -Subject: llvm: allow llvm gtests to build on Haiku. - - -diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/utils/unittest/googletest/include/gtest/internal/gtest-port.h -index d36e820..e6dbb2d 100644 ---- a/utils/unittest/googletest/include/gtest/internal/gtest-port.h -+++ b/utils/unittest/googletest/include/gtest/internal/gtest-port.h -@@ -793,7 +793,8 @@ using ::std::tuple_size; - (GTEST_OS_MAC && !GTEST_OS_IOS) || \ - (GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \ - GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \ -- GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD) -+ GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || GTEST_OS_NETBSD \ -+ || GTEST_OS_HAIKU) - # define GTEST_HAS_DEATH_TEST 1 - #endif - --- -2.19.1 - - -From 1f239330031656ea71da77b52194ef3f48b94e22 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Tue, 12 Mar 2019 21:01:42 +0100 -Subject: llvm: sysexits.h requires _BSD_SOURCE on Haiku beta1. - - -diff --git a/lib/Support/Unix/Signals.inc b/lib/Support/Unix/Signals.inc -index ad88d5e..13f8535 100644 ---- a/lib/Support/Unix/Signals.inc -+++ b/lib/Support/Unix/Signals.inc -@@ -47,6 +47,9 @@ - #include "llvm/Support/raw_ostream.h" - #include - #include -+#ifdef __HAIKU__ -+#define _BSD_SOURCE -+#endif - #include - #ifdef HAVE_BACKTRACE - # include BACKTRACE_HEADER // For backtrace(). --- -2.19.1 -