Browse Source

Start some tests for riscv64 builds

Signed-off-by: falkTX <falktx@falktx.com>
pull/28/head
falkTX 2 years ago
parent
commit
d80d80f93a
4 changed files with 26 additions and 4 deletions
  1. +4
    -0
      bootstrap-common.sh
  2. +11
    -2
      bootstrap-plugins.sh
  3. +7
    -0
      setup/check_target.sh
  4. +4
    -2
      setup/env.sh

+ 4
- 0
bootstrap-common.sh View File

@@ -229,6 +229,10 @@ LIBSAMPLERATE_EXTRAFLAGS="--disable-fftw"
if [ "${CROSS_COMPILING}" -eq 1 ] || [ "${MACOS}" -eq 1 ]; then
LIBSAMPLERATE_EXTRAFLAGS+=" --disable-sndfile"
fi
# force build
if [ "${TOOLCHAIN_PREFIX}" = "riscv64-linux-gnu" ]; then
LIBSAMPLERATE_EXTRAFLAGS+=" ac_cv_host=riscv64-linux-gnu"
fi

download libsamplerate "${LIBSAMPLERATE_VERSION}" "${LIBSAMPLERATE_URL}"
build_autoconf libsamplerate "${LIBSAMPLERATE_VERSION}" "${LIBSAMPLERATE_EXTRAFLAGS}"


+ 11
- 2
bootstrap-plugins.sh View File

@@ -48,7 +48,9 @@ fi

FFTW_EXTRAFLAGS="--disable-alloca --disable-fortran --with-our-malloc"

if [ "${TOOLCHAIN_PREFIX}" = "aarch64-linux-gnu" ]; then
if [ "${TOOLCHAIN_PREFIX}" = "riscv64-linux-gnu" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
elif [ "${TOOLCHAIN_PREFIX}" = "aarch64-linux-gnu" ]; then
FFTW_EXTRAFLAGS+=" --with-slow-timer"
FFTW_EXTRAFLAGS+=" --enable-neon"
elif [ "${TOOLCHAIN_PREFIX}" = "arm-linux-gnueabihf" ]; then
@@ -315,8 +317,15 @@ fi # PAWPAW_SKIP_FLUIDSYNTH
# ---------------------------------------------------------------------------------------------------------------------
# mxml

MXML_EXTRAFLAGS=""

# force build
if [ "${TOOLCHAIN_PREFIX}" = "riscv64-linux-gnu" ]; then
MXML_EXTRAFLAGS+=" ac_cv_host=riscv64-linux-gnu"
fi

git_clone mxml "${MXML_VERSION}" "${MXML_URL}"
build_autoconf mxml "${MXML_VERSION}"
build_autoconf mxml "${MXML_VERSION}" "${MXML_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# carla (backend only)


+ 7
- 0
setup/check_target.sh View File

@@ -80,6 +80,13 @@ function check_target() {
# TOOLCHAIN_PREFIX="i686-linux-gnu"
# TOOLCHAIN_PREFIX_="${TOOLCHAIN_PREFIX}-"
;;
"linux-riscv64")
GCC=1
CROSS_COMPILING=1
LINUX=1
TOOLCHAIN_PREFIX="riscv64-linux-gnu"
TOOLCHAIN_PREFIX_="${TOOLCHAIN_PREFIX}-"
;;
"native")
target=$(uname -s)
check_target


+ 4
- 2
setup/env.sh View File

@@ -64,7 +64,9 @@ BUILD_FLAGS+=" -fPIC -DPIC -DNDEBUG"
BUILD_FLAGS+=" -fdata-sections -ffunction-sections -fno-common -fvisibility=hidden"

if [ "${GCC}" -eq 1 ]; then
BUILD_FLAGS+=" -fprefetch-loop-arrays"
if [ "${TOOLCHAIN_PREFIX}" != "riscv64-linux-gnu" ]; then
BUILD_FLAGS+=" -fprefetch-loop-arrays"
fi
BUILD_FLAGS+=" -fno-gnu-unique"
fi

@@ -78,7 +80,7 @@ fi

if [ "${TOOLCHAIN_PREFIX}" = "arm-linux-gnueabihf" ]; then
BUILD_FLAGS+=" -mfpu=neon-vfpv4 -mfloat-abi=hard"
elif [ "${TOOLCHAIN_PREFIX}" != "aarch64-linux-gnu" ]; then
elif [ "${TOOLCHAIN_PREFIX}" != "aarch64-linux-gnu" ] && [ "${TOOLCHAIN_PREFIX}" != "riscv64-linux-gnu" ]; then
BUILD_FLAGS+=" -mtune=generic -msse -msse2"
if [ "${WASM}" -eq 1 ]; then
BUILD_FLAGS+=" -msse3 -msimd128"


Loading…
Cancel
Save