aboutsummaryrefslogtreecommitdiff
path: root/libsanitizer/configure
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2020-11-25 16:31:39 +0000
committerMatthew Malcomson <matthew.malcomson@arm.com>2020-11-25 16:35:35 +0000
commit8a769f816f8af7a8aac6f16874011c3e15280e38 (patch)
treeeda23cbdda6dccbf3f6c73a7fa0f57390cb8937f /libsanitizer/configure
parentedb07cb95afc362f7f76d2ab1ed9d14ad0ee300d (diff)
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')
-rwxr-xr-xlibsanitizer/configure48
1 files changed, 34 insertions, 14 deletions
diff --git a/libsanitizer/configure b/libsanitizer/configure
index 27e72c089cb..720d4e17044 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -659,6 +659,8 @@ link_libubsan
link_libtsan
link_libhwasan
link_libasan
+HWASAN_SUPPORTED_FALSE
+HWASAN_SUPPORTED_TRUE
LSAN_SUPPORTED_FALSE
LSAN_SUPPORTED_TRUE
TSAN_SUPPORTED_FALSE
@@ -12362,7 +12364,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12365 "configure"
+#line 12367 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12468,7 +12470,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12471 "configure"
+#line 12473 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15819,6 +15821,7 @@ fi
# Get target configury.
unset TSAN_SUPPORTED
unset LSAN_SUPPORTED
+unset HWASAN_SUPPORTED
. ${srcdir}/configure.tgt
if test "x$TSAN_SUPPORTED" = "xyes"; then
TSAN_SUPPORTED_TRUE=
@@ -15836,6 +15839,14 @@ else
LSAN_SUPPORTED_FALSE=
fi
+ if test "x$HWASAN_SUPPORTED" = "xyes"; then
+ HWASAN_SUPPORTED_TRUE=
+ HWASAN_SUPPORTED_FALSE='#'
+else
+ HWASAN_SUPPORTED_TRUE='#'
+ HWASAN_SUPPORTED_FALSE=
+fi
+
# Check for functions needed.
for ac_func in clock_getres clock_gettime clock_settime lstat readlink
@@ -16818,7 +16829,7 @@ ac_config_files="$ac_config_files Makefile libsanitizer.spec libbacktrace/backtr
ac_config_headers="$ac_config_headers config.h"
-ac_config_files="$ac_config_files interception/Makefile sanitizer_common/Makefile libbacktrace/Makefile lsan/Makefile asan/Makefile hwasan/Makefile ubsan/Makefile"
+ac_config_files="$ac_config_files interception/Makefile sanitizer_common/Makefile libbacktrace/Makefile lsan/Makefile asan/Makefile ubsan/Makefile"
if test "x$TSAN_SUPPORTED" = "xyes"; then
@@ -16826,6 +16837,11 @@ if test "x$TSAN_SUPPORTED" = "xyes"; then
fi
+if test "x$HWASAN_SUPPORTED" = "xyes"; then
+ ac_config_files="$ac_config_files hwasan/Makefile"
+
+fi
+
@@ -17090,6 +17106,10 @@ if test -z "${LSAN_SUPPORTED_TRUE}" && test -z "${LSAN_SUPPORTED_FALSE}"; then
as_fn_error $? "conditional \"LSAN_SUPPORTED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HWASAN_SUPPORTED_TRUE}" && test -z "${HWASAN_SUPPORTED_FALSE}"; then
+ as_fn_error $? "conditional \"HWASAN_SUPPORTED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${USING_MAC_INTERPOSE_TRUE}" && test -z "${USING_MAC_INTERPOSE_FALSE}"; then
as_fn_error $? "conditional \"USING_MAC_INTERPOSE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -18099,9 +18119,9 @@ do
"libbacktrace/Makefile") CONFIG_FILES="$CONFIG_FILES libbacktrace/Makefile" ;;
"lsan/Makefile") CONFIG_FILES="$CONFIG_FILES lsan/Makefile" ;;
"asan/Makefile") CONFIG_FILES="$CONFIG_FILES asan/Makefile" ;;
- "hwasan/Makefile") CONFIG_FILES="$CONFIG_FILES hwasan/Makefile" ;;
"ubsan/Makefile") CONFIG_FILES="$CONFIG_FILES ubsan/Makefile" ;;
"tsan/Makefile") CONFIG_FILES="$CONFIG_FILES tsan/Makefile" ;;
+ "hwasan/Makefile") CONFIG_FILES="$CONFIG_FILES hwasan/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -20035,7 +20055,7 @@ _EOF
. ${multi_basedir}/config-ml.in
{ ml_norecursion=; unset ml_norecursion;}
;;
- "hwasan/Makefile":F) cat > vpsed$$ << \_EOF
+ "ubsan/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$
@@ -20046,18 +20066,18 @@ _EOF
. ${multi_basedir}/config-ml.in
{ ml_norecursion=; unset ml_norecursion;}
;;
- "ubsan/Makefile":F) cat > vpsed$$ << \_EOF
+ "tsan/Makefile":F) 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
- { ml_norecursion=; unset ml_norecursion;}
+ sed -f vpsed$$ $ac_file > tmp$$
+ mv tmp$$ $ac_file
+ rm vpsed$$
+ echo 'MULTISUBDIR =' >> $ac_file
+ ml_norecursion=yes
+ . ${multi_basedir}/config-ml.in
+ { ml_norecursion=; unset ml_norecursion;}
;;
- "tsan/Makefile":F) cat > vpsed$$ << \_EOF
+ "hwasan/Makefile":F) cat > vpsed$$ << \_EOF
s!`test -f '$<' || echo '$(srcdir)/'`!!
_EOF
sed -f vpsed$$ $ac_file > tmp$$