summaryrefslogtreecommitdiffstats
path: root/comm/third_party/botan/src/build-data/cc
diff options
context:
space:
mode:
Diffstat (limited to 'comm/third_party/botan/src/build-data/cc')
-rw-r--r--comm/third_party/botan/src/build-data/cc/clang.txt85
-rw-r--r--comm/third_party/botan/src/build-data/cc/ekopath.txt17
-rw-r--r--comm/third_party/botan/src/build-data/cc/gcc.txt99
-rw-r--r--comm/third_party/botan/src/build-data/cc/hpcc.txt18
-rw-r--r--comm/third_party/botan/src/build-data/cc/icc.txt24
-rw-r--r--comm/third_party/botan/src/build-data/cc/msvc.txt84
-rw-r--r--comm/third_party/botan/src/build-data/cc/pgi.txt15
-rw-r--r--comm/third_party/botan/src/build-data/cc/sunstudio.txt39
-rw-r--r--comm/third_party/botan/src/build-data/cc/xlc.txt26
9 files changed, 407 insertions, 0 deletions
diff --git a/comm/third_party/botan/src/build-data/cc/clang.txt b/comm/third_party/botan/src/build-data/cc/clang.txt
new file mode 100644
index 0000000000..a9c9be87f9
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/clang.txt
@@ -0,0 +1,85 @@
+macro_name CLANG
+
+binary_name clang++
+
+lang_flags "-std=c++11 -D_REENTRANT"
+
+warning_flags "-Wall -Wextra -Wpedantic -Wshadow -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual"
+
+werror_flags "-Werror -Wno-error=unused-parameter -Wno-error=unreachable-code -Wno-error=unused-lambda-capture"
+
+maintainer_warning_flags "-Wunreachable-code -Wdocumentation -Qunused-arguments"
+
+optimization_flags "-O3"
+sanitizer_optimization_flags "-O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer"
+size_optimization_flags "-Os"
+
+add_sysroot_option "--sysroot="
+
+<sanitizers>
+default -> address,undefined
+
+address -> "-fsanitize=address"
+undefined -> "-fsanitize=undefined -fno-sanitize-recover=undefined"
+coverage -> "-fsanitize=fuzzer-no-link"
+memory -> "-fsanitize=memory"
+</sanitizers>
+
+shared_flags "-fPIC"
+coverage_flags "--coverage"
+stack_protector_flags "-fstack-protector"
+
+visibility_build_flags "-fvisibility=hidden"
+visibility_attribute '__attribute__((visibility("default")))'
+
+<so_link_commands>
+macos -> "$(CXX) -dynamiclib -fPIC -install_name $(INSTALLED_LIB_DIR)/{soname_abi} -current_version {macos_so_current_ver} -compatibility_version {macos_so_compat_ver}"
+
+# The default works for GNU ld and several other Unix linkers
+default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
+</so_link_commands>
+
+<binary_link_commands>
+default -> "$(LINKER)"
+llvm -> "llvm-link"
+emscripten -> "em++"
+</binary_link_commands>
+
+<isa_flags>
+sse2 -> "-msse2"
+ssse3 -> "-mssse3"
+sse41 -> "-msse4.1"
+sse42 -> "-msse4.2"
+avx2 -> "-mavx2"
+bmi2 -> "-mbmi -mbmi2"
+aesni -> "-maes -mpclmul"
+rdrand -> "-mrdrnd"
+rdseed -> "-mrdseed"
+sha -> "-msha"
+altivec -> "-maltivec"
+
+ppc64:powercrypto -> "-mcrypto -mvsx"
+ppc64:power9 -> "-mcpu=power9"
+
+arm64:armv8crypto -> "-march=armv8+crypto"
+
+arm32:neon -> "-mfpu=neon"
+arm64:neon -> ""
+</isa_flags>
+
+<cpu_flags>
+llvm -> "-emit-llvm -fno-use-cxa-atexit"
+</cpu_flags>
+
+<mach_abi_linking>
+all!haiku,llvm -> "-pthread"
+
+openmp -> "-fopenmp"
+
+x86_32 -> "-m32"
+x86_64 -> "-m64"
+ppc64 -> "-m64"
+
+macos -> "-stdlib=libc++"
+ios -> "-stdlib=libc++"
+</mach_abi_linking>
diff --git a/comm/third_party/botan/src/build-data/cc/ekopath.txt b/comm/third_party/botan/src/build-data/cc/ekopath.txt
new file mode 100644
index 0000000000..490396ac43
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/ekopath.txt
@@ -0,0 +1,17 @@
+macro_name PATHSCALE
+
+binary_name pathCC
+
+optimization_flags "-O3"
+
+lang_flags "-D_REENTRANT -ansi -Wno-long-long"
+warning_flags "-W -Wall"
+
+ar_command pathCC
+ar_options "-ar -o"
+
+shared_flags "-fPIC"
+
+<so_link_commands>
+default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
+</so_link_commands>
diff --git a/comm/third_party/botan/src/build-data/cc/gcc.txt b/comm/third_party/botan/src/build-data/cc/gcc.txt
new file mode 100644
index 0000000000..711c48f76c
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/gcc.txt
@@ -0,0 +1,99 @@
+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"
+
+# Boost headers have 0 as nullptr and non-virtual-dtor issues so we can't werror on them
+werror_flags "-Werror -Wno-error=strict-overflow -Wno-error=zero-as-null-pointer-constant -Wno-error=non-virtual-dtor"
+
+maintainer_warning_flags "-Wstrict-overflow=5 -Wold-style-cast -Wsuggest-override -Wshadow -Wextra-semi"
+
+optimization_flags "-O3"
+sanitizer_optimization_flags "-O1 -fno-optimize-sibling-calls -fno-omit-frame-pointer"
+size_optimization_flags "-Os"
+
+shared_flags "-fPIC"
+coverage_flags "--coverage"
+stack_protector_flags "-fstack-protector"
+
+add_sysroot_option "--sysroot="
+
+<sanitizers>
+default -> iterator,address
+
+iterator -> "-D_GLIBCXX_DEBUG"
+address -> "-fsanitize=address"
+undefined -> "-fsanitize=undefined -fno-sanitize-recover=undefined"
+</sanitizers>
+
+visibility_build_flags "-fvisibility=hidden"
+visibility_attribute '__attribute__((visibility("default")))'
+
+<so_link_commands>
+# The default works for GNU ld and several other Unix linkers
+default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
+
+# macOS, HP-UX, and Solaris linkers use different syntax
+macos -> "$(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"
+</so_link_commands>
+
+<binary_link_commands>
+default -> "$(LINKER)"
+</binary_link_commands>
+
+<isa_flags>
+sse2 -> "-msse2"
+ssse3 -> "-mssse3"
+sse41 -> "-msse4.1"
+sse42 -> "-msse4.2"
+avx2 -> "-mavx2"
+bmi2 -> "-mbmi -mbmi2"
+aesni -> "-maes -mpclmul"
+rdrand -> "-mrdrnd"
+rdseed -> "-mrdseed"
+sha -> "-msha"
+altivec -> "-maltivec"
+
+powercrypto -> "-mcrypto -mvsx"
+ppc64:power9 -> "-mcpu=power9"
+
+arm64:armv8crypto -> ""
+arm64:armv8sm3 -> "-march=armv8.2-a+sm4"
+arm64:armv8sm4 -> "-march=armv8.2-a+sm4"
+arm64:armv8sha512 -> "-march=armv8.2-a+sha3"
+arm64:armv8sha3 -> "-march=armv8.2-a+sha3"
+
+# For Aarch32 -mfpu=neon is required
+# For Aarch64 NEON is enabled by default
+arm32:neon -> "-mfpu=neon"
+arm64:neon -> ""
+</isa_flags>
+
+# Flags set here are included at compile and link time
+<mach_abi_linking>
+all!haiku,qnx,none -> "-pthread"
+
+openmp -> "-fopenmp"
+
+s390 -> "-m31"
+s390x -> "-m64"
+sparc32 -> "-m32 -mno-app-regs"
+sparc64 -> "-m64 -mno-app-regs"
+ppc64 -> "-m64"
+x86_32 -> "-m32"
+x86_64 -> "-m64"
+x32 -> "-mx32"
+
+qnx -> "-fexceptions"
+cygwin -> "-U__STRICT_ANSI__"
+</mach_abi_linking>
diff --git a/comm/third_party/botan/src/build-data/cc/hpcc.txt b/comm/third_party/botan/src/build-data/cc/hpcc.txt
new file mode 100644
index 0000000000..cbe50c37d9
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/hpcc.txt
@@ -0,0 +1,18 @@
+macro_name HP_ACC
+
+binary_name aCC
+
+lang_flags "-AA -ext +eh -z"
+optimization_flags "+O2"
+warning_flags "+w"
+shared_flags "+Z"
+
+<mach_abi_linking>
+hppa1.0 -> "+DAportable"
+hppa1.1 -> "+DA1.1"
+hppa2.0 -> "+DA2.0W"
+</mach_abi_linking>
+
+<so_link_commands>
+default -> "$(CXX) +Z -b -Wl,+h,{soname_abi}" # Documented in cc(1), but not CC(1) (?)
+</so_link_commands>
diff --git a/comm/third_party/botan/src/build-data/cc/icc.txt b/comm/third_party/botan/src/build-data/cc/icc.txt
new file mode 100644
index 0000000000..c8a1aa3dc7
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/icc.txt
@@ -0,0 +1,24 @@
+macro_name INTEL
+
+binary_name icpc
+
+optimization_flags "-O2"
+size_optimization_flags "-Os"
+
+lang_flags "-std=c++11"
+warning_flags "-w1"
+shared_flags "-fPIC"
+
+<isa_flags>
+sse2 -> "-msse2"
+ssse3 -> "-mssse3"
+sse41 -> "-msse4.1"
+sse42 -> "-msse4.2"
+avx2 -> "-march=core-avx2"
+aesni -> "-march=corei7"
+rdrand -> "-march=core-avx-i"
+</isa_flags>
+
+<so_link_commands>
+default -> "$(CXX) -fPIC -shared -Wl,-soname,{soname_abi}"
+</so_link_commands>
diff --git a/comm/third_party/botan/src/build-data/cc/msvc.txt b/comm/third_party/botan/src/build-data/cc/msvc.txt
new file mode 100644
index 0000000000..25e39d2227
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/msvc.txt
@@ -0,0 +1,84 @@
+macro_name MSVC
+
+binary_name cl
+linker_name link
+
+output_to_object "/Fo"
+output_to_exe "/OUT:"
+
+add_include_dir_option "/I"
+add_lib_dir_option "/LIBPATH:"
+add_compile_definition_option "/D"
+add_lib_option "%s.lib"
+
+compile_flags "/nologo /c"
+
+optimization_flags "/O2 /Oi"
+size_optimization_flags "/O1 /Os"
+
+# for debug info in the object file:
+#debug_info_flags "/Z7"
+
+# for using a PDB file:
+debug_info_flags "/Zi /FS"
+
+preproc_flags "/nologo /EP"
+
+lang_flags "/EHs /GR"
+
+# 4250: diamond inheritence warning
+# 4251: STL types used in DLL interface
+# 4275: ???
+# 4127: conditional expression is constant, consider using if constexpr
+warning_flags "/W4 /wd4250 /wd4251 /wd4275 /wd4127"
+
+werror_flags "/WX"
+
+visibility_build_flags "/DBOTAN_DLL=__declspec(dllexport)"
+visibility_attribute "__declspec(dllimport)"
+
+ar_command lib
+ar_options "/nologo"
+ar_output_to "/OUT:"
+
+<sanitizers>
+default -> iterator
+
+iterator -> "/D_ITERATOR_DEBUG_LEVEL=1"
+</sanitizers>
+
+<isa_flags>
+sse2 -> ""
+ssse3 -> ""
+sse41 -> ""
+sse42 -> ""
+x86_64:avx2 -> "/arch:AVX"
+bmi2 -> ""
+aesni -> ""
+clmul -> ""
+rdrand -> ""
+rdseed -> ""
+sha -> ""
+</isa_flags>
+
+<lib_flags>
+debug -> "/Fd%{build_dir}/%{libname}%{lib_suffix}.pdb"
+</lib_flags>
+
+<so_link_commands>
+default -> "$(LINKER) /DLL"
+default-debug -> "$(LINKER) /DLL /DEBUG"
+</so_link_commands>
+
+<binary_link_commands>
+default -> "$(LINKER)"
+default-debug -> "$(LINKER) /DEBUG"
+</binary_link_commands>
+
+<mach_abi_linking>
+all -> "/bigobj"
+
+# These can be overridden with --msvc-runtime option
+rt -> "/MD"
+rt-debug -> "/MDd"
+</mach_abi_linking>
diff --git a/comm/third_party/botan/src/build-data/cc/pgi.txt b/comm/third_party/botan/src/build-data/cc/pgi.txt
new file mode 100644
index 0000000000..811578cdca
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/pgi.txt
@@ -0,0 +1,15 @@
+macro_name PGI
+
+binary_name pgc++
+
+lang_flags "-std=c++11"
+
+optimization_flags "-O3"
+shared_flags "-fPIC"
+
+visibility_build_flags "-fvisibility=hidden"
+visibility_attribute '__attribute__((visibility("default")))'
+
+<so_link_commands>
+default -> "$(CXX) -shared -fPIC -Wl,-soname,{soname_abi}"
+</so_link_commands>
diff --git a/comm/third_party/botan/src/build-data/cc/sunstudio.txt b/comm/third_party/botan/src/build-data/cc/sunstudio.txt
new file mode 100644
index 0000000000..3dd8e00b02
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/sunstudio.txt
@@ -0,0 +1,39 @@
+macro_name SUN_STUDIO
+
+binary_name CC
+
+optimization_flags "-xO2"
+
+shared_flags "-KPIC"
+warning_flags "+w -erroff=truncwarn,wnoretvalue,wlessrestrictedthrow"
+lang_flags "-std=c++11 +p -features=extensions"
+
+ar_command CC
+ar_options "-xar -o"
+
+<so_link_commands>
+default -> "$(CXX) -G -h{soname_abi}"
+</so_link_commands>
+
+<mach_abi_linking>
+# Needed on some Linux distros
+linux -> "-library=stlport4"
+
+sparc64 -> "-m64 -xarch=sparc"
+x86_64 -> "-m64"
+</mach_abi_linking>
+
+<isa_flags>
+# Botan needs C++11, and that requires Sun Studio 12.4 or above.
+# Sun Studio 12.4 supports upto -xarch=avx2, but the processor must support it
+# AESNI requires -xarch=aes, and RDRAND requires -xarch=avx_i.
+# https://docs.oracle.com/cd/E37069_01/html/E37074/bjapp.html#OSSCGbkazd
+sse2 -> "-xarch=sse2"
+ssse3 -> "-xarch=ssse3"
+sse41 -> "-xarch=sse4.1"
+sse42 -> "-xarch=sse4.2"
+aesni -> "-xarch=aes"
+avx -> "-xarch=avx"
+rdrand -> "-xarch=avx_i"
+avx2 -> "-xarch=avx2"
+</isa_flags>
diff --git a/comm/third_party/botan/src/build-data/cc/xlc.txt b/comm/third_party/botan/src/build-data/cc/xlc.txt
new file mode 100644
index 0000000000..a54b7f91f0
--- /dev/null
+++ b/comm/third_party/botan/src/build-data/cc/xlc.txt
@@ -0,0 +1,26 @@
+macro_name XLC
+
+binary_name xlC
+
+optimization_flags "-O2"
+
+lang_flags "-std=c++11"
+
+visibility_build_flags "-fvisibility=hidden"
+visibility_attribute '__attribute__((visibility("default")))'
+
+<isa_flags>
+altivec -> "-qaltivec"
+</isa_flags>
+
+<so_link_commands>
+default -> "$(CXX) -qmkshrobj"
+</so_link_commands>
+
+<sanitizers>
+default -> address
+
+all -> "-qcheck=all"
+address -> "-qcheck=bounds:stackclobber:unset"
+undefined -> "-qcheck=nullptr:divzero"
+</sanitizers>