gccsnapshot_tests.sh 750 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env bash
  2. export CC=gcc
  3. export CXX=g++
  4. if [ "$NEWCC" != "" ]; then
  5. export CC="$NEWCC"
  6. fi
  7. if [ "$NEWCXX" != "" ]; then
  8. export CXX="$NEWCXX"
  9. fi
  10. if [ "$FLAGS" == "" ]; then
  11. export FLAGS="gccsnapshot.sh"
  12. fi
  13. export LOGFILE=gcc-snapshot.log
  14. export PATH=/usr/lib/gcc-snapshot/bin:$PATH
  15. source ./tools/ci/scripts/init.sh
  16. export CXXFLAGS="$CXXFLAGS -pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \
  17. -Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \
  18. -std=gnu++1z -Wformat=1 \
  19. -Wno-attributes \
  20. -Wno-deprecated-copy"
  21. source ./tools/ci/flags/${FLAGS}
  22. export CXXFLAGS="$CXXFLAGS $POST_CXXFLAGS"
  23. do_init
  24. run_configure --enable-unittests=yes $*
  25. export SDL_VIDEODRIVER=dummy
  26. run_make_check
  27. source ./tools/ci/scripts/exit.sh
  28. exit 0