diff options
author | 2019-01-14 21:01:56 +0000 | |
---|---|---|
committer | 2019-01-14 21:01:56 +0000 | |
commit | a6914b8c100168361bb854772594448353ee063c (patch) | |
tree | e1878f0846689b765333f3923deb8ecae38b6ad1 | |
parent | Improve error message when daemon is already running. (diff) | |
download | wireguard-openbsd-a6914b8c100168361bb854772594448353ee063c.tar.xz wireguard-openbsd-a6914b8c100168361bb854772594448353ee063c.zip |
Add support for building kernels with clang. Clang does not support
-mno-fpu, so use -msoft-float instead. As long as we do not explicitly
use floating-point arithmetic in the kernel that probably has the same effect.
Add -Wno-unused-command-line-argument to prevent warnings that turn into
errors passing -Wa,-Av9b when we run genassym.sh.
ok deraadt@, visa@
-rw-r--r-- | sys/arch/sparc64/conf/Makefile.sparc64 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64 index 9c6e231b506..d7837c665fa 100644 --- a/sys/arch/sparc64/conf/Makefile.sparc64 +++ b/sys/arch/sparc64/conf/Makefile.sparc64 @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.sparc64,v 1.97 2018/02/09 03:59:15 tb Exp $ +# $OpenBSD: Makefile.sparc64,v 1.98 2019/01/14 21:01:56 kettenis Exp $ # For instructions on building kernels consult the config(8) and options(4) # manual pages. @@ -27,7 +27,11 @@ CWARNFLAGS= -Werror -Wall -Wimplicit-function-declaration \ -Wno-uninitialized -Wno-pointer-sign \ -Wframe-larger-than=2047 +.if ${COMPILER_VERSION:Mclang} +CMACHFLAGS= -Wa,-Av9b -msoft-float +.else CMACHFLAGS= -Wa,-Av9b, -mno-fpu +.endif CMACHFLAGS+= -ffreestanding ${NOPIE_FLAGS} SORTR= sort -R .if ${IDENT:M-DNO_PROPOLICE} @@ -36,6 +40,10 @@ CMACHFLAGS+= -fno-stack-protector .if ${IDENT:M-DSMALL_KERNEL} SORTR= cat .endif +.if ${COMPILER_VERSION:Mclang} +CWARNFLAGS+= -Wno-unused-command-line-argument +CWARNFLAGS+= -Wno-address-of-packed-member -Wno-constant-conversion +.endif DEBUG?= -g COPTS?= -O2 |