gcc5_sdl2.sh 2.2 KB

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