Remilia's SlackBuild packages for Slackware Linux
Revision | 7712e6e79f1910feaedf6a603247dba03dbec963 (tree) |
---|---|
Time | 2023-06-13 07:26:06 |
Author | Remilia Scarlet <alexa@part...> |
Commiter | Remilia Scarlet |
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.
@@ -97,6 +97,10 @@ | ||
97 | 97 | # Change the path so that we use the pre-compiled binary for bootstrapping. |
98 | 98 | PATH="$PRGNAM_SHORT-$PRECOMP_VERSION-$PRECOMP_ARCH-$PRECOMP_SUFFIX/bin:$PATH" |
99 | 99 | |
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 | + | |
100 | 104 | # Build the compiler |
101 | 105 | CFLAGS="$SLKCFLAGS" \ |
102 | 106 | make release=1 progress=1 interpreter=1 |
@@ -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( |