head	1.9;
access;
symbols
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.4
	netbsd-11-base:1.9
	netbsd-10-1-RELEASE:1.6
	perseant-exfatfs-base-20240630:1.9
	perseant-exfatfs:1.9.0.2
	perseant-exfatfs-base:1.9
	netbsd-8-3-RELEASE:1.3.6.1
	netbsd-9-4-RELEASE:1.3.16.1
	netbsd-10-0-RELEASE:1.6
	netbsd-10-0-RC6:1.6
	netbsd-10-0-RC5:1.6
	netbsd-10-0-RC4:1.6
	netbsd-10-0-RC3:1.6
	netbsd-10-0-RC2:1.6
	netbsd-10-0-RC1:1.6
	netbsd-10:1.6.0.6
	netbsd-10-base:1.6
	netbsd-9-3-RELEASE:1.3.16.1
	cjep_sun2x-base1:1.6
	cjep_sun2x:1.6.0.4
	cjep_sun2x-base:1.6
	cjep_staticlib_x-base1:1.6
	netbsd-9-2-RELEASE:1.3.16.1
	cjep_staticlib_x:1.6.0.2
	cjep_staticlib_x-base:1.6
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.4
	phil-wifi-20200411:1.4
	is-mlppp:1.4.0.2
	is-mlppp-base:1.4
	phil-wifi-20200406:1.4
	netbsd-8-2-RELEASE:1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.4
	netbsd-9:1.3.0.16
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.3
	netbsd-8-1-RC1:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	netbsd-7-2-RELEASE:1.2
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.3
	phil-wifi:1.3.0.14
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	netbsd-7-1-2-RELEASE:1.2
	pgoyette-compat:1.3.0.12
	pgoyette-compat-base:1.3
	netbsd-7-1-1-RELEASE:1.2
	matt-nb8-mediatek:1.3.0.10
	matt-nb8-mediatek-base:1.3
	perseant-stdc-iso10646:1.3.0.8
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.6
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.4
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	netbsd-7-1:1.2.0.12
	netbsd-7-1-RELEASE:1.2
	netbsd-7-1-RC2:1.2
	netbsd-7-nhusb-base-20170116:1.2
	bouyer-socketcan:1.3.0.2
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.2
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.2
	localcount-20160914:1.2
	netbsd-7-nhusb:1.2.0.10
	netbsd-7-nhusb-base:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.8
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.2
	netbsd-7-0:1.2.0.6
	netbsd-7-0-RELEASE:1.2
	netbsd-7-0-RC3:1.2
	netbsd-7-0-RC2:1.2
	netbsd-7-0-RC1:1.2
	netbsd-7:1.2.0.4
	netbsd-7-base:1.2
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.1.2.2
	tls-earlyentropy:1.2.0.2
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	riastradh-drm2-base2:1.1
	riastradh-drm2-base1:1.1
	riastradh-drm2:1.1.0.6
	riastradh-drm2-base:1.1
	khorben-n900:1.1.0.10
	agc-symver:1.1.0.8
	agc-symver-base:1.1
	yamt-pagecache-base8:1.1
	yamt-pagecache-base7:1.1
	yamt-pagecache-base6:1.1
	tls-maxphys:1.1.0.4
	tls-maxphys-base:1.2
	yamt-pagecache-base5:1.1
	yamt-pagecache:1.1.0.2
	yamt-pagecache-base4:1.1;
locks; strict;
comment	@# @;


1.9
date	2023.06.03.21.26.27;	author lukem;	state Exp;
branches;
next	1.8;
commitid	Ei0aZMNlbMuRXxrE;

1.8
date	2023.06.03.09.09.03;	author lukem;	state Exp;
branches;
next	1.7;
commitid	aBaIRnuykonRStrE;

1.7
date	2023.06.03.08.52.53;	author lukem;	state Exp;
branches;
next	1.6;
commitid	JFrjk5m11qFkNtrE;

1.6
date	2021.01.05.11.07.59;	author simonb;	state Exp;
branches;
next	1.5;
commitid	lB3W8Bi6JRYFMwCC;

1.5
date	2020.09.06.07.20.26;	author mrg;	state Exp;
branches;
next	1.4;
commitid	IFqEYW6MZdeXkXmC;

1.4
date	2019.10.13.07.28.06;	author mrg;	state Exp;
branches;
next	1.3;
commitid	vRNwN94v7NgB2GGB;

1.3
date	2017.01.11.12.19.43;	author joerg;	state Exp;
branches
	1.3.6.1
	1.3.14.1
	1.3.16.1;
next	1.2;
commitid	Mzi1RRAPKHaCXxBz;

1.2
date	2013.09.21.22.28.12;	author joerg;	state Exp;
branches
	1.2.8.1;
next	1.1;
commitid	2v1Jst3GvO0A9m6x;

1.1
date	2012.03.23.21.29.44;	author christos;	state Exp;
branches
	1.1.2.1
	1.1.4.1;
next	;

1.3.6.1
date	2021.01.08.13.02.56;	author martin;	state Exp;
branches;
next	;
commitid	cLtXeT4wNNuUkVCC;

1.3.14.1
date	2020.04.13.07.46.01;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.3.16.1
date	2021.01.08.13.00.49;	author martin;	state Exp;
branches;
next	;
commitid	D2HQq0GvGUkbkVCC;

1.2.8.1
date	2017.03.20.06.52.21;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.1.2.1
date	2012.03.23.21.29.44;	author yamt;	state dead;
branches;
next	1.1.2.2;

1.1.2.2
date	2012.04.17.00.03.09;	author yamt;	state Exp;
branches;
next	1.1.2.3;

1.1.2.3
date	2014.05.22.15.45.14;	author yamt;	state Exp;
branches;
next	;
commitid	2LSkiVkjlDxn7yBx;

1.1.4.1
date	2014.08.19.23.46.47;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.9
log
@adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

Simplify CWARNFLAGS to use ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
which works for both clang and gcc, and remove compiler-specific
equivalents.
@
text
@#	$NetBSD: Makefile.inc,v 1.8 2023/06/03 09:09:03 lukem Exp $

WARNS?=	1	# XXX -Wcast-qual -Wshadow
CWARNFLAGS.clang+=	-Wno-format -Wno-tautological-compare \
			-Wno-self-assign -Wno-array-bounds \
			-Wno-error=unused-const-variable
CWARNFLAGS+=		${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

.include <bsd.own.mk>

USE_FORT?= yes	# network client/server

UDIST=${NETBSDSRCDIR}/external/bsd/ipf/dist
SDIST=${NETBSDSRCDIR}/sys/external/bsd/ipf

CPPFLAGS+=	-I${UDIST}
CPPFLAGS+=	-I${UDIST}/tools
CPPFLAGS+=	-I${SDIST}
CPPFLAGS+=	-I${SDIST}/netinet
CPPFLAGS+=	-DSTATETOP -D__UIO_EXPOSE
CPPFLAGS+=	-DINET

.if (${USE_INET6} == "no")
CPPFLAGS+=	-DNOINET6
.else
CPPFLAGS+=	-DINET6
.endif

IPFOBJDIR!=	cd ${UDIST}/../lib && ${PRINTOBJDIR}
DPADD+=		${IPFOBJDIR}/libipf.a ${LIBKVM}
LDADD+=		-L${IPFOBJDIR} -lipf -lkvm

CLEANFILES+=	y.tab.c y.tab.h

COPTS+=	${CC_WNO_STRINGOP_TRUNCATION}

.PATH:	${UDIST}	\
	${UDIST}/lib	\
	${UDIST}/tools	\
	${UDIST}/man

.include "../../compat/exec.mk"
@


1.8
log
@bsd.own.mk: rename GCC_NO_* to CC_WNO_*

Rename compiler-warning-disable variables from
	GCC_NO_warning
to
	CC_WNO_warning
where warning is the full warning name as used by the compiler.

GCC_NO_IMPLICIT_FALLTHRU is CC_WNO_IMPLICIT_FALLTHROUGH

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.7 2023/06/03 08:52:53 lukem Exp $
d6 2
a7 3
			-Wno-error=unused-const-variable \
			-Wno-error=address-of-packed-member
CWARNFLAGS.gcc+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
@


1.7
log
@bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
	CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
	CLANG_NO_ADDR_OF_PACKED_MEMBER
	CC_NO_ADDR_OF_PACKED_MEMBER
	GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.6 2021/01/05 11:07:59 simonb Exp $
d36 1
a36 1
COPTS+=	${GCC_NO_STRINGOP_TRUNCATION}
@


1.6
log
@Use the compat machinery to build "native" IPF binaries as ipfilter
doesn't use compat32 64-bit alignment/size safe structures.

Fixes IPF on at least mips64.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.5 2020/09/06 07:20:26 mrg Exp $
d8 1
a8 1
CWARNFLAGS.gcc+=	${GCC_NO_ADDR_OF_PACKED_MEMBER}
@


1.5
log
@add support for new GCC 9 warnings that may be too much to fix
right now.  new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree.  mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it.  (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.)  clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.4 2019/10/13 07:28:06 mrg Exp $
d42 2
@


1.4
log
@introduce some common variables for use in GCC warning disables:

GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.3 2017/01/11 12:19:43 joerg Exp $
d8 1
@


1.3
log
@Disable a couple of warnings until further investigation.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.2 2013/09/21 22:28:12 joerg Exp $
d35 2
@


1.3.6.1
log
@Pull up following revision(s) (requested by simonb in ticket #1646):

	external/bsd/ipf/Makefile.inc: revision 1.6
	compat/exec.mk: revision 1.5

Use the compat machinery to build "native" IPF binaries as ipfilter
doesn't use compat32 64-bit alignment/size safe structures.

Fixes IPF on at least mips64.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.3 2017/01/11 12:19:43 joerg Exp $
a38 2

.include "../../compat/exec.mk"
@


1.3.16.1
log
@Pull up following revision(s) (requested by simonb in ticket #1183):

	external/bsd/ipf/Makefile.inc: revision 1.6
	compat/exec.mk: revision 1.5

Use the compat machinery to build "native" IPF binaries as ipfilter
doesn't use compat32 64-bit alignment/size safe structures.

Fixes IPF on at least mips64.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.3 2017/01/11 12:19:43 joerg Exp $
a38 2

.include "../../compat/exec.mk"
@


1.3.14.1
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 1
a1 1
#	$NetBSD$
a34 2
COPTS+=	${GCC_NO_STRINGOP_TRUNCATION}

@


1.2
log
@Update LLVM/Clang snapshot to r191105. This brings in a better detection
of unused static variables and functions. Disable this for some external
code and for ioconf.c in the kernel.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.1 2012/03/23 21:29:44 christos Exp $
d6 2
a7 1
			-Wno-error=unused-const-variable
@


1.2.8.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.3 2017/01/11 12:19:43 joerg Exp $
d6 1
a6 2
			-Wno-error=unused-const-variable \
			-Wno-error=address-of-packed-member
@


1.1
log
@Build gluons
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.21 2011/08/09 13:06:10 joerg Exp $
d5 2
a6 1
			-Wno-self-assign -Wno-array-bounds
@


1.1.4.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
#	$NetBSD$
d5 1
a5 2
			-Wno-self-assign -Wno-array-bounds \
			-Wno-error=unused-const-variable
@


1.1.2.1
log
@file Makefile.inc was added on branch yamt-pagecache on 2012-04-17 00:03:09 +0000
@
text
@d1 36
@


1.1.2.2
log
@sync with head
@
text
@a0 36
#	$NetBSD$

WARNS?=	1	# XXX -Wcast-qual -Wshadow
CWARNFLAGS.clang+=	-Wno-format -Wno-tautological-compare \
			-Wno-self-assign -Wno-array-bounds

.include <bsd.own.mk>

USE_FORT?= yes	# network client/server

UDIST=${NETBSDSRCDIR}/external/bsd/ipf/dist
SDIST=${NETBSDSRCDIR}/sys/external/bsd/ipf

CPPFLAGS+=	-I${UDIST}
CPPFLAGS+=	-I${UDIST}/tools
CPPFLAGS+=	-I${SDIST}
CPPFLAGS+=	-I${SDIST}/netinet
CPPFLAGS+=	-DSTATETOP -D__UIO_EXPOSE
CPPFLAGS+=	-DINET

.if (${USE_INET6} == "no")
CPPFLAGS+=	-DNOINET6
.else
CPPFLAGS+=	-DINET6
.endif

IPFOBJDIR!=	cd ${UDIST}/../lib && ${PRINTOBJDIR}
DPADD+=		${IPFOBJDIR}/libipf.a ${LIBKVM}
LDADD+=		-L${IPFOBJDIR} -lipf -lkvm

CLEANFILES+=	y.tab.c y.tab.h

.PATH:	${UDIST}	\
	${UDIST}/lib	\
	${UDIST}/tools	\
	${UDIST}/man
@


1.1.2.3
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@d1 1
a1 1
#	$NetBSD: Makefile.inc,v 1.1.2.2 2012/04/17 00:03:09 yamt Exp $
d5 1
a5 2
			-Wno-self-assign -Wno-array-bounds \
			-Wno-error=unused-const-variable
@


