Skip to content

Commit

Permalink
Add -mtune flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Jan 28, 2020
1 parent fcafda6 commit 75e8e09
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tools/toolchain/scripts/setup_buildtools.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")" && pwd -P)"
SCRIPT_DIR="$(cd "$(dirname "${SCRIPT_NAME}")" && pwd -P)"

source "${SCRIPT_DIR}"/common_vars.sh
source "${SCRIPT_DIR}"/tool_kit.sh
Expand All @@ -19,20 +19,20 @@ done

# setup compiler flags, leading to nice stack traces on crashes but
# still optimised
CFLAGS="-O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native $TSANFLAGS"
FFLAGS="-O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native $TSANFLAGS"
F77FLAGS="-O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native $TSANFLAGS"
F90FLAGS="-O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native $TSANFLAGS"
FCFLAGS="-O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native $TSANFLAGS"
CXXFLAGS="-O2 -ftree-vectorize -g -fno-omit-frame-pointer -march=native $TSANFLAGS"

export CFLAGS=$(allowed_gcc_flags $CFLAGS)
export FFLAGS=$(allowed_gfortran_flags $FFLAGS)
export F77FLAGS=$(allowed_gfortran_flags $F77FLAGS)
export F90FLAGS=$(allowed_gfortran_flags $F90FLAGS)
export FCFLAGS=$(allowed_gfortran_flags $FCFLAGS)
export CXXFLAGS=$(allowed_gxx_flags $CXXFLAGS)
export LDFLAGS="$TSANFLAGS"
CFLAGS="-O2 -fno-omit-frame-pointer -ftree-vectorize -g -march=native -mtune=native ${TSANFLAGS}"
CXXFLAGS="${CFLAGS}"
FFLAGS="-O2 -fbacktrace -fno-omit-frame-pointer -ftree-vectorize -g -march=native -mtune=native ${TSANFLAGS}"
F77FLAGS="${FFLAGS}"
F90FLAGS="${FFLAGS}"
FCFLAGS="${FFLAGS}"

export CFLAGS=$(allowed_gcc_flags ${CFLAGS})
export FFLAGS=$(allowed_gfortran_flags ${FFLAGS})
export F77FLAGS=$(allowed_gfortran_flags ${F77FLAGS})
export F90FLAGS=$(allowed_gfortran_flags ${F90FLAGS})
export FCFLAGS=$(allowed_gfortran_flags ${FCFLAGS})
export CXXFLAGS=$(allowed_gxx_flags ${CXXFLAGS})
export LDFLAGS="${TSANFLAGS}"

# get system arch information using OpenBLAS prebuild
"${SCRIPTDIR}"/get_openblas_arch.sh; load "${BUILDDIR}/openblas_arch"
Expand Down

0 comments on commit 75e8e09

Please sign in to comment.