gcc6_sanitize.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/usr/bin/env bash
  2. export CC=gcc-6
  3. export CXX=g++-6
  4. if [ "$NEWCC" != "" ]; then
  5. export CC="$NEWCC"
  6. fi
  7. if [ "$NEWCXX" != "" ]; then
  8. export CXX="$NEWCXX"
  9. fi
  10. export LOGFILE=gcc6.log
  11. source ./tools/ci/scripts/init.sh
  12. export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \
  13. -D_GLIBCXX_SANITIZE_VECTOR \
  14. -Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
  15. -fsanitize=address -fsanitize=undefined \
  16. -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
  17. -fsanitize=vla-bound -fsanitize=null -fsanitize=return \
  18. -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment \
  19. -fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow \
  20. -fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool \
  21. -fsanitize=enum -fsanitize=vptr -fsanitize=bounds-strict \
  22. -std=gnu++1z -Wformat=1 \
  23. -Wno-attributes -fno-omit-frame-pointer"
  24. export LDFLAGS="$LDFLAGS -lm -ldl"
  25. source ./tools/ci/flags/gcc6.sh
  26. export CXXFLAGS="$CXXFLAGS $POST_CXXFLAGS"
  27. do_init
  28. run_configure --enable-werror $*
  29. run_make
  30. source ./tools/ci/scripts/exit.sh
  31. exit 0