aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-06-11 03:28:52 +0000
committerWarner Losh <imp@FreeBSD.org>2021-06-11 03:28:52 +0000
commit7aa2e90176baaca3bf4a6813defeb3c4b08cac8a (patch)
treee615e3a166ad4bd95a0e57c92ece6e5d36e2179a
parent07d72396f8fba2d1a253149436c3f76c49e6190d (diff)
downloadsrc-7aa2e90176baaca3bf4a6813defeb3c4b08cac8a.tar.gz
src-7aa2e90176baaca3bf4a6813defeb3c4b08cac8a.zip
spl: Fix gcc6 build
-Wno-error= is only a clang flag, restrict its use to only clang. Sponsored by: Netflix
-rw-r--r--cddl/lib/libspl/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile
index 59e0a7c51834..0aac141301e4 100644
--- a/cddl/lib/libspl/Makefile
+++ b/cddl/lib/libspl/Makefile
@@ -1,9 +1,11 @@
# $FreeBSD$
+.include <bsd.init.mk>
+.include <bsd.compiler.mk>
+
.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libspl
.PATH: ${SRCTOP}/sys/contrib/openzfs/include
-
LIB= spl
LIBADD=
PACKAGE= runtime
@@ -41,6 +43,8 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
CFLAGS+= -DHAVE_ISSETUGID
CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h
+.if ${COMPILER_TYPE} == "clang"
CFLAGS.atomic.c+= -Wno-error=atomic-alignment
+.endif
.include <bsd.lib.mk>