pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/llvm



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Wed Aug 24 14:38:56 UTC 2022

Modified Files:
        pkgsrc/lang/llvm: Makefile PLIST options.mk version.mk

Log Message:
llvm: Add option for experimental targets, arc, csky, m68k and ve

* Enable the experimental targets for faster architectures only.
  And bump PKGREVISION.
* Add some helper for PLIST generation.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 pkgsrc/lang/llvm/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/lang/llvm/PLIST
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/llvm/options.mk
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/llvm/version.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/llvm/Makefile
diff -u pkgsrc/lang/llvm/Makefile:1.77 pkgsrc/lang/llvm/Makefile:1.78
--- pkgsrc/lang/llvm/Makefile:1.77      Sun Aug 14 12:13:03 2022
+++ pkgsrc/lang/llvm/Makefile   Wed Aug 24 14:38:56 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.77 2022/08/14 12:13:03 tnn Exp $
+# $NetBSD: Makefile,v 1.78 2022/08/24 14:38:56 ryoon Exp $
 #
 # When updating this, please also update:
 # devel/include-what-you-use
@@ -27,6 +27,7 @@
 
 DISTNAME=      llvm-${LLVM_VERSION}.src
 PKGNAME=       ${DISTNAME:S/.src//}
+PKGREVISION=   1
 CATEGORIES=    lang devel
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -100,6 +101,13 @@ SOEXT=             so
 PLIST.notdylib=        yes
 .endif
 PLIST_SUBST+=  SOEXT=${SOEXT}
+PLIST_SUBST+=  LLVM_MAJOR_VERSION=${LLVM_MAJOR_VERSION}
+
+NOTDYLIBS=     LTO Remarks
+.for libname in ${NOTDYLIBS}
+PRINT_PLIST_AWK+=      /lib${libname}.${SOEXT}.${LLVM_MAJOR_VERSION}/ { gsub(/\.${SOEXT}\.${LLVM_MAJOR_VERSION}/, ".$${SOEXT}.$${LLVM_MAJOR_VERSION}"); print "$${PLIST.notdylib}" $$0; next }
+.endfor
+PRINT_PLIST_AWK+=      { gsub(/\.${SOEXT}/, ".$${SOEXT}") }
 
 # needs std::atomic with 64-bit CAS
 .if ${MACHINE_ARCH} == "i386"

Index: pkgsrc/lang/llvm/PLIST
diff -u pkgsrc/lang/llvm/PLIST:1.20 pkgsrc/lang/llvm/PLIST:1.21
--- pkgsrc/lang/llvm/PLIST:1.20 Fri Aug 12 08:37:58 2022
+++ pkgsrc/lang/llvm/PLIST      Wed Aug 24 14:38:56 2022
@@ -1,5 +1,4 @@
-@comment $NetBSD: PLIST,v 1.20 2022/08/12 08:37:58 pin Exp $
-@comment $NetBSD: PLIST,v 1.20 2022/08/12 08:37:58 pin Exp $
+@comment $NetBSD: PLIST,v 1.21 2022/08/24 14:38:56 ryoon Exp $
 bin/FileCheck
 bin/bugpoint
 bin/count
@@ -1838,7 +1837,7 @@ lib/cmake/llvm/TensorFlowCompile.cmake
 lib/cmake/llvm/UseLibtool.cmake
 lib/cmake/llvm/VersionFromVCS.cmake
 lib/libLLVM-${PKGVERSION}.${SOEXT}
-lib/libLLVM-14.so
+lib/libLLVM-14.${SOEXT}
 lib/libLLVM.${SOEXT}
 ${PLIST.AArch64}lib/libLLVMAArch64AsmParser.a
 ${PLIST.AArch64}lib/libLLVMAArch64CodeGen.a
@@ -1853,6 +1852,10 @@ ${PLIST.AMDGPU}lib/libLLVMAMDGPUDisassem
 ${PLIST.AMDGPU}lib/libLLVMAMDGPUInfo.a
 ${PLIST.AMDGPU}lib/libLLVMAMDGPUTargetMCA.a
 ${PLIST.AMDGPU}lib/libLLVMAMDGPUUtils.a
+${PLIST.ARC}lib/libLLVMARCCodeGen.a
+${PLIST.ARC}lib/libLLVMARCDesc.a
+${PLIST.ARC}lib/libLLVMARCDisassembler.a
+${PLIST.ARC}lib/libLLVMARCInfo.a
 ${PLIST.ARM}lib/libLLVMARMAsmParser.a
 ${PLIST.ARM}lib/libLLVMARMCodeGen.a
 ${PLIST.ARM}lib/libLLVMARMDesc.a
@@ -1879,6 +1882,10 @@ lib/libLLVMBitWriter.a
 lib/libLLVMBitstreamReader.a
 lib/libLLVMCFGuard.a
 lib/libLLVMCFIVerify.a
+${PLIST.CSKY}lib/libLLVMCSKYAsmParser.a
+${PLIST.CSKY}lib/libLLVMCSKYCodeGen.a
+${PLIST.CSKY}lib/libLLVMCSKYDesc.a
+${PLIST.CSKY}lib/libLLVMCSKYInfo.a
 lib/libLLVMCodeGen.a
 lib/libLLVMCore.a
 lib/libLLVMCoroutines.a
@@ -1926,6 +1933,11 @@ ${PLIST.Lanai}lib/libLLVMLanaiInfo.a
 lib/libLLVMLibDriver.a
 lib/libLLVMLineEditor.a
 lib/libLLVMLinker.a
+${PLIST.M68k}lib/libLLVMM68kAsmParser.a
+${PLIST.M68k}lib/libLLVMM68kCodeGen.a
+${PLIST.M68k}lib/libLLVMM68kDesc.a
+${PLIST.M68k}lib/libLLVMM68kDisassembler.a
+${PLIST.M68k}lib/libLLVMM68kInfo.a
 lib/libLLVMMC.a
 lib/libLLVMMCA.a
 lib/libLLVMMCDisassembler.a
@@ -1985,6 +1997,11 @@ lib/libLLVMTableGenGlobalISel.a
 lib/libLLVMTarget.a
 lib/libLLVMTextAPI.a
 lib/libLLVMTransformUtils.a
+${PLIST.VE}lib/libLLVMVEAsmParser.a
+${PLIST.VE}lib/libLLVMVECodeGen.a
+${PLIST.VE}lib/libLLVMVEDesc.a
+${PLIST.VE}lib/libLLVMVEDisassembler.a
+${PLIST.VE}lib/libLLVMVEInfo.a
 lib/libLLVMVectorize.a
 ${PLIST.WebAssembly}lib/libLLVMWebAssemblyAsmParser.a
 ${PLIST.WebAssembly}lib/libLLVMWebAssemblyCodeGen.a
@@ -2006,9 +2023,9 @@ ${PLIST.XCore}lib/libLLVMXCoreInfo.a
 lib/libLLVMXRay.a
 lib/libLLVMipo.a
 lib/libLTO.${SOEXT}
-${PLIST.notdylib}lib/libLTO.${SOEXT}.14
+${PLIST.notdylib}lib/libLTO.${SOEXT}.${LLVM_MAJOR_VERSION}
 lib/libRemarks.${SOEXT}
-${PLIST.notdylib}lib/libRemarks.${SOEXT}.14
+${PLIST.notdylib}lib/libRemarks.${SOEXT}.${LLVM_MAJOR_VERSION}
 share/opt-viewer/opt-diff.py
 share/opt-viewer/opt-stats.py
 share/opt-viewer/opt-viewer.py

Index: pkgsrc/lang/llvm/options.mk
diff -u pkgsrc/lang/llvm/options.mk:1.15 pkgsrc/lang/llvm/options.mk:1.16
--- pkgsrc/lang/llvm/options.mk:1.15    Sat Aug 13 09:11:12 2022
+++ pkgsrc/lang/llvm/options.mk Wed Aug 24 14:38:56 2022
@@ -1,13 +1,17 @@
-# $NetBSD: options.mk,v 1.15 2022/08/13 09:11:12 tnn Exp $
+# $NetBSD: options.mk,v 1.16 2022/08/24 14:38:56 ryoon Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.llvm
 
 LLVM_TARGETS=  AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
+LLVM_EXPERIMENTAL_TARGETS=     ARC CSKY M68k VE
 
-.for tgt in ${LLVM_TARGETS}
+.for tgt in ${LLVM_TARGETS} ${LLVM_EXPERIMENTAL_TARGETS}
 PLIST_VARS+=                   ${tgt}
 PKG_SUPPORTED_OPTIONS+=                llvm-target-${tgt:tl}
+PRINT_PLIST_AWK+=              {if ($$0 ~ /libLLVM${tgt}/) {$$0 = "$${PLIST.${tgt}}" $$0;}}
+PRINT_PLIST_AWK+=              {if ($$0 ~ /libLLVMExegesis${tgt}/) {$$0 = "$${PLIST.${tgt}}" $$0;}}
 .endfor
+
 PKG_SUPPORTED_OPTIONS+=                terminfo z3
 
 # Terminfo is used for colour output, only enable it by default if terminfo
@@ -35,7 +39,7 @@ PKG_SUGGESTED_OPTIONS+=       llvm-target-arm
 PKG_SUGGESTED_OPTIONS+=        llvm-target-mips
 .else
 # X86 and everyone else get all targets by default.
-.  for tgt in ${LLVM_TARGETS}
+.  for tgt in ${LLVM_TARGETS} ${LLVM_EXPERIMENTAL_TARGETS}
 PKG_SUGGESTED_OPTIONS+=        llvm-target-${tgt:tl}
 .  endfor
 .endif
@@ -49,6 +53,16 @@ LLVM_TARGETS_TO_BUILD+=      ${tgt}
 .  endif
 .endfor
 
+.for tgt in ${LLVM_EXPERIMENTAL_TARGETS}
+.  if !empty(PKG_OPTIONS:Mllvm-target-${tgt:tl})
+PLIST.${tgt}=  yes
+LLVM_EXPERIMENTAL_TARGETS_TO_BUILD+=   ${tgt}
+.  endif
+.endfor
+.if !empty(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD)
+CMAKE_ARGS+=   -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD:ts;}"
+.endif
+
 .if !empty(PKG_OPTIONS:Mterminfo)
 .include "../../mk/terminfo.buildlink3.mk"
 .else

Index: pkgsrc/lang/llvm/version.mk
diff -u pkgsrc/lang/llvm/version.mk:1.9 pkgsrc/lang/llvm/version.mk:1.10
--- pkgsrc/lang/llvm/version.mk:1.9     Fri Aug 12 08:37:58 2022
+++ pkgsrc/lang/llvm/version.mk Wed Aug 24 14:38:56 2022
@@ -1,4 +1,4 @@
-# $NetBSD: version.mk,v 1.9 2022/08/12 08:37:58 pin Exp $
+# $NetBSD: version.mk,v 1.10 2022/08/24 14:38:56 ryoon Exp $
 # used by devel/lld
 # used by devel/lldb
 # used by devel/polly
@@ -17,3 +17,5 @@ MASTER_SITES= ${MASTER_SITE_GITHUB:=llvm
 GITHUB_PROJECT=        llvm-project
 GITHUB_RELEASE=        llvmorg-${PKGVERSION_NOREV}
 EXTRACT_SUFX=  .tar.xz
+
+LLVM_MAJOR_VERSION=    ${LLVM_VERSION:tu:C/\\.[[:digit:]\.]*//}



Home | Main Index | Thread Index | Old Index