HomeFreeBSD

Fix build of stand/ when building world with ASAN

Description

Fix build of stand/ when building world with ASAN

The userboot/test program links against the default userspace libraries
(e.g. shared libgcc_s.so) that will be instrumented if WITH_ASAN is set.
All other programs link against libsa instead of libc and therefore can't
use the sanitizer runtime library. To fix the stand/ build with
sanitizers, we disable MK_ASAN/MK_UBSAN if -nostdlib is found in the
LDFLAGS (i.e. we are using libsa instead of libc).

Reviewed By: imp, tsoome
Differential Revision: https://reviews.freebsd.org/D31047

(cherry picked from commit 5e9226f063bc43574e2168b4aafad8232f08002a)

Details

Provenance
arichardsonAuthored on Aug 2 2021, 8:50 AM
impCommitted on Jan 24 2023, 9:49 PM
Reviewer
imp
Differential Revision
D31047: Fix build of stand/ when building world with ASAN
Parents
rGd7b483f34f0d: loader: Create loader_simp(8) to document simple version of loader
Branches
Unknown
Tags
Unknown