macro_name GCC binary_name g++ lang_flags "-std=c++11 -D_REENTRANT" # This should only contain flags which are included in GCC 4.8 warning_flags "-Wall -Wextra -Wpedantic -Wstrict-aliasing -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wzero-as-null-pointer-constant -Wnon-virtual-dtor" maintainer_warning_flags "-Wstrict-overflow=5 -Wold-style-cast -Wsuggest-override -Wshadow -Werror -Wno-error=strict-overflow -Wno-error=deprecated-declarations" optimization_flags "-O3" size_optimization_flags "-Os" shared_flags "-fPIC" coverage_flags "--coverage" stack_protector_flags "-fstack-protector" # GCC 4.8 sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address" # GCC 4.9 and later #sanitizer_flags "-D_GLIBCXX_DEBUG -fsanitize=address,undefined -fno-sanitize-recover=undefined" visibility_build_flags "-fvisibility=hidden" visibility_attribute '__attribute__((visibility("default")))' # The default works for GNU ld and several other Unix linkers default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}" # Darwin, HP-UX and Solaris linkers use different syntax darwin -> "$(CXX) -dynamiclib -fPIC -install_name $(INSTALLED_LIB_DIR)/{soname_abi}" hpux -> "$(CXX) -shared -fPIC -Wl,+h,{soname_abi}" solaris -> "$(CXX) -shared -fPIC -Wl,-h,{soname_abi}" # AIX and OpenBSD don't use sonames at all aix -> "$(CXX) -shared -fPIC" openbsd -> "$(CXX) -shared -fPIC" linux -> "$(LINKER) -Wl,-rpath=\$$ORIGIN" default -> "$(LINKER)" sse2 -> "-msse2" ssse3 -> "-mssse3" sse41 -> "-msse4.1" sse42 -> "-msse4.2" avx2 -> "-mavx2" bmi2 -> "-mbmi2" aesni -> "-maes -mpclmul -mssse3" rdrand -> "-mrdrnd" rdseed -> "-mrdseed" sha -> "-msha" altivec -> "-maltivec" # For Aarch32 -mfpu=neon is required # For Aarch64 NEON is enabled by default arm32:neon -> "-mfpu=neon" arm64:neon -> "" x86_32 -> "-momit-leaf-frame-pointer" x86_64 -> "-momit-leaf-frame-pointer" # Flags set here are included at compile and link time all!haiku -> "-pthread" openmp -> "-fopenmp" mips64 -> "-mabi=64" s390 -> "-m31" s390x -> "-m64" sparc32 -> "-m32 -mno-app-regs" sparc64 -> "-m64 -mno-app-regs" ppc64 -> "-m64" x86_64 -> "-m64" netbsd -> "-D_NETBSD_SOURCE" qnx -> "-fexceptions -D_QNX_SOURCE" cygwin -> "-U__STRICT_ANSI__"