diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-11-25 16:31:39 +0000 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-11-25 16:35:35 +0000 |
commit | 8a769f816f8af7a8aac6f16874011c3e15280e38 (patch) | |
tree | eda23cbdda6dccbf3f6c73a7fa0f57390cb8937f /libsanitizer/configure.ac | |
parent | edb07cb95afc362f7f76d2ab1ed9d14ad0ee300d (diff) | |
download | gcc-8a769f816f8af7a8aac6f16874011c3e15280e38.zip gcc-8a769f816f8af7a8aac6f16874011c3e15280e38.tar.gz gcc-8a769f816f8af7a8aac6f16874011c3e15280e38.tar.bz2 |
libsanitizer: Only build libhwasan when targeting AArch64
Though the library has limited support for x86, we don't have any
support for generating code targeting x86 so there is no point building
for that target.
Ensure we build for AArch64 but not for AArch64 ilp32.
libsanitizer/ChangeLog:
* Makefile.am: Condition Build hwasan directory.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Set HWASAN_SUPPORTED based on target
architecture.
* configure.tgt: Likewise.
Diffstat (limited to 'libsanitizer/configure.ac')
-rw-r--r-- | libsanitizer/configure.ac | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac index f0d526c..13cd302 100644 --- a/libsanitizer/configure.ac +++ b/libsanitizer/configure.ac @@ -96,9 +96,11 @@ fi # Get target configury. unset TSAN_SUPPORTED unset LSAN_SUPPORTED +unset HWASAN_SUPPORTED . ${srcdir}/configure.tgt AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"]) AM_CONDITIONAL(LSAN_SUPPORTED, [test "x$LSAN_SUPPORTED" = "xyes"]) +AM_CONDITIONAL(HWASAN_SUPPORTED, [test "x$HWASAN_SUPPORTED" = "xyes"]) # Check for functions needed. AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime lstat readlink) @@ -352,7 +354,7 @@ AH_BOTTOM([#include "libbacktrace/backtrace-rename.h"]) AC_CONFIG_FILES([Makefile libsanitizer.spec libbacktrace/backtrace-supported.h]) AC_CONFIG_HEADER(config.h) -AC_CONFIG_FILES(AC_FOREACH([DIR], [interception sanitizer_common libbacktrace lsan asan hwasan ubsan], [DIR/Makefile ]), +AC_CONFIG_FILES(AC_FOREACH([DIR], [interception sanitizer_common libbacktrace lsan asan ubsan], [DIR/Makefile ]), [cat > vpsed$$ << \_EOF s!`test -f '$<' || echo '$(srcdir)/'`!! _EOF @@ -380,6 +382,21 @@ _EOF ]) fi +if test "x$HWASAN_SUPPORTED" = "xyes"; then + AC_CONFIG_FILES(AC_FOREACH([DIR], [hwasan], [DIR/Makefile ]), + [cat > vpsed$$ << \_EOF +s!`test -f '$<' || echo '$(srcdir)/'`!! +_EOF + sed -f vpsed$$ $ac_file > tmp$$ + mv tmp$$ $ac_file + rm vpsed$$ + echo 'MULTISUBDIR =' >> $ac_file + ml_norecursion=yes + . ${multi_basedir}/config-ml.in + AS_UNSET([ml_norecursion]) +]) +fi + AC_SUBST([TSAN_TARGET_DEPENDENT_OBJECTS]) AC_SUBST([SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS]) |