-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch to mold to avoid lld's error * `unknown relocation (102) against symbol` * Remove magma-cuda since unsupported
- Loading branch information
1 parent
0edcf09
commit 4a891c4
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git a/PKGBUILD b/PKGBUILD | ||
index 2ef55de..b4b806b 100644 | ||
--- a/PKGBUILD | ||
+++ b/PKGBUILD | ||
@@ -42,14 +42,14 @@ prepare() { | ||
|
||
cd "${srcdir}" | ||
|
||
- cp -r "${_pkgname}" "${_pkgname}-${pkgver}-cuda" | ||
cp -r "${_pkgname}" "${_pkgname}-${pkgver}-hip" | ||
|
||
+ : <<COMMENT_SEPERATOR | ||
cd "${_pkgname}-${pkgver}-cuda" | ||
echo -e "BACKEND = cuda\nFORT = true\nGPU_TARGET=$(_valid_sm)" > make.inc | ||
make generate | ||
- | ||
cd "${srcdir}" | ||
+COMMENT_SEPERATOR | ||
|
||
cd "${_pkgname}-${pkgver}-hip" | ||
echo -e "BACKEND = hip\nFORT = true\nGPU_TARGET=$(_valid_gfx)" > make.inc | ||
@@ -57,6 +57,7 @@ prepare() { | ||
} | ||
|
||
build() { | ||
+ : <<COMMENT_SEPERATOR | ||
echo "Build with cuda backend" | ||
cd "${srcdir}/${_pkgname}-${pkgver}-cuda" | ||
cmake \ | ||
@@ -67,7 +68,7 @@ build() { | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DGPU_TARGET="$(_valid_sm)" | ||
ninja -C build | ||
- | ||
+COMMENT_SEPERATOR | ||
|
||
echo "Build with rocm/hip backend" | ||
cd "${srcdir}/${_pkgname}-${pkgver}-hip" | ||
@@ -90,7 +91,9 @@ build() { | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DMAGMA_ENABLE_HIP=ON \ | ||
-DGPU_TARGET="$(_valid_gfx)" \ | ||
- -DAMDGPU_TARGETS="$(_valid_gfx | tr ' ' ';')" | ||
+ -DAMDGPU_TARGETS="$(_valid_gfx | tr ' ' ';')" \ | ||
+ -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" \ | ||
+ -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" | ||
ninja -C build | ||
} | ||
|
||
@@ -128,3 +131,6 @@ package_magma-hip() { | ||
} | ||
|
||
# vim:set ts=2 sw=2 et: | ||
+pkgname=(${pkgname[@]/magma-cuda}) | ||
+makedepends=(${makedepends[@]/cuda}) | ||
+makedepends+=(mold) |