Browse Source

A few more details for nosimd build

Signed-off-by: falkTX <falktx@falktx.com>
pull/28/head
falkTX 1 year ago
parent
commit
9dbdbe5067
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 35 additions and 9 deletions
  1. +21
    -6
      bootstrap-common.sh
  2. +9
    -3
      bootstrap-plugins.sh
  3. +5
    -0
      setup/env.sh

+ 21
- 6
bootstrap-common.sh View File

@@ -164,13 +164,22 @@ fi
FLAC_EXTRAFLAGS="--disable-doxygen-docs --disable-examples --disable-thorough-tests --disable-xmms-plugin"
FLAC_EXTRAFLAGS+=" --disable-stack-smash-protection"

# force intrinsic optimizations on macos-universal target
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
FLAC_EXTRAFLAGS+=" ac_cv_header_x86intrin_h=yes asm_opt=yes"
if [ -n "${PAWPAW_NOSIMD}" ] && [ "${PAWPAW_NOSIMD}" -ne 0 ]; then
FLAC_EXTRAFLAGS+=" ac_cv_header_x86intrin_h=no ac_cv_header_arm_neon_h=no asm_opt=no"
fi

# force intrinsic optimizations on some targets
if [ -z "${PAWPAW_NOSIMD}" ] || [ "${PAWPAW_NOSIMD}" -eq 0 ]; then
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
FLAC_EXTRAFLAGS+=" ac_cv_header_x86intrin_h=yes ac_cv_header_arm_neon_h=yes asm_opt=yes"
elif [ "${WASM}" -eq 1 ]; then
FLAC_EXTRAFLAGS+=" ac_cv_header_x86intrin_h=yes asm_opt=yes"
fi
fi

download flac "${FLAC_VERSION}" "${FLAC_URL}" "tar.xz"

# FIXME still needed?
# fixup for intrinsic optimizations on macos-universal target
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
patch_file flac "${FLAC_VERSION}" "configure" 's/amd64|x86_64/amd64|arm|x86_64/'
@@ -192,6 +201,10 @@ if [ "${CROSS_COMPILING}" -eq 1 ]; then
OPUS_EXTRAFLAGS+=" --disable-extra-programs"
fi

if [ -n "${PAWPAW_NOSIMD}" ] && [ "${PAWPAW_NOSIMD}" -ne 0 ]; then
OPUS_EXTRAFLAGS+=" --disable-intrinsics"
fi

# FIXME macos-universal proper optimizations
# https://github.com/DISTRHO/PawPaw/issues/4
if [ "${MACOS_UNIVERSAL}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then
@@ -213,9 +226,11 @@ LIBSNDFILE_EXTRAFLAGS="--disable-alsa --disable-full-suite --disable-sqlite"
# force disable mp3 support for now, until we handle those libs
LIBSNDFILE_EXTRAFLAGS+=" --disable-mpeg"

# force intrinsic optimizations on macos-universal target
if [ "${MACOS_UNIVERSAL}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then
LIBSNDFILE_EXTRAFLAGS+=" ac_cv_header_immintrin_h=yes"
# force intrinsic optimizations on some targets
if [ -z "${PAWPAW_NOSIMD}" ] || [ "${PAWPAW_NOSIMD}" -eq 0 ]; then
if [ "${MACOS_UNIVERSAL}" -eq 1 ] || [ "${WASM}" -eq 1 ]; then
LIBSNDFILE_EXTRAFLAGS+=" ac_cv_header_immintrin_h=yes"
fi
fi

# fix build, regex matching fails


+ 9
- 3
bootstrap-plugins.sh View File

@@ -40,14 +40,18 @@ source setup/versions.sh

LIBPNG_EXTRAFLAGS=""

if [ -n "${PAWPAW_NOSIMD}" ] && [ "${PAWPAW_NOSIMD}" -ne 0 ]; then
LIBPNG_EXTRAFLAGS+=" --disable-hardware-optimizations"
fi

# bypass broken zlib configure tests
if [ "${MACOS}" -eq 0 ]; then
LIBPNG_EXTRAFLAGS+=" ac_cv_lib_z_zlibVersion=yes"
export EXTRA_CPPFLAGS="-I${PAWPAW_PREFIX}/include"
fi

# FIXME
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
# FIXME
LIBPNG_EXTRAFLAGS+=" --disable-hardware-optimizations"
fi

@@ -311,8 +315,10 @@ fi

FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single"

if [ "${LINUX}" -eq 1 ] && [ "${LINUX_TARGET}" = "linux-armhf" ]; then
FFTWF_EXTRAFLAGS+=" --enable-neon"
if [ -z "${PAWPAW_NOSIMD}" ] || [ "${PAWPAW_NOSIMD}" -eq 0 ]; then
if [ "${LINUX}" -eq 1 ] && [ "${LINUX_TARGET}" = "linux-armhf" ]; then
FFTWF_EXTRAFLAGS+=" --enable-neon"
fi
fi

copy_download fftw fftwf "${FFTW_VERSION}"


+ 5
- 0
setup/env.sh View File

@@ -63,6 +63,11 @@ if [ -z "${PAWPAW_SKIP_LTO}" ] || [ "${PAWPAW_SKIP_LTO}" -eq 0 ]; then
PAWPAW_PREFIX+="-lto"
fi

if [ -n "${PAWPAW_NOSIMD}" ] && [ "${PAWPAW_NOSIMD}" -ne 0 ]; then
PAWPAW_BUILDDIR+="-nosimd"
PAWPAW_PREFIX+="-nosimd"
fi

# ---------------------------------------------------------------------------------------------------------------------
# build environment



Loading…
Cancel
Save