| @@ -1,40 +1,38 @@ | | | @@ -1,40 +1,38 @@ |
1 | # $NetBSD: Makefile.rump,v 1.126 2020/03/09 00:03:00 kamil Exp $ | | 1 | # $NetBSD: Makefile.rump,v 1.127 2020/03/09 14:45:41 kamil Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | .if !defined(_RUMP_MK) | | 4 | .if !defined(_RUMP_MK) |
5 | _RUMP_MK= #defined | | 5 | _RUMP_MK= #defined |
6 | | | 6 | |
7 | WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet | | 7 | WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet |
8 | NOLINT= # kernel code | | 8 | NOLINT= # kernel code |
9 | | | 9 | |
10 | .include <bsd.own.mk> | | 10 | .include <bsd.own.mk> |
11 | | | 11 | |
12 | # Use NetBSD kernel ABI by default on x86 archs. Performance-related | | 12 | # Use NetBSD kernel ABI by default on x86 archs. Performance-related |
13 | # compile-time options may override this at a later date. | | 13 | # compile-time options may override this at a later date. |
14 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") | | 14 | .if (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64") |
15 | _RUMP_NATIVEABI= yes | | 15 | _RUMP_NATIVEABI= yes |
16 | .else | | 16 | .else |
17 | _RUMP_NATIVEABI= no | | 17 | _RUMP_NATIVEABI= no |
18 | CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS} | | 18 | CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS} |
19 | CPPFLAGS+= -D_RUMPKERNEL -I${RUMPTOP}/librump/rumpkern | | 19 | CPPFLAGS+= -D_RUMPKERNEL -I${RUMPTOP}/librump/rumpkern |
20 | .endif | | 20 | .endif |
21 | | | 21 | |
22 | # We are compiling the kernel code with no-delete-null-pointer-checks, | | 22 | # We are compiling the kernel code with no-delete-null-pointer-checks, |
23 | # and compiling without it, causes issues at least on sh3 by adding | | 23 | # and compiling without it, causes issues at least on sh3 by adding |
24 | # aborts after kern_assert on NULL pointer checks. | | 24 | # aborts after kern_assert on NULL pointer checks. |
25 | # no-delete-null-pointer-checks is required in Clang/LLVM at least for | | 25 | CFLAGS+= ${${ACTIVE_CC} == "gcc":? -fno-delete-null-pointer-checks :} |
26 | # NULL + 0 operations that trigger LLVM UBSan and could be miscompiled. | | | |
27 | CFLAGS+= -fno-delete-null-pointer-checks | | | |
28 | | | 26 | |
29 | # Define baseline cpu for mips ports, required for | | 27 | # Define baseline cpu for mips ports, required for |
30 | # rumpcomp_sync_icache() hypercall. | | 28 | # rumpcomp_sync_icache() hypercall. |
31 | .if !empty(MACHINE_ARCH:Mmips*) | | 29 | .if !empty(MACHINE_ARCH:Mmips*) |
32 | .if !empty(MACHINE_ARCH:Mmips64*) | | 30 | .if !empty(MACHINE_ARCH:Mmips64*) |
33 | CPPFLAGS+= -DMIPS64=1 | | 31 | CPPFLAGS+= -DMIPS64=1 |
34 | .else | | 32 | .else |
35 | CPPFLAGS+= -DMIPS1=1 | | 33 | CPPFLAGS+= -DMIPS1=1 |
36 | .endif | | 34 | .endif |
37 | .endif | | 35 | .endif |
38 | | | 36 | |
39 | # which NetBSD compat to build | | 37 | # which NetBSD compat to build |
40 | RUMP_NBCOMPAT?=default | | 38 | RUMP_NBCOMPAT?=default |