Skip to content
Snippets Groups Projects
Commit 6e4447c7 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

Set the MARCH_FLAG and use it in the Compiler flags

parent 24110a02
No related branches found
No related tags found
1 merge request!34Resolve "Default value for GCC_ARCH"
#!/bin/sh
export CC="mpicc"
export CFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
export CFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export CXX="mpicxx"
export CXXFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
export CXXFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export FC="mpif90"
export FCFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
export FCFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
#HG: ugly hack to include rpath while linking
# becomes necessary for spack >= 0.19, as it does not set LD_LIBRARY_PATH anymore
......
#!/bin/sh
export CC="mpicc"
export CFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
export CFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export CXX="mpicxx"
export CXXFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
export CXXFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export FC="mpif90"
export FCFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
export FCFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
#HG: ugly hack to include rpath while linking
# becomes necessary for spack >= 0.19, as it does not set LD_LIBRARY_PATH anymore
......
#!/bin/sh
export CC="gcc"
export CFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
export CFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export CXX="g++"
export CXXFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
export CXXFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export FC="gfortran"
export FCFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
export FCFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
#HG: ugly hack to include rpath while linking
# becomes necessary for spack >= 0.19, as it does not set LD_LIBRARY_PATH anymore
......
#!/bin/sh
export CC="mpicc"
export CFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
export CFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export CXX="mpicxx"
export CXXFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
export CXXFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export FC="mpif90"
export FCFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
export FCFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
#HG: ugly hack to include rpath while linking
# becomes necessary for spack >= 0.19, as it does not set LD_LIBRARY_PATH anymore
......
#!/bin/sh
export CC="mpicc"
export CFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
export CFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export CXX="mpicxx"
export CXXFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
export CXXFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export FC="mpif90"
export FCFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
export FCFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
#HG: ugly hack to include rpath while linking
# becomes necessary for spack >= 0.19, as it does not set LD_LIBRARY_PATH anymore
......
#!/bin/sh
export CC="gcc"
export CFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
export CFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export CXX="g++"
export CXXFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments"
export CXXFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments"
export FC="gfortran"
export FCFLAGS="${GCC_ARCH:+-march=$GCC_ARCH }-O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
export FCFLAGS="$MARCH_FLAG -O2 -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
#HG: ugly hack to include rpath while linking
# becomes necessary for spack >= 0.19, as it does not set LD_LIBRARY_PATH anymore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment