gccsnapshot.sh 732 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env bash
  2. export CC=gcc
  3. export CXX=g++
  4. export LOGFILE=gcc-snapshot.log
  5. if [ "$NEWCC" != "" ]; then
  6. export CC="$NEWCC"
  7. fi
  8. if [ "$NEWCXX" != "" ]; then
  9. export CXX="$NEWCXX"
  10. fi
  11. if [ "$FLAGS" == "" ]; then
  12. export FLAGS="gccsnapshot.sh"
  13. fi
  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 -fno-omit-frame-pointer \
  20. -Wno-deprecated-copy"
  21. source ./tools/ci/flags/${FLAGS}
  22. export CXXFLAGS="$CXXFLAGS $POST_CXXFLAGS"
  23. do_init
  24. run_configure --enable-werror $*
  25. run_make
  26. source ./tools/ci/scripts/exit.sh
  27. exit 0