rscc 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/sh
  2. # Copyright (C) 2017 Koz Ross <koz.ross@retro-freedom.nz>
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # fno-rtti, fno-threadsafe-statics are irrelevant for C, so not bothering
  17. DISABLES="-fno-aggressive-loop-optimizations \
  18. -fno-asynchronous-unwind-tables \
  19. -fno-early-inlining \
  20. -fno-fp-int-builtin-inexact \
  21. -fno-gcse-lm \
  22. -fno-inline \
  23. -fno-inline-atomics \
  24. -fno-ira-hoist-pressure \
  25. -fno-ira-share-save-slots \
  26. -fno-ira-share-spill-slots \
  27. -fno-ivopts \
  28. -fno-jump-tables \
  29. -fno-lifetime-dse \
  30. -fno-peephole \
  31. -fno-plt \
  32. -fno-prefetch-loop-arrays \
  33. -fno-printf-return-value \
  34. -fno-rename-registers \
  35. -fno-sched-critical-path-heuristic \
  36. -fno-sched-dep-count-heuristic \
  37. -fno-sched-group-heuristic \
  38. -fno-sched-interblock \
  39. -fno-sched-last-insn-heuristic \
  40. -fno-sched-rank-heuristic \
  41. -fno-sched-spec \
  42. -fno-sched-spec-insn-heuristic \
  43. -fno-sched-stalled-insns-dep \
  44. -fno-schedule-fusion \
  45. -fno-short-enums \
  46. -fno-shrink-wrap-separate \
  47. -fno-split-ivs-in-unroller \
  48. -fno-ssa-backprop \
  49. -fno-stdarg-opt \
  50. -fno-strict-volatile-bitfields \
  51. -fno-tree-cselim \
  52. -fno-tree-forwprop \
  53. -fno-tree-loop-if-convert \
  54. -fno-tree-loop-im \
  55. -fno-tree-loop-ivcanon \
  56. -fno-tree-loop-optimize \
  57. -fno-tree-phiprop \
  58. -fno-tree-reassoc \
  59. -fno-tree-scev-cprop \
  60. -fno-var-tracking \
  61. -fno-var-tracking-assignments \
  62. -fno-web"
  63. ENABLES="-fdce \
  64. -fdse \
  65. -ffunction-cse \
  66. -foptimize-sibling-calls \
  67. -fauto-inc-dec \
  68. -fdelete-null-pointer-checks"
  69. #shellcheck disable=SC2086,SC2068
  70. gcc ${DISABLES} ${ENABLES} $@