Browse Source

Merge branch 'master' into max-7.3

max-7.3
falkTX 9 years ago
parent
commit
64e59de115
3 changed files with 36 additions and 18 deletions
  1. +0
    -18
      Untitled.sh
  2. +23
    -0
      scripts/mod-build.sh
  3. +13
    -0
      scripts/update-generated-code.sh

+ 0
- 18
Untitled.sh View File

@@ -1,18 +0,0 @@

BASENAME=arm-mod-linux-gnueabihf

export PATH=/opt/mod-toolchain/usr/bin/:$PATH

export AR=$BASENAME-gcc
export CC=$BASENAME-gcc
export CPP=$BASENAME-cpp
export CXX=$BASENAME-g++
export LD=$BASENAME-ld
export STRIP=$BASENAME-strip

unset CPPFLAGS
export CFLAGS="-mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math -fomit-frame-pointer -funroll-loops -funsafe-loop-optimizations"
export CXXFLAGS="-mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math -fomit-frame-pointer -funroll-loops -funsafe-loop-optimizations"
export LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined"

unset BASENAME

+ 23
- 0
scripts/mod-build.sh View File

@@ -0,0 +1,23 @@
#!/bin/bash

BASENAME=arm-mod-linux-gnueabihf
OPTS_BASE="-O3 -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad"
OPTS_AGGRESSIVE="$OPTS_BASE -ffast-math -fno-finite-math-only -fprefetch-loop-arrays -funroll-loops -funsafe-loop-optimizations"

export PATH=/opt/mod-toolchain/usr/bin/:$PATH

export AR=$BASENAME-gcc
export CC=$BASENAME-gcc
export CPP=$BASENAME-cpp
export CXX=$BASENAME-g++
export LD=$BASENAME-ld
export STRIP=$BASENAME-strip

export CFLAGS=$OPTS_AGGRESSIVE
export CXXFLAGS=$OPTS_AGGRESSIVE
export LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined"

unset CPPFLAGS
unset BASENAME
unset OPTS_BASE
unset OPTS_AGGRESSIVE

+ 13
- 0
scripts/update-generated-code.sh View File

@@ -0,0 +1,13 @@
#!/bin/bash

# make audio ports constant, they must never change
sed -i "/^int gen_kernel_numins = /{s/^/const /}" plugins/*/gen_exported.cpp
sed -i "/^int gen_kernel_numouts = /{s/^/const /}" plugins/*/gen_exported.cpp

# change prototype of param functions, no doubles!
sed -i "s/setparameter(CommonState *cself, long index, double value, void *ref)/setparameter(CommonState *cself, long index, t_param value, void *ref)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i "s/getparameter(CommonState *cself, long index, double *value)/getparameter(CommonState *cself, long index, t_param *value)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h
sed -i "s/create(double sr, long vs)/create(t_param sr, long vs)/" plugins/*/gen_exported.cpp plugins/*/gen_exported.h

# use t_sample instead of forcing doubles
sed -i "s/double /t_sample /" plugins/*/gen_exported.cpp

Loading…
Cancel
Save