diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-11-25 16:31:41 +0000 |
---|---|---|
committer | Matthew Malcomson <matthew.malcomson@arm.com> | 2020-11-25 16:35:37 +0000 |
commit | 170e618ef559a9b1220174c1d33cd7e5b1045cc8 (patch) | |
tree | e3cc338dd0968385848cd2fb1c6afa104e213883 /config/bootstrap-hwasan.mk | |
parent | 8a769f816f8af7a8aac6f16874011c3e15280e38 (diff) | |
download | gcc-170e618ef559a9b1220174c1d33cd7e5b1045cc8.tar.gz |
libsanitizer: Add option to bootstrap using HWASAN
This is an analogous option to --bootstrap-asan to configure. It allows
bootstrapping GCC using HWASAN.
For the same reasons as for ASAN we have to avoid using the HWASAN
sanitizer when compiling libiberty and the lto-plugin.
Also add a function to query whether -fsanitize=hwaddress has been
passed.
ChangeLog:
* configure: Regenerate.
* configure.ac: Add --bootstrap-hwasan option.
config/ChangeLog:
* bootstrap-hwasan.mk: New file.
gcc/ChangeLog:
* doc/install.texi: Document new option.
libiberty/ChangeLog:
* configure: Regenerate.
* configure.ac: Avoid using sanitizer.
lto-plugin/ChangeLog:
* Makefile.am: Avoid using sanitizer.
* Makefile.in: Regenerate.
Diffstat (limited to 'config/bootstrap-hwasan.mk')
-rw-r--r-- | config/bootstrap-hwasan.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/bootstrap-hwasan.mk b/config/bootstrap-hwasan.mk new file mode 100644 index 00000000000..4f60bed3fd6 --- /dev/null +++ b/config/bootstrap-hwasan.mk @@ -0,0 +1,8 @@ +# This option enables -fsanitize=hwaddress for stage2 and stage3. + +STAGE2_CFLAGS += -fsanitize=hwaddress +STAGE3_CFLAGS += -fsanitize=hwaddress +POSTSTAGE1_LDFLAGS += -fsanitize=hwaddress -static-libhwasan \ + -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/ \ + -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/hwasan/ \ + -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/hwasan/.libs |