if [ "$OPTIMIZATIONS" = speed ];then
  GCC_OPTIM="-O3"
  LD_OPTIM=""
fi

if [ "$OPTIMIZATIONS" = normal ];then
  GCC_OPTIM="-O2"
  LD_OPTIM=""
fi

if [ "$OPTIMIZATIONS" = size ];then
  GCC_OPTIM="-Os"
  LD_OPTIM=""
fi

GCC_OPTIM="$GCC_OPTIM -ffast-math"
GCC_OPTIM="$GCC_OPTIM -ftree-loop-distribution"
GCC_OPTIM="$GCC_OPTIM -floop-interchange"
GCC_OPTIM="$GCC_OPTIM -floop-strip-mine"
GCC_OPTIM="$GCC_OPTIM -floop-block"
GCC_OPTIM="$GCC_OPTIM -fgraphite-identity"
GCC_OPTIM="$GCC_OPTIM -fexcess-precision=fast"
GCC_OPTIM="$GCC_OPTIM -flto"

LD_OPTIM="$LD_OPTIM -fuse-linker-plugin"
LD_OPTIM="$LD_OPTIM -fuse-ld=gold"
LD_OPTIM="$LD_OPTIM -Wl,--as-needed"

