diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-11-25 16:31:37 +0000 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-11-25 16:35:33 +0000 |
commit | edb07cb95afc362f7f76d2ab1ed9d14ad0ee300d (patch) | |
tree | 1a158b0deb1e6ec2b5b7f41adf2a35493ec12391 /libsanitizer/configure | |
parent | 8eb12742e8ae5a16e05be627c701234dc7c13504 (diff) | |
download | gcc-edb07cb95afc362f7f76d2ab1ed9d14ad0ee300d.zip gcc-edb07cb95afc362f7f76d2ab1ed9d14ad0ee300d.tar.gz gcc-edb07cb95afc362f7f76d2ab1ed9d14ad0ee300d.tar.bz2 |
libsanitizer: Tie the hwasan library into our build system
This patch tries to tie libhwasan into the GCC build system in the same way
that the other sanitizer runtime libraries are handled.
libsanitizer/ChangeLog:
* Makefile.am: Build libhwasan.
* Makefile.in: Build libhwasan.
* asan/Makefile.in: Build libhwasan.
* configure: Build libhwasan.
* configure.ac: Build libhwasan.
* hwasan/Makefile.am: New file.
* hwasan/Makefile.in: New file.
* hwasan/libtool-version: New file.
* interception/Makefile.in: Build libhwasan.
* libbacktrace/Makefile.in: Build libhwasan.
* libsanitizer.spec.in: Build libhwasan.
* lsan/Makefile.in: Build libhwasan.
* sanitizer_common/Makefile.in: Build libhwasan.
* tsan/Makefile.in: Build libhwasan.
* ubsan/Makefile.in: Build libhwasan.
Diffstat (limited to 'libsanitizer/configure')
-rwxr-xr-x | libsanitizer/configure | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/libsanitizer/configure b/libsanitizer/configure index 04eca04..27e72c0 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -657,6 +657,7 @@ USING_MAC_INTERPOSE_TRUE link_liblsan link_libubsan link_libtsan +link_libhwasan link_libasan LSAN_SUPPORTED_FALSE LSAN_SUPPORTED_TRUE @@ -12361,7 +12362,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12364 "configure" +#line 12365 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12467,7 +12468,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12470 "configure" +#line 12471 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15943,6 +15944,10 @@ fi link_libasan=$link_sanitizer_common +# Set up the set of additional libraries that we need to link against for libhwasan. +link_libhwasan=$link_sanitizer_common + + # Set up the set of additional libraries that we need to link against for libtsan. link_libtsan=$link_sanitizer_common @@ -16813,7 +16818,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 ubsan/Makefile" +ac_config_files="$ac_config_files interception/Makefile sanitizer_common/Makefile libbacktrace/Makefile lsan/Makefile asan/Makefile hwasan/Makefile ubsan/Makefile" if test "x$TSAN_SUPPORTED" = "xyes"; then @@ -16862,7 +16867,7 @@ case "$host" in case "$enable_cet" in auto) # Check if target supports multi-byte NOPs - # and if assembler supports CET insn. + # and if compiler and assembler support CET insn. cet_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fcf-protection" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18094,6 +18099,7 @@ 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" ;; @@ -20029,6 +20035,17 @@ _EOF . ${multi_basedir}/config-ml.in { ml_norecursion=; unset ml_norecursion;} ;; + "hwasan/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;} + ;; "ubsan/Makefile":F) cat > vpsed$$ << \_EOF s!`test -f '$<' || echo '$(srcdir)/'`!! _EOF |