From 265cb5923c6cb0873ae45d78c1dc4a2cc24f9b17 Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Tue, 12 Mar 2019 19:03:54 +0100 Subject: [PATCH] compilers: -fsanitize is not supported on OpenBSD OpenBSD doesn't have any support for the compiler sanitizers yet. While this may change in the future, better fix test suite run in "failfast" mode for now. This can be revisited once (if) we get support in the future. * clang 7.0.1 $ make CFLAGS=-fsanitize=address foo cc -fsanitize=address -o foo foo.c cc: error: unsupported option '-fsanitize=address' for target 'amd64-unknown-openbsd6.5' * gcc 4.2.1 *** Error 1 in /tmp (:85 'foo') $ make CC=gcc CFLAGS=-fsanitize=address foo gcc -fsanitize=address -o foo foo.c cc1: error: unrecognized command line option "-fsanitize=address" * gcc 8.2.0 $ make CC=egcc CFLAGS=-fsanitize=address foo egcc -fsanitize=address -o foo foo.c ld: error: unable to find library -lasan collect2: error: ld returned 1 exit status --- run_unittests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run_unittests.py b/run_unittests.py index e2c3b35fa..a8510d08e 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4237,6 +4237,8 @@ class LinuxlikeTests(BasePlatformTests): def test_generate_gir_with_address_sanitizer(self): if is_cygwin(): raise unittest.SkipTest('asan not available on Cygwin') + if is_openbsd(): + raise unittest.SkipTest('-fsanitize=address is not supported on OpenBSD') testdir = os.path.join(self.framework_test_dir, '7 gnome') self.init(testdir, ['-Db_sanitize=address', '-Db_lundef=false'])