aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/cc/gcc.txt
blob: 3eaa79e0197120b0b787132fa962cf7e674431b1 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
macro_name GCC

binary_name g++

has_tr1 yes

compile_option "-c "
output_to_option "-o "
add_include_dir_option -I
add_lib_dir_option -L
add_lib_option -l

lang_flags "-D_REENTRANT -Wno-long-long"
warning_flags "-W -Wall"

maintainer_warning_flags "-Werror -Wall -Wextra -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wold-style-cast"

lib_opt_flags "-O3"
check_opt_flags "-O2"
shared_flags "-fPIC -fvisibility=hidden"
debug_flags -g
no_debug_flags "-finline-functions"

dll_import_flags '__attribute__((visibility("default")))'

makefile_style unix

<so_link_flags>
# The default works for GNU ld and several other Unix linkers
default -> "$(CXX) -shared -fPIC -Wl,-soname,$(SONAME)"

# AIX doesn't seem to have soname support (weird...)
aix     -> "$(CXX) -shared -fPIC"

darwin  -> "$(CXX) -dynamiclib -fPIC -install_name $(LIBDIR)/$(SONAME)"
hpux    -> "$(CXX) -shared -fPIC -Wl,+h,$(SONAME)"
solaris -> "$(CXX) -shared -fPIC -Wl,-h,$(SONAME)"
</so_link_flags>

<mach_opt>
# Specializations first (they don't need to be, just clearer)
i386           -> "-mtune=i686 -momit-leaf-frame-pointer"
ppc601         -> "-mpowerpc -mcpu=601"

# Until GCC gets -march support for these models
nehalem        -> "-march=core2 -msse4.1 -msse4.2"
westmere       -> "-march=core2 -maes -msse4.1 -msse4.2"
atom           -> "-march=i686 -msse2 -mssse3"
cellppu        -> ""
alpha-ev68     -> "-mcpu=ev6"
alpha-ev7      -> "-mcpu=ev6"

# Default family options (SUBMODEL is substitued with the real submodel)
# Anything after the quotes is what should be *removed* from the submodel name
# before it's put into SUBMODEL.
alpha     -> "-mcpu=SUBMODEL" alpha-
amd64     -> "-march=SUBMODEL -momit-leaf-frame-pointer"
arm       -> "-march=SUBMODEL"
ia32      -> "-march=SUBMODEL -momit-leaf-frame-pointer"
ia64      -> "-mtune=SUBMODEL"
hppa      -> "-march=SUBMODEL" hppa
m68k      -> "-mSUBMODEL"
hitachi-sh -> "-mSUBMODEL" hitachi-sh
sparc32   -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus" sparc32-
sparc64   -> "-mcpu=v9 -mtune=SUBMODEL"
mips32    -> "-mips1 -mcpu=SUBMODEL" mips32-
mips64    -> "-mips3 -mcpu=SUBMODEL" mips64-
ppc       -> "-mcpu=SUBMODEL" ppc
ppc64     -> "-mcpu=SUBMODEL" ppc
</mach_opt>

# Note that the 'linking' bit means "use this for both compiling *and* linking"
<mach_abi_linking>
amd64   -> "-m64"
mips64  -> "-mabi=64"
s390    -> "-m31"
s390x   -> "-m64"
sparc32 -> "-m32 -mno-app-regs"
sparc64 -> "-m64 -mno-app-regs"
ppc64   -> "-m64"

# This should probably be used on most/all targets, but the docs are incomplete
openbsd -> "-pthread"
freebsd -> "-pthread"
dragonfly -> "-pthread"
netbsd  -> "-pthread -D_NETBSD_SOURCE"
qnx     -> "-fexceptions -D_QNX_SOURCE"
</mach_abi_linking>