aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
authorMatthias Gierlings <[email protected]>2018-03-28 00:40:04 +0200
committerMatthias Gierlings <[email protected]>2018-03-28 00:57:18 +0200
commit95754e2618e2264ce9eb7c6eae493576b097b90f (patch)
treed9f2fa8e3d497ce8e61d6f867eda838c96de8473 /src/build-data
parent043db1e5c93abea4d8dff20ca3e562c244f1fad6 (diff)
Adds sanitizer support for the xlC compiler
- Option "--with-sanitizers" sets compiler flag "-qcheck=all" - Alternatively "--enable-sanitizers" can be set to either "address" which translates to "-qcheck=bounds:stackclobber:unset" or "undefined" which sets the flags "-qcheck=nullptr:divzero". The flags are explained here: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/compiler_ref/opt_check.html Currently compiling with "--with-sanitizers" or "--enable-sanitizers=undefined" will cause compilation to fail because of a "possible division by 0" in `Botan::bigint_divop`. This seems to be a false positive, before the division occurrs an Invalid_Argument exception will be thrown.
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/cc/xlc.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt
index 0ab45242a..8762aecd1 100644
--- a/src/build-data/cc/xlc.txt
+++ b/src/build-data/cc/xlc.txt
@@ -13,3 +13,9 @@ altivec -> "-qaltivec"
<so_link_commands>
default -> "$(CXX) -qmkshrobj"
</so_link_commands>
+
+<sanitizers>
+default -> "-qcheck=all"
+address -> "-qcheck=bounds:stackclobber:unset"
+undefined -> "-qcheck=nullptr:divzero"
+</sanitizers>