mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix GENERIC-KASAN kernel build for amd64
Work around https://github.com/llvm/llvm-project/issues/87923, which
leads to an assertion failure compiling several kernel source files with
asan enabled.
PR: 276104
MFC after: 1 month
(cherry picked from commit b811dac211)
This commit is contained in:
parent
f0e05595a1
commit
924cf780a2
1 changed files with 5 additions and 0 deletions
|
|
@ -111,6 +111,11 @@ SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kasan \
|
|||
# upstreamed similar to: https://reviews.llvm.org/D98285
|
||||
#
|
||||
SAN_CFLAGS+= -mllvm -asan-mapping-offset=0xdfff208000000000
|
||||
.elif ${MACHINE_CPUARCH} == "amd64" && \
|
||||
${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 180000
|
||||
# Work around https://github.com/llvm/llvm-project/issues/87923, which leads to
|
||||
# an assertion failure compiling dtrace.c with asan enabled.
|
||||
SAN_CFLAGS+= -mllvm -asan-use-stack-safety=0
|
||||
.endif
|
||||
.endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue