aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-10-26 15:36:23 -0400
committerJack Lloyd <[email protected]>2015-10-26 15:36:23 -0400
commit299119f02c09e7d3e657b13e1706cb653eff560c (patch)
tree18227f400786a023ca7a13cd8f6f541d56c962f7 /src
parent54540244c1d89faa5b359c75a9c38b6fed0a08c9 (diff)
Remove --build-mode and add individual toggles for optimization, debug,
sanitizers and coverage as all 4 are usefully set independently. Use GCC 4.9 on CircleCI as it seems to be supported. Add ASan + UBSan test.
Diffstat (limited to 'src')
-rw-r--r--src/build-data/buildh.in2
-rw-r--r--src/build-data/makefile/header.in2
-rwxr-xr-xsrc/scripts/ci/circle/clang-shared-debug.sh2
-rwxr-xr-xsrc/scripts/ci/circle/clang-static-debug.sh2
-rwxr-xr-xsrc/scripts/ci/circle/gcc-sanitizer.sh11
-rwxr-xr-xsrc/scripts/ci/circle/gcc-shared-debug.sh2
-rwxr-xr-xsrc/scripts/ci/circle/gcc-static-debug.sh2
-rwxr-xr-xsrc/scripts/ci/travis/build.sh5
-rw-r--r--src/tests/test_ffi.cpp3
9 files changed, 20 insertions, 11 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in
index 23bb86e20..31277ff0c 100644
--- a/src/build-data/buildh.in
+++ b/src/build-data/buildh.in
@@ -6,7 +6,7 @@
* %{user}@%{hostname} running '%{command_line}'
*
* Target
-* - Compiler: %{cxx} %{cc_compile_flags}
+* - Compiler: %{cxx} %{cxx_abi_flags} %{cc_compile_flags}
* - Arch: %{submodel}/%{arch}
* - OS: %{os}
*/
diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in
index 3c4272d05..eaf4b511d 100644
--- a/src/build-data/makefile/header.in
+++ b/src/build-data/makefile/header.in
@@ -1,5 +1,5 @@
# Compiler Options
-CXX = %{cxx}
+CXX = %{cxx} %{cxx_abi_flags}
LINKER = %{linker}
CXXFLAGS = %{cc_compile_flags}
diff --git a/src/scripts/ci/circle/clang-shared-debug.sh b/src/scripts/ci/circle/clang-shared-debug.sh
index 2ef4e6dd5..5f38cad7c 100755
--- a/src/scripts/ci/circle/clang-shared-debug.sh
+++ b/src/scripts/ci/circle/clang-shared-debug.sh
@@ -5,6 +5,6 @@ which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if avai
BUILD_NICKNAME=$(basename "$0" .sh)
BUILD_DIR="./build-$BUILD_NICKNAME"
-./configure.py --with-build-dir="$BUILD_DIR" --build-mode=debug --cc=clang
+./configure.py --with-build-dir="$BUILD_DIR" --with-debug-info --cc=clang
make -j 2 -f "$BUILD_DIR"/Makefile
"$BUILD_DIR"/botan-test
diff --git a/src/scripts/ci/circle/clang-static-debug.sh b/src/scripts/ci/circle/clang-static-debug.sh
index 6341dd467..56f111190 100755
--- a/src/scripts/ci/circle/clang-static-debug.sh
+++ b/src/scripts/ci/circle/clang-static-debug.sh
@@ -5,6 +5,6 @@ which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if avai
BUILD_NICKNAME=$(basename "$0" .sh)
BUILD_DIR="./build-$BUILD_NICKNAME"
-./configure.py --with-build-dir="$BUILD_DIR" --build-mode=debug --cc=clang --disable-shared
+./configure.py --with-build-dir="$BUILD_DIR" --with-debug-info --cc=clang --disable-shared
make -j 2 -f "$BUILD_DIR"/Makefile
"$BUILD_DIR"/botan-test
diff --git a/src/scripts/ci/circle/gcc-sanitizer.sh b/src/scripts/ci/circle/gcc-sanitizer.sh
new file mode 100755
index 000000000..33d474fc6
--- /dev/null
+++ b/src/scripts/ci/circle/gcc-sanitizer.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -ev
+which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if available
+
+BUILD_NICKNAME=$(basename "$0" .sh)
+BUILD_DIR="./build-$BUILD_NICKNAME"
+
+# Adding Ubsan here, only added in GCC 4.9
+./configure.py --with-build-dir="$BUILD_DIR" --with-debug-info --with-sanitizer --cc-abi-flags='-fsanitize=undefined'
+make -j 2 -f "$BUILD_DIR"/Makefile
+"$BUILD_DIR"/botan-test
diff --git a/src/scripts/ci/circle/gcc-shared-debug.sh b/src/scripts/ci/circle/gcc-shared-debug.sh
index 93530b8ac..4f5ed1b6d 100755
--- a/src/scripts/ci/circle/gcc-shared-debug.sh
+++ b/src/scripts/ci/circle/gcc-shared-debug.sh
@@ -5,6 +5,6 @@ which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if avai
BUILD_NICKNAME=$(basename "$0" .sh)
BUILD_DIR="./build-$BUILD_NICKNAME"
-./configure.py --with-build-dir="$BUILD_DIR" --build-mode=debug
+./configure.py --with-build-dir="$BUILD_DIR" --with-debug
make -j 2 -f "$BUILD_DIR"/Makefile
"$BUILD_DIR"/botan-test
diff --git a/src/scripts/ci/circle/gcc-static-debug.sh b/src/scripts/ci/circle/gcc-static-debug.sh
index c7d23b9b0..76f4c46b7 100755
--- a/src/scripts/ci/circle/gcc-static-debug.sh
+++ b/src/scripts/ci/circle/gcc-static-debug.sh
@@ -5,6 +5,6 @@ which shellcheck > /dev/null && shellcheck "$0" # Run shellcheck on this if avai
BUILD_NICKNAME=$(basename "$0" .sh)
BUILD_DIR="./build-$BUILD_NICKNAME"
-./configure.py --with-build-dir="$BUILD_DIR" --build-mode=debug --disable-shared --via-amalgamation
+./configure.py --with-build-dir="$BUILD_DIR" --with-debug-info --disable-shared --via-amalgamation
make -j 2 -f "$BUILD_DIR"/Makefile
"$BUILD_DIR"/botan-test
diff --git a/src/scripts/ci/travis/build.sh b/src/scripts/ci/travis/build.sh
index bb52f0648..092e9cbe6 100755
--- a/src/scripts/ci/travis/build.sh
+++ b/src/scripts/ci/travis/build.sh
@@ -7,10 +7,9 @@ if [ "$BUILD_MODE" = "static" ]; then
elif [ "$BUILD_MODE" = "shared" ]; then
CFG_FLAGS=()
elif [ "$BUILD_MODE" = "coverage" ]; then
- # lcov gets confused by symlinks
- CFG_FLAGS=(--build-mode=coverage --link-method=copy)
+ CFG_FLAGS=(--with-coverage)
elif [ "$BUILD_MODE" = "sanitizer" ]; then
- CFG_FLAGS=(--build-mode=sanitizer)
+ CFG_FLAGS=(--with-sanitizer)
fi
if [ "$MODULES" = "min" ]; then
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index edc06f90a..5f788d8d9 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -155,8 +155,7 @@ TEST_CASE("FFI PBKDF", "[ffi]")
CHECK(iters_10ms >= 10000);
/*
- * Tests deactivated due to consistetly failing in debug mode where -W0 is set
- * (./configure.py --build-mode=debug).
+ * Tests deactivated due to consistently failing when optimizations are disabled
* See also: https://github.com/randombit/botan/commit/30b0e3c88e94ba04c1843798f7ac74a008e01d9b
*/
/*