Hi Piotr, on 2022/5/23 05:36, Piotr Kubaj wrote: > Ping. > > FreeBSD has already enabled sanitizers in its base system in > https://cgit.freebsd.org/src/commit/?id=f5024381ac16ba43d37a8bd32d54c27f6a6afa66 > The upstream (LLVM) patch was reviewed by a couple of people already. > > Our llvm-devel port also has sanitizers enabled by default since > https://cgit.freebsd.org/ports/commit/?id=70d8d9125c9f5b1da36b134408b3d580a39f1aa8 >
Thanks for the patch. I think you also need to introduce a new subtarget ASAN_SHADOW_OFFSET for freebsd? One reference case is the SUBTARGET_SHADOW_OFFSET in freebsd.h under i386. BR, Kewen > On 22-05-15 12:57:13, Piotr Kubaj wrote: >> GCC's f732bf6a603721f61102a08ad2d023c7c2670870 merged LLVM's >> 315d792130258a9b7250494be8d002ebb427b08f, which added sanitizers support for >> PowerPC on FreeBSD, so this commit only enables building it. >> >> Enabled sanitizers are the same as on powerpc*-*-linux*. >> >> libsanitizer >> * configure.tgt: add powerpc*-*-freebsd* as supported >> --- >> libsanitizer/ChangeLog | 4 ++++ >> libsanitizer/configure.tgt | 2 ++ >> 2 files changed, 6 insertions(+) >> >> diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog >> index 52050be9476..17cc395aea1 100644 >> --- a/libsanitizer/ChangeLog >> +++ b/libsanitizer/ChangeLog >> @@ -1,3 +1,7 @@ >> +2022-05-15 Piotr Kubaj <pku...@freebsd.org> >> + >> + * configure.tgt: add powerpc*-*-freebsd* >> + >> 2022-05-05 Martin Liska <mli...@suse.cz> >> >> * LOCAL_PATCHES: Update. >> diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt >> index fb89df4935c..affe8964f84 100644 >> --- a/libsanitizer/configure.tgt >> +++ b/libsanitizer/configure.tgt >> @@ -31,6 +31,8 @@ case "${target}" in >> TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo >> fi >> ;; >> + powerpc*-*-freebsd*) >> + ;; >> powerpc*-*-linux*) >> if test x$ac_cv_sizeof_void_p = x8; then >> TSAN_SUPPORTED=yes >> -- >> 2.36.0 >>