Skip to content

Instantly share code, notes, and snippets.

@naetherm
Created February 10, 2020 06:17
Show Gist options
  • Save naetherm/2297beac3ac2c98181cb7bcc5f00e217 to your computer and use it in GitHub Desktop.
Save naetherm/2297beac3ac2c98181cb7bcc5f00e217 to your computer and use it in GitHub Desktop.
rocrand
# Maintainer: Jakub Okoński <[email protected]>
pkgname=rocrand
pkgver=3.0.0
pkgrel=1
pkgdesc="RAND library for HIP programming language"
url="https://github.com/ROCmSoftwarePlatform/rocRAND"
arch=(x86_64)
makedepends=("hcc>=${pkgver}" git cmake ninja)
source=("https://github.com/ROCmSoftwarePlatform/rocRAND/archive/$pkgver.tar.gz")
sha256sums=("a00e546821f14aa6c3696f8056d916ee759bce5e774fc449df9804979445ee41")
build() {
mkdir -p "$srcdir/build"
cd "$srcdir/build"
# build broken with stack protection
export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/-fstack-protector-strong//')
export CFLAGS=$(echo $CFLAGS | sed -e 's/-fstack-protector-strong//')
export CPPFLAGS=$(echo $CPPFLAGS | sed -e 's/-fstack-protector-strong//')
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TEST=OFF \
-DCMAKE_CXX_COMPILER=/opt/rocm/hcc/bin/hcc \
"$srcdir/rocRAND-$pkgver"
make
}
package() {
cd "$srcdir/build"
DESTDIR="$pkgdir" make install
mkdir -p $pkgdir/etc/ld.so.conf.d
cat <<-EOF > $pkgdir/etc/ld.so.conf.d/rocrand.conf
/opt/rocm/hiprand/lib/
/opt/rocm/rocrand/lib/
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment