-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile_Settings.gcc
50 lines (48 loc) · 2.28 KB
/
Makefile_Settings.gcc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! make
##
## Specific GCC project settings.
##
## difftest_ng 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.
##
## difftest_ng 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 difftest_ng. If not, see <http://www.gnu.org/licenses/>.
##
ifdef CPU
ARCH = -march=$(CPU)
endif
CXX = $(COMPILER_CMD)
DEFINES =
CC = $(CXX)
MAKEOBJS = -x c++ -c
CFLAGS = -Wall -W -Wunused -Wpointer-arith -pedantic -Wcast-qual -Wwrite-strings -Wno-long-long -Wredundant-decls -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo $(INCLUDEOPTS) $(DEFINES) $(ADDOPTS)
OPTIMIZER = -O3 -DDEBUG_LEVEL=0 -DCHECK_LEVEL=0 -fno-rtti -funroll-loops -fstrict-aliasing -Wno-redundant-decls -ffast-math #-mfpmath=387 #-maccumulate-outgoing-args -minline-all-stringops $(ARCH)
#-fschedule-insns # These give "register spill" errors.
#-fschedule-insns2 #-fomit-frame-pointer breaks exception handling for 3.2
# 387 legacy FPU code is faster than SSE for gcc. Wierd.
# -Wconversion is unusable for gcc 4.3 and above.
#
# Additional tuning of the template generation by means of -frepo or the like did not at all change the
# size of the final executable. Thus, it's not done.
#
PROFILER = -O3 -pg -ggdb3 -pg -fno-omit-frame-pointer #-fno-inline
LDPROF = -pg
DEBUGGER = -ggdb3 -fno-omit-frame-pointer -fno-inline -DDEBUG_LEVEL=2 -DCHECK_LEVEL=3
VERBOSE = -ggdb3 -fno-inline -DDEBUG_LEVEL=3 -DCHECK_LEVEL=3
DEBUGINFO = -ggdb3 -fno-omit-frame-pointer -fno-inline
TOASM = -S -fverbose-asm #-fno-unroll-loops
DBLIBS = #-lefence # does also break exception handling
LD = $(CXX)
LDFLAGS =
LDLIBS = -lc -lm $(EXTRA_LIBS) #gcc_s required for long division/multiplication on 32bit
PROFGEN = $(OPTIMIZER) -fprofile-arcs
PROFUSE = $(OPTIMIZER) -fbranch-probabilities
COVERAGE = -ftest-coverage -fprofile-arcs
LDCOVERAGE = -lgcov -fprofile-arcs