123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #!/bin/sh
- # Copyright (C) 2017 Koz Ross <koz.ross@retro-freedom.nz>
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation, either version 3 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program. If not, see <http://www.gnu.org/licenses/>.
- # fno-rtti, fno-threadsafe-statics are irrelevant for C, so not bothering
- DISABLES="-fno-aggressive-loop-optimizations \
- -fno-asynchronous-unwind-tables \
- -fno-early-inlining \
- -fno-fp-int-builtin-inexact \
- -fno-gcse-lm \
- -fno-inline \
- -fno-inline-atomics \
- -fno-ira-hoist-pressure \
- -fno-ira-share-save-slots \
- -fno-ira-share-spill-slots \
- -fno-ivopts \
- -fno-jump-tables \
- -fno-lifetime-dse \
- -fno-peephole \
- -fno-plt \
- -fno-prefetch-loop-arrays \
- -fno-printf-return-value \
- -fno-rename-registers \
- -fno-sched-critical-path-heuristic \
- -fno-sched-dep-count-heuristic \
- -fno-sched-group-heuristic \
- -fno-sched-interblock \
- -fno-sched-last-insn-heuristic \
- -fno-sched-rank-heuristic \
- -fno-sched-spec \
- -fno-sched-spec-insn-heuristic \
- -fno-sched-stalled-insns-dep \
- -fno-schedule-fusion \
- -fno-short-enums \
- -fno-shrink-wrap-separate \
- -fno-split-ivs-in-unroller \
- -fno-ssa-backprop \
- -fno-stdarg-opt \
- -fno-strict-volatile-bitfields \
- -fno-tree-cselim \
- -fno-tree-forwprop \
- -fno-tree-loop-if-convert \
- -fno-tree-loop-im \
- -fno-tree-loop-ivcanon \
- -fno-tree-loop-optimize \
- -fno-tree-phiprop \
- -fno-tree-reassoc \
- -fno-tree-scev-cprop \
- -fno-var-tracking \
- -fno-var-tracking-assignments \
- -fno-web"
- ENABLES="-fdce \
- -fdse \
- -ffunction-cse \
- -foptimize-sibling-calls \
- -fauto-inc-dec \
- -fdelete-null-pointer-checks"
- #shellcheck disable=SC2086,SC2068
- gcc ${DISABLES} ${ENABLES} $@
|