gcc5_tarball.sh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/usr/bin/env bash
  2. export CC=gcc-5
  3. export CXX=g++-5
  4. if [ "$NEWCC" != "" ]; then
  5. export CC="$NEWCC"
  6. fi
  7. if [ "$NEWCXX" != "" ]; then
  8. export CXX="$NEWCXX"
  9. fi
  10. export LOGFILE=gcc5_tarball.log
  11. source ./tools/ci/scripts/init.sh
  12. export CXXFLAGS="$CXXFLAGS -ggdb3 -O2 -pipe -ffast-math \
  13. -fno-omit-frame-pointer -funswitch-loops \
  14. -Wvariadic-macros -Wvla -Wredundant-decls \
  15. -Wpacked-bitfield-compat -Wtrampolines \
  16. -Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \
  17. -fstrict-aliasing -Wunreachable-code \
  18. -Wvolatile-register-var -Winvalid-pch -Wredundant-decls \
  19. -Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \
  20. -Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \
  21. -Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \
  22. -Wcast-align -Wpointer-arith -Wundef \
  23. -Wmissing-include-dirs -Winit-self -pedantic -Wall \
  24. -Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \
  25. -Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \
  26. -Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \
  27. -Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \
  28. -Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1y \
  29. -Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \
  30. -Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \
  31. -Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \
  32. -Waggressive-loop-optimizations -Wclobbered -Wempty-body \
  33. -Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \
  34. -Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \
  35. -Wsuggest-attribute=format -Wtype-limits -Wuninitialized \
  36. -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \
  37. -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \
  38. -fsched-pressure \
  39. -Wconditionally-supported -Wdate-time \
  40. -fno-var-tracking -Wno-attributes \
  41. -Wopenmp-simd -Wformat-signedness \
  42. -Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \
  43. -Wlogical-not-parentheses -Woverloaded-virtual $POST_CXXFLAGS"
  44. do_init
  45. run_configure --enable-werror
  46. run_tarball test
  47. cp CMakeLists.txt.legacy CMakeLists.txt
  48. run_configure --enable-werror
  49. run_make
  50. source ./tools/ci/scripts/exit.sh
  51. exit 0