Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jun 2021 05:28:29 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7aa2e90176ba - main - spl: Fix gcc6 build
Message-ID:  <202106110528.15B5STns018759@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=7aa2e90176baaca3bf4a6813defeb3c4b08cac8a

commit 7aa2e90176baaca3bf4a6813defeb3c4b08cac8a
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-06-11 03:28:52 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2021-06-11 03:28:52 +0000

    spl: Fix gcc6 build
    
    -Wno-error= is only a clang flag, restrict its use to only clang.
    
    Sponsored by:           Netflix
---
 cddl/lib/libspl/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106110528.15B5STns018759>