5
lang_flags "-std=c++11 -D_REENTRANT"
7
# This should only contain flags which are included in GCC 4.8
8
warning_flags "-Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor"
10
maintainer_warning_flags "-Wstrict-overflow=5 -Wold-style-cast -Wsuggest-override -Wshadow -Werror -Wno-error=strict-overflow -Wno-error=deprecated-declarations"
12
optimization_flags "-O3"
13
size_optimization_flags "-Os"
16
coverage_flags "--coverage"
17
stack_protector_flags "-fstack-protector"
20
sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address"
23
#sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address,undefined -fno-sanitize-recover=undefined"
25
visibility_build_flags "-fvisibility=hidden"
26
visibility_attribute '__attribute__((visibility("default")))'
29
# The default works for GNU ld and several other Unix linkers
30
default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
32
# Darwin, HP-UX and Solaris linkers use different syntax
33
darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(INSTALLED_LIB_DIR)/{soname_abi}"
34
hpux -> "$(CXX) -shared -fPIC -Wl,+h,{soname_abi}"
35
solaris -> "$(CXX) -shared -fPIC -Wl,-h,{soname_abi}"
37
# AIX and OpenBSD don't use sonames at all
38
aix -> "$(CXX) -shared -fPIC"
39
openbsd -> "$(CXX) -shared -fPIC"
42
<binary_link_commands>
43
linux -> "$(LINKER) -Wl,-rpath=\$$ORIGIN"
44
default -> "$(LINKER)"
45
</binary_link_commands>
54
aesni -> "-maes -mpclmul -mssse3"
58
altivec -> "-maltivec"
60
# For Aarch32 -mfpu=neon is required
61
# For Aarch64 NEON is enabled by default
62
arm32:neon -> "-mfpu=neon"
67
# Avoid using -march=i[3456]86, instead tune for generic
68
i386 -> "-mtune=generic"
69
i486 -> "-mtune=generic"
70
i586 -> "-mtune=generic"
71
i686 -> "-mtune=generic"
73
# Translate to GCC-speak
74
nehalem -> "-march=corei7"
75
sandybridge -> "-march=corei7-avx"
76
ivybridge -> "-march=core-avx-i"
78
ppc601 -> "-mpowerpc -mcpu=601"
79
cellppu -> "-mcpu=cell"
80
e500v2 -> "-mcpu=8548"
82
# No scheduler in GCC for anything after EV67
83
alpha-ev68 -> "-mcpu=ev67"
84
alpha-ev7 -> "-mcpu=ev67"
86
# The patch from Debian bug 594159 has this, don't know why though...
89
# Default family options (SUBMODEL is substitued with the actual
90
# submodel name). Anything after the pipe will be removed from the
91
# submodel name before it's put into SUBMODEL.
93
alpha -> "-mcpu=SUBMODEL|alpha-"
94
arm32 -> "-march=SUBMODEL"
95
arm64 -> "-march=SUBMODEL"
96
superh -> "-mSUBMODEL|sh"
97
hppa -> "-march=SUBMODEL|hppa"
98
ia64 -> "-mtune=SUBMODEL"
100
mips32 -> "-mips1 -mcpu=SUBMODEL|mips32-"
101
mips64 -> "-mips3 -mcpu=SUBMODEL|mips64-"
102
ppc32 -> "-mcpu=SUBMODEL|ppc"
103
ppc64 -> "-mcpu=SUBMODEL|ppc"
104
sparc32 -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus|sparc32-"
105
sparc64 -> "-mcpu=v9 -mtune=SUBMODEL"
106
x86_32 -> "-march=SUBMODEL"
107
x86_64 -> "-march=SUBMODEL"
109
all_x86_32 -> "-momit-leaf-frame-pointer"
110
all_x86_64 -> "-momit-leaf-frame-pointer"
113
# Flags set here are included at compile and link time
115
all!haiku -> "-pthread"
122
sparc32 -> "-m32 -mno-app-regs"
123
sparc64 -> "-m64 -mno-app-regs"
127
netbsd -> "-D_NETBSD_SOURCE"
128
qnx -> "-fexceptions -D_QNX_SOURCE"
129
cygwin -> "-U__STRICT_ANSI__"