diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-01-12 16:30:42 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-01-12 16:30:42 +0200 |
commit | b981ad4b6a3814a776670281beb5be8a8a9265f1 (patch) | |
tree | a8253b661706e8a32d4452ab4c73ceba0750a2d2 /scripts/ci | |
parent | 041cfc475dcd48de182e8225aaec76ed55257fd7 (diff) | |
parent | 870b49483ce2ea973eff6e554ac0c98f5267dfb2 (diff) |
Merge branch 'master' of https://github.com/OpenDataPlane/odp into odp-dpdk
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'scripts/ci')
-rwxr-xr-x | scripts/ci/build_riscv64.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/ci/build_riscv64.sh b/scripts/ci/build_riscv64.sh new file mode 100755 index 000000000..474633727 --- /dev/null +++ b/scripts/ci/build_riscv64.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -e + +export TARGET_ARCH=riscv64-linux-gnu +if [ "${CC#clang}" != "${CC}" ] ; then + export CC="clang --target=${TARGET_ARCH}" + export CXX="clang++ --target=${TARGET_ARCH}" +else + export CC="${TARGET_ARCH}-gcc" + export CXX="${TARGET_ARCH}-g++" +fi + +# Use target libraries +export PKG_CONFIG_PATH= +export PKG_CONFIG_LIBDIR=/usr/lib/${TARGET_ARCH}/pkgconfig + +cd "$(dirname "$0")"/../.. +./bootstrap +./configure \ + --host=${TARGET_ARCH} --build=x86_64-linux-gnu \ + --prefix=/opt/odp \ + ${CONF} + +make clean + +make -j $(nproc) + +make install + +pushd ${HOME} +${CC} ${CFLAGS} ${OLDPWD}/example/hello/odp_hello.c -o odp_hello_inst_dynamic `PKG_CONFIG_PATH=/opt/odp/lib/pkgconfig:${PKG_CONFIG_PATH} pkg-config --cflags --libs libodp-linux` +popd |