upd and patches
This commit is contained in:
47
assets/var/gnu/rocm/llvm.md
Normal file
47
assets/var/gnu/rocm/llvm.md
Normal file
@ -0,0 +1,47 @@
|
||||
rocm/llvm 7.2.4
|
||||
=
|
||||
https://github.com/ROCm/llvm-project/archive/refs/tags/rocm-7.2.4.tar.gz
|
||||
|
||||
``` env *** env ***
|
||||
disable=true
|
||||
```
|
||||
|
||||
``` sh *** patch ***
|
||||
FILE=compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
|
||||
sed -i 's|^#include <linux/scc.h>|#if __has_include(<linux/scc.h>)\n#include <linux/scc.h>\n#define SANITIZER_HAS_SCC_H 1\n#else\n#define SANITIZER_HAS_SCC_H 0\n#endif|' "$FILE"
|
||||
sed -i '/unsigned struct_scc_modem_sz = sizeof(struct scc_modem);/c\
|
||||
#if SANITIZER_HAS_SCC_H\
|
||||
unsigned struct_scc_modem_sz = sizeof(struct scc_modem);\
|
||||
#else\
|
||||
unsigned struct_scc_modem_sz = 0;\
|
||||
#endif' "$FILE"
|
||||
sed -i '/unsigned struct_scc_stat_sz = sizeof(struct scc_stat);/c\
|
||||
#if SANITIZER_HAS_SCC_H\
|
||||
unsigned struct_scc_stat_sz = sizeof(struct scc_stat);\
|
||||
#else\
|
||||
unsigned struct_scc_stat_sz = 0;\
|
||||
#endif' "$FILE"
|
||||
```
|
||||
|
||||
``` sh *** build ***
|
||||
mkdir -p build; cd build
|
||||
cmake ../llvm \
|
||||
-DCMAKE_INSTALL_PREFIX="$pkgpath" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_TARGETS_TO_BUILD="AMDGPU;X86" \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lld" \
|
||||
-DLLVM_ENABLE_RUNTIMES="compiler-rt" \
|
||||
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_DOCS=OFF \
|
||||
-DCLANG_INCLUDE_TESTS=OFF
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --install .
|
||||
```
|
||||
|
||||
``` sh *** config ***
|
||||
sed -i 's/^#define _fmaxd max$/#define _fmaxd fmax/; s/^#define _fmaxf max$/#define _fmaxf fmaxf/' lib/clang/22/include/__clang_cuda_complex_builtins.h
|
||||
sed -i 's/^#define _fmaxd fmax$/#define _fmaxd __builtin_fmax/; s/^#define _fmaxf fmaxf$/#define _fmaxf __builtin_fmaxf/' \
|
||||
/pkg/gnu/rocm/llvm/lib/clang/22/include/__clang_cuda_complex_builtins.h
|
||||
```
|
||||
Reference in New Issue
Block a user