• R/O
  • SSH

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Remilia's SlackBuild packages for Slackware Linux


Commit MetaInfo

Revision7712e6e79f1910feaedf6a603247dba03dbec963 (tree)
Time2023-06-13 07:26:06
AuthorRemilia Scarlet <alexa@part...>
CommiterRemilia Scarlet

Log Message

Add a patch to support LLVM 16.

This is already in the upstream code, and will not be needed for 1.9
and later. But for 1.8.2, it's required, otherwise Crystal will not
build.

Change Summary

Incremental Difference

diff -r 72a409e25b38 -r 7712e6e79f19 development/crystal-lang/crystal-lang.SlackBuild
--- a/development/crystal-lang/crystal-lang.SlackBuild Mon Jun 12 11:20:27 2023 -0600
+++ b/development/crystal-lang/crystal-lang.SlackBuild Mon Jun 12 16:26:06 2023 -0600
@@ -97,6 +97,10 @@
9797 # Change the path so that we use the pre-compiled binary for bootstrapping.
9898 PATH="$PRGNAM_SHORT-$PRECOMP_VERSION-$PRECOMP_ARCH-$PRECOMP_SUFFIX/bin:$PATH"
9999
100+# Patch from upstream to support LLVM 16, which will be in Crystal >= 1.9, but
101+# not in 1.8.2
102+patch -p1 < $CWD/support-llvm-16.patch
103+
100104 # Build the compiler
101105 CFLAGS="$SLKCFLAGS" \
102106 make release=1 progress=1 interpreter=1
diff -r 72a409e25b38 -r 7712e6e79f19 development/crystal-lang/support-llvm-16.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/development/crystal-lang/support-llvm-16.patch Mon Jun 12 16:26:06 2023 -0600
@@ -0,0 +1,29 @@
1+diff -u -r ./src/llvm/ext/llvm-versions.txt ../new/src/llvm/ext/llvm-versions.txt
2+--- ./src/llvm/ext/llvm-versions.txt 2023-05-09 02:52:26.000000000 -0600
3++++ ./src/llvm/ext/llvm-versions.txt 2023-06-12 16:21:37.411411241 -0600
4+@@ -1 +1 @@
5+-15.0 14.0 13.0 12.0 11.1 11.0 10.0 9.0 8.0
6++16.0 15.0 14.0 13.0 12.0 11.1 11.0 10.0 9.0 8.0
7+diff -u -r ./src/llvm/ext/llvm_ext.cc ../new/src/llvm/ext/llvm_ext.cc
8+--- ./src/llvm/ext/llvm_ext.cc 2023-05-09 02:52:26.000000000 -0600
9++++ .w/src/llvm/ext/llvm_ext.cc 2023-06-12 16:21:24.943165258 -0600
10+@@ -25,6 +25,10 @@
11+ #include <llvm/Bitcode/BitcodeWriter.h>
12+ #include <llvm/Analysis/ModuleSummaryAnalysis.h>
13+
14++#if LLVM_VERSION_GE(16, 0)
15++#define makeArrayRef ArrayRef
16++#endif
17++
18+ typedef DIBuilder *DIBuilderRef;
19+ #define DIArray DINodeArray
20+ template <typename T> T *unwrapDIptr(LLVMMetadataRef v) {
21+@@ -358,7 +362,7 @@
22+ .setOptLevel((CodeGenOpt::Level)options.OptLevel)
23+ .setTargetOptions(targetOptions);
24+ bool JIT;
25+- if (Optional<CodeModel::Model> CM = unwrap(options.CodeModel, JIT))
26++ if (auto CM = unwrap(options.CodeModel, JIT))
27+ builder.setCodeModel(*CM);
28+ if (options.MCJMM)
29+ builder.setMCJITMemoryManager(