head	1.34;
access;
symbols
	netbsd-11-0-RC4:1.33
	netbsd-11-0-RC3:1.33
	netbsd-11-0-RC2:1.33
	netbsd-11-0-RC1:1.33
	perseant-exfatfs-base-20250801:1.33
	netbsd-11:1.33.0.2
	netbsd-11-base:1.33
	netbsd-10-1-RELEASE:1.30
	perseant-exfatfs-base-20240630:1.32
	perseant-exfatfs:1.32.0.2
	perseant-exfatfs-base:1.32
	netbsd-8-3-RELEASE:1.16
	netbsd-9-4-RELEASE:1.21.2.1
	netbsd-10-0-RELEASE:1.30
	netbsd-10-0-RC6:1.30
	netbsd-10-0-RC5:1.30
	netbsd-10-0-RC4:1.30
	netbsd-10-0-RC3:1.30
	netbsd-10-0-RC2:1.30
	netbsd-10-0-RC1:1.30
	netbsd-10:1.30.0.6
	netbsd-10-base:1.30
	netbsd-9-3-RELEASE:1.21.2.1
	cjep_sun2x-base1:1.30
	cjep_sun2x:1.30.0.4
	cjep_sun2x-base:1.30
	cjep_staticlib_x-base1:1.30
	netbsd-9-2-RELEASE:1.21.2.1
	cjep_staticlib_x:1.30.0.2
	cjep_staticlib_x-base:1.30
	netbsd-9-1-RELEASE:1.21.2.1
	phil-wifi-20200421:1.28
	phil-wifi-20200411:1.28
	is-mlppp:1.26.0.2
	is-mlppp-base:1.26
	phil-wifi-20200406:1.28
	netbsd-8-2-RELEASE:1.16
	netbsd-9-0-RELEASE:1.21.2.1
	netbsd-9-0-RC2:1.21.2.1
	netbsd-9-0-RC1:1.21
	phil-wifi-20191119:1.25
	netbsd-9:1.21.0.2
	netbsd-9-base:1.21
	phil-wifi-20190609:1.21
	netbsd-8-1-RELEASE:1.16
	netbsd-8-1-RC1:1.16
	pgoyette-compat-merge-20190127:1.16.12.1
	pgoyette-compat-20190127:1.19
	pgoyette-compat-20190118:1.19
	pgoyette-compat-1226:1.19
	pgoyette-compat-1126:1.19
	pgoyette-compat-1020:1.19
	pgoyette-compat-0930:1.19
	pgoyette-compat-0906:1.19
	netbsd-7-2-RELEASE:1.9
	pgoyette-compat-0728:1.19
	netbsd-8-0-RELEASE:1.16
	phil-wifi:1.19.0.2
	phil-wifi-base:1.19
	pgoyette-compat-0625:1.19
	netbsd-8-0-RC2:1.16
	pgoyette-compat-0521:1.16
	pgoyette-compat-0502:1.16
	pgoyette-compat-0422:1.16
	netbsd-8-0-RC1:1.16
	pgoyette-compat-0415:1.16
	pgoyette-compat-0407:1.16
	pgoyette-compat-0330:1.16
	pgoyette-compat-0322:1.16
	pgoyette-compat-0315:1.16
	netbsd-7-1-2-RELEASE:1.9
	pgoyette-compat:1.16.0.12
	pgoyette-compat-base:1.16
	netbsd-7-1-1-RELEASE:1.9
	matt-nb8-mediatek:1.16.0.10
	matt-nb8-mediatek-base:1.16
	perseant-stdc-iso10646:1.16.0.8
	perseant-stdc-iso10646-base:1.16
	netbsd-8:1.16.0.6
	netbsd-8-base:1.16
	prg-localcount2-base3:1.16
	prg-localcount2-base2:1.16
	prg-localcount2-base1:1.16
	prg-localcount2:1.16.0.4
	prg-localcount2-base:1.16
	pgoyette-localcount-20170426:1.16
	bouyer-socketcan-base1:1.16
	pgoyette-localcount-20170320:1.16
	netbsd-7-1:1.9.0.10
	netbsd-7-1-RELEASE:1.9
	netbsd-7-1-RC2:1.9
	netbsd-7-nhusb-base-20170116:1.9
	bouyer-socketcan:1.16.0.2
	bouyer-socketcan-base:1.16
	pgoyette-localcount-20170107:1.16
	netbsd-7-1-RC1:1.9
	pgoyette-localcount-20161104:1.15
	netbsd-7-0-2-RELEASE:1.9
	localcount-20160914:1.15
	netbsd-7-nhusb:1.9.0.8
	netbsd-7-nhusb-base:1.9
	pgoyette-localcount-20160806:1.15
	pgoyette-localcount-20160726:1.14
	pgoyette-localcount:1.14.0.2
	pgoyette-localcount-base:1.14
	netbsd-7-0-1-RELEASE:1.9
	netbsd-7-0:1.9.0.6
	netbsd-7-0-RELEASE:1.9
	netbsd-7-0-RC3:1.9
	netbsd-7-0-RC2:1.9
	netbsd-7-0-RC1:1.9
	netbsd-6-0-6-RELEASE:1.6
	netbsd-6-1-5-RELEASE:1.6
	netbsd-7:1.9.0.4
	netbsd-7-base:1.9
	yamt-pagecache-base9:1.9
	yamt-pagecache-tag8:1.5.6.1
	netbsd-6-1-4-RELEASE:1.6
	netbsd-6-0-5-RELEASE:1.6
	tls-earlyentropy:1.9.0.2
	tls-earlyentropy-base:1.9
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.9
	riastradh-drm2-base3:1.9
	netbsd-6-1-3-RELEASE:1.6
	netbsd-6-0-4-RELEASE:1.6
	netbsd-6-1-2-RELEASE:1.6
	netbsd-6-0-3-RELEASE:1.6
	netbsd-6-1-1-RELEASE:1.6
	riastradh-drm2-base2:1.7
	riastradh-drm2-base1:1.7
	riastradh-drm2:1.7.0.2
	riastradh-drm2-base:1.7
	netbsd-6-1:1.6.0.14
	netbsd-6-0-2-RELEASE:1.6
	netbsd-6-1-RELEASE:1.6
	netbsd-6-1-RC4:1.6
	netbsd-6-1-RC3:1.6
	agc-symver:1.6.0.12
	agc-symver-base:1.6
	netbsd-6-1-RC2:1.6
	netbsd-6-1-RC1:1.6
	yamt-pagecache-base8:1.6
	netbsd-6-0-1-RELEASE:1.6
	yamt-pagecache-base7:1.6
	matt-nb6-plus-nbase:1.6
	yamt-pagecache-base6:1.6
	netbsd-6-0:1.6.0.8
	netbsd-6-0-RELEASE:1.6
	netbsd-6-0-RC2:1.6
	tls-maxphys:1.6.0.6
	tls-maxphys-base:1.9
	matt-nb6-plus:1.6.0.4
	matt-nb6-plus-base:1.6
	netbsd-6-0-RC1:1.6
	yamt-pagecache-base5:1.6
	yamt-pagecache-base4:1.6
	netbsd-6:1.6.0.2
	netbsd-6-base:1.6
	yamt-pagecache-base3:1.5
	yamt-pagecache-base2:1.5
	yamt-pagecache:1.5.0.6
	yamt-pagecache-base:1.5
	cherry-xenmp:1.5.0.4
	cherry-xenmp-base:1.5
	bouyer-quota2-nbase:1.5
	bouyer-quota2:1.5.0.2
	bouyer-quota2-base:1.5
	matt-mips64-premerge-20101231:1.5
	darran-pre-netbsd:1.1;
locks; strict;
comment	@# @;


1.34
date	2025.09.18.03.36.00;	author mrg;	state Exp;
branches;
next	1.33;
commitid	RQc1sc69acbZ59bG;

1.33
date	2024.11.23.03.20.41;	author riastradh;	state Exp;
branches;
next	1.32;
commitid	1kIK0cIGUcQbDIyF;

1.32
date	2023.06.03.21.31.46;	author lukem;	state Exp;
branches
	1.32.2.1;
next	1.31;
commitid	r3TGTar07z3GZxrE;

1.31
date	2023.06.03.09.09.05;	author lukem;	state Exp;
branches;
next	1.30;
commitid	aBaIRnuykonRStrE;

1.30
date	2021.04.13.09.20.55;	author mrg;	state Exp;
branches;
next	1.29;
commitid	hESaaMowMKNi37PC;

1.29
date	2021.03.29.05.18.02;	author simonb;	state Exp;
branches;
next	1.28;
commitid	qDZNuPVzOlRTbaNC;

1.28
date	2020.03.17.01.36.29;	author fox;	state Exp;
branches;
next	1.27;
commitid	SV7BKceWIbbx4H0C;

1.27
date	2020.03.17.00.50.12;	author fox;	state Exp;
branches;
next	1.26;
commitid	WELJ0HSkbF4ePG0C;

1.26
date	2019.12.03.22.10.56;	author jmcneill;	state Exp;
branches;
next	1.25;
commitid	tjHf6w1kbXgThjNB;

1.25
date	2019.10.13.10.07.27;	author kre;	state Exp;
branches;
next	1.24;
commitid	jXBo2m6NFlzVUGGB;

1.24
date	2019.10.13.07.28.08;	author mrg;	state Exp;
branches;
next	1.23;
commitid	vRNwN94v7NgB2GGB;

1.23
date	2019.10.10.02.35.45;	author kre;	state Exp;
branches;
next	1.22;
commitid	Pwui5TTKyc9mwgGB;

1.22
date	2019.10.09.21.49.50;	author christos;	state Exp;
branches;
next	1.21;
commitid	mSrYuvhcbT2oWeGB;

1.21
date	2019.02.11.17.49.37;	author tnn;	state Exp;
branches
	1.21.2.1;
next	1.20;
commitid	Dmcd2nlxJSx0knbB;

1.20
date	2019.02.06.04.23.16;	author christos;	state Exp;
branches;
next	1.19;
commitid	wGcPJV0Gn9fs1FaB;

1.19
date	2018.06.07.13.21.44;	author kamil;	state Exp;
branches
	1.19.2.1;
next	1.18;
commitid	O3KRdKiHs4B9QlFA;

1.18
date	2018.06.06.14.18.39;	author kamil;	state Exp;
branches;
next	1.17;
commitid	FThIIbICtsZ19eFA;

1.17
date	2018.05.28.21.05.09;	author chs;	state Exp;
branches;
next	1.16;
commitid	NQFwoUduS0toJ6EA;

1.16
date	2016.12.19.01.26.31;	author christos;	state Exp;
branches
	1.16.12.1;
next	1.15;
commitid	PTqsJMMx7ppq5xyz;

1.15
date	2016.08.04.17.07.24;	author christos;	state Exp;
branches;
next	1.14;
commitid	BDHTWTRu4t3SG0hz;

1.14
date	2015.10.05.17.49.10;	author christos;	state Exp;
branches
	1.14.2.1;
next	1.13;
commitid	azW57zJFIG7kHWDy;

1.13
date	2015.09.30.00.17.09;	author christos;	state Exp;
branches;
next	1.12;
commitid	dquIfgHa2Jps2dDy;

1.12
date	2015.09.29.23.50.17;	author christos;	state Exp;
branches;
next	1.11;
commitid	KhfLRHXms26XScDy;

1.11
date	2015.09.24.14.36.54;	author christos;	state Exp;
branches;
next	1.10;
commitid	R87QUp49ufDoZvCy;

1.10
date	2015.02.07.20.30.03;	author christos;	state Exp;
branches;
next	1.9;
commitid	20krqcqFdqeLi79y;

1.9
date	2014.03.16.06.51.43;	author ozaki-r;	state Exp;
branches;
next	1.8;
commitid	s2tXl5e2Vd5ShTsx;

1.8
date	2014.03.16.05.11.19;	author ozaki-r;	state Exp;
branches;
next	1.7;
commitid	O7XuNPDRxffFKSsx;

1.7
date	2013.06.21.19.16.01;	author christos;	state Exp;
branches;
next	1.6;
commitid	TCxw0l2rA0x63wUw;

1.6
date	2012.02.13.12.52.54;	author wiz;	state Exp;
branches
	1.6.6.1;
next	1.5;

1.5
date	2010.04.03.18.34.19;	author christos;	state Exp;
branches
	1.5.6.1;
next	1.4;

1.4
date	2010.02.24.15.40.54;	author tron;	state Exp;
branches;
next	1.3;

1.3
date	2010.02.24.12.51.05;	author tron;	state Exp;
branches;
next	1.2;

1.2
date	2010.02.21.01.46.35;	author darran;	state Exp;
branches;
next	1.1;

1.1
date	2010.02.21.00.49.58;	author darran;	state Exp;
branches;
next	;

1.32.2.1
date	2025.08.02.05.24.33;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;

1.21.2.1
date	2019.12.09.15.19.32;	author martin;	state Exp;
branches;
next	;
commitid	MqNM0VfwWzgWO2OB;

1.19.2.1
date	2019.06.10.21.52.03;	author christos;	state Exp;
branches;
next	1.19.2.2;
commitid	jtc8rnCzWiEEHGqB;

1.19.2.2
date	2020.04.08.14.04.20;	author martin;	state Exp;
branches;
next	1.19.2.3;
commitid	Qli2aW9E74UFuA3C;

1.19.2.3
date	2020.04.13.07.56.39;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.16.12.1
date	2018.06.25.07.25.24;	author pgoyette;	state Exp;
branches;
next	;
commitid	8PtAu9af7VvhiDHA;

1.14.2.1
date	2016.08.06.00.18.41;	author pgoyette;	state Exp;
branches;
next	1.14.2.2;
commitid	da8LmcQp9HeG2bhz;

1.14.2.2
date	2017.01.07.08.54.16;	author pgoyette;	state Exp;
branches;
next	;
commitid	uEL0C1YuiJrlV0Bz;

1.6.6.1
date	2013.06.23.06.28.31;	author tls;	state Exp;
branches;
next	1.6.6.2;
commitid	OnlO1cBgtQRcIHUw;

1.6.6.2
date	2014.08.19.23.52.23;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.5.6.1
date	2012.04.17.00.04.09;	author yamt;	state Exp;
branches;
next	1.5.6.2;

1.5.6.2
date	2014.05.22.14.01.24;	author yamt;	state Exp;
branches;
next	;
commitid	JkmseppLYEAJxxBx;


desc
@@


1.34
log
@introduce a couple of new turn-off-gcc-warning variables and use them.

GCC 14 has a new annoying calloc() checker that we turn off in a bunch
of places, and there are a few more dangling-pointer issuse that come up,
but seem bogus.
@
text
@#	$NetBSD: Makefile,v 1.33 2024/11/23 03:20:41 riastradh Exp $

# $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $

WARNS=1
.include <bsd.init.mk>

LIB=		dtrace

SRCS=		dt_aggregate.c \
		dt_as.c \
		dt_buf.c \
		dt_cc.c \
		dt_cg.c \
		dt_consume.c \
		dt_decl.c \
		dt_dis.c \
		dt_dof.c \
		dt_error.c \
		dt_errtags.c \
		dt_grammar.y \
		dt_handle.c \
		dt_ident.c \
		dt_inttab.c \
		dt_isadep.c \
		dt_lex.l \
		dt_link.c \
		dt_list.c \
		dt_map.c \
		dt_module.c \
		dt_names.c \
		dt_open.c \
		dt_options.c \
		dt_parser.c \
		dt_pcb.c \
		dt_pid.c \
		dt_pq.c \
		dt_pragma.c \
		dt_print.c \
		dt_printf.c \
		dt_proc.c \
		dt_program.c \
		dt_provider.c \
		dt_regset.c \
		dt_string.c \
		dt_strtab.c \
		dt_subr.c \
		dt_sugar.c \
		dt_work.c \
		dt_xlator.c \
		gmatch.c

DSRCS=		errno.d			\
		psinfo.d		\
		signal.d		\
		unistd.d

FILES=		${DSRCS}
FILESDIR=	/usr/lib/dtrace

.PATH:		${.CURDIR}/../../dist/lib/libgen/common
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/common

CPPFLAGS+=	-I${.OBJDIR} \
		-I${.CURDIR} \
		-I${OSNETDIR}/sys \
		-I${OSNETDIR}/include \
		-I${OPENSOLARIS_USR_DISTDIR}/head \
		-I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \
		-I${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common \
		-I${OPENSOLARIS_SYS_DISTDIR}/uts/common

COPTS.dt_aggregate.c	+= -Wno-stack-protector
COPTS.dt_consume.c	+= -Wno-stack-protector
COPTS.dt_decl.c		+= -Wno-stack-protector
COPTS.dt_dof.c		+= -Wno-stack-protector
COPTS.dt_handle.c	+= -Wno-stack-protector
COPTS.dt_ident.c	+= -Wno-stack-protector
COPTS.dt_link.c		+= -Wno-stack-protector
COPTS.dt_options.c	+= -Wno-stack-protector
COPTS.dt_parser.c	+= -Wno-stack-protector
COPTS.dt_pragma.c	+= -Wno-stack-protector
COPTS.dt_print.c	+= -Wno-stack-protector
COPTS.dt_printf.c	+= -Wno-stack-protector
COPTS.dt_program.c	+= -Wno-stack-protector
COPTS.dt_provider.c	+= -Wno-stack-protector
COPTS.dt_subr.c		+= -Wno-stack-protector
COPTS.dt_lex.c		+= ${CC_WNO_STRINGOP_TRUNCATION}
COPTS.dt_pid.c		+= ${CC_WNO_STRINGOP_TRUNCATION}

COPTS.dt_consume.c	+= -Wno-parentheses
COPTS.dt_consume.c	+= ${CC_WNO_MAYBE_UNINITIALIZED}
COPTS.dt_options.c	+= -Wno-parentheses
COPTS.dt_pid.c		+= ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
COPTS.dt_isadep.c	+= -Wno-unused-variable

EXPSYM_SRCS+=	dtrace.common.expsym

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
CPPFLAGS+=	-I${.CURDIR}/../../dev/dtrace/x86
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/i386 ${.CURDIR}/../../dev/dtrace/x86
SRCS+=		dis_tables.c
COPTS.dis_tables.c	+= -Wno-parentheses
COPTS.dis_tables.c	+= ${CC_WNO_MAYBE_UNINITIALIZED}
EXPSYM_SRCS+=	dtrace.x86.expsym
.elif ${MACHINE_ARCH} == "sparc64"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
.elif ${MACHINE_ARCH} == "aarch64"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/aarch64
.elif ${MACHINE_CPU} == "arm"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/arm
.elif ${MACHINE_CPU} == "mips"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/mips
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/mips
.endif
COPTS.dt_link.c		+= ${CC_WNO_FORMAT_TRUNCATION}

LIB_EXPSYM=	dtrace.expsym
dtrace.expsym: ${EXPSYM_SRCS}
	${_MKTARGET_CREATE}
	LC_ALL=C sort -m ${.ALLSRC} >${.TARGET}.tmp && \
	${MV} ${.TARGET}.tmp ${.TARGET}
CLEANFILES+=	dtrace.expsym dtrace.expsym.tmp

LFLAGS+=-l

YFLAGS+=-d

CLEANFILES=	dt_errtags.c dt_names.c dt_grammar.h

MKERRTAGS=${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh 
dt_errtags.c: ${MKERRTAGS} ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h 
	sh ${MKERRTAGS} < ${.ALLSRC:M*.h} > ${.TARGET}

MKNAMES=${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh
dt_names.c: ${MKNAMES} ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h
	sh ${MKNAMES} < ${.ALLSRC:M*.h} > ${.TARGET}

beforedepend:	dt_errtags.c dt_names.c

.SUFFIXES: .in
.in:
	${CPP} -D_KERNEL ${CPPFLAGS} $< | tr -d ' ' | tr '"' '@@' | \
	    ${TOOL_SED} -e 's/\&/\\\&/g' | grep '^s/' > ${.TARGET}


LIBDPLIBS=	proc	${NETBSDSRCDIR}/external/bsd/libproc/lib

COPTS.dt_link.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-restrict :}
# GCC 14 is wrong.
COPTS.dt_open.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 14:? -Wuse-after-free :}

.include <bsd.lib.mk>
@


1.33
log
@libdtrace: Handle some x86-specific symbols in the .expsym file.

PR lib/58838: shared libraries in base should all have expsym lists
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.32 2023/06/03 21:31:46 lukem Exp $
d153 2
@


1.32
log
@adapt to ${CC_WNO_MAYBE_UNINITIALIZED}

Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of
the older style more complex expressions.

Remove workarounds if they were for a specific
version of gcc < 10.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.31 2023/06/03 09:09:05 lukem Exp $
d97 2
d106 1
d121 7
@


1.32.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.33 2024/11/23 03:20:41 riastradh Exp $
a96 2
EXPSYM_SRCS+=	dtrace.common.expsym

a103 1
EXPSYM_SRCS+=	dtrace.x86.expsym
a117 7
LIB_EXPSYM=	dtrace.expsym
dtrace.expsym: ${EXPSYM_SRCS}
	${_MKTARGET_CREATE}
	LC_ALL=C sort -m ${.ALLSRC} >${.TARGET}.tmp && \
	${MV} ${.TARGET}.tmp ${.TARGET}
CLEANFILES+=	dtrace.expsym dtrace.expsym.tmp

@


1.31
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,v 1.30 2021/04/13 09:20:55 mrg Exp $
d92 1
a92 1
COPTS.dt_consume.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
a96 6
.if (${MKLIBCSANITIZER:Uno} == "yes")
.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8)
COPTS.dt_proc.c+=	-Wno-error=maybe-uninitialized
.endif
.endif

d103 1
a103 1
COPTS.dis_tables.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
@


1.30
log
@XXX: ignore warning about overlapping buffers for sprintf().
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.29 2021/03/29 05:18:02 simonb Exp $
d88 2
a89 2
COPTS.dt_lex.c		+= ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.dt_pid.c		+= ${GCC_NO_STRINGOP_TRUNCATION}
d122 1
a122 1
COPTS.dt_link.c		+= ${GCC_NO_FORMAT_TRUNCATION}
@


1.29
log
@Compile MIPS specific code.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.28 2020/03/17 01:36:29 fox Exp $
d148 2
@


1.28
log
@external/cddl/osnet: Do not suppress the warning output for libdtrace.

Changed -Wno-maybe-uninitialized to -Wno-error=maybe-uninitialized to allow
warnings to be printed out during build.

Suggested by: christos@@
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.26 2019/12/03 22:10:56 jmcneill Exp $
d118 3
@


1.27
log
@external/cddl/osnet: Supress -Werror=maybe-uninitialized error in libdtrace.

It looks like this is a false positive, since the section of code triggering the error

external/cddl/osnet/dist/lib/libdtrace/common/dt_proc.c:400:42:

is only accessed after "err" is initialized.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@@
@
text
@d99 1
a99 1
COPTS.dt_proc.c+=	-Wno-maybe-uninitialized
@


1.26
log
@dtrace: add support for aarch64
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.25 2019/10/13 10:07:27 kre Exp $
d97 6
@


1.25
log
@
This previously had -Wno-format-truncation so I am presuming it should
have been converted to GCC_NO_FORMAT_TRUNCATION rather than
GCC_NO_STRINGOP_TRUNCATION which is what happened.   This might unbreak
the build (olr at least get it further).
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.24 2019/10/13 07:28:08 mrg Exp $
d106 3
@


1.24
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,v 1.23 2019/10/10 02:35:45 kre Exp $
d110 1
a110 1
COPTS.dt_link.c		+= ${GCC_NO_STRINGOP_TRUNCATION}
@


1.23
log
@
Only exclude gcc-8 warnings when the gcc we're using is gcc>=8
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.22 2019/10/09 21:49:50 christos Exp $
d88 2
a89 4
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc"
COPTS.dt_lex.c		+= -Wno-error=stringop-truncation
COPTS.dt_pid.c		+= -Wno-error=stringop-truncation
.endif
d110 1
a110 1
COPTS.dt_link.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-format-truncation :}
@


1.22
log
@no error for string truncation
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2019/02/11 17:49:37 tnn Exp $
d88 1
a88 1
.if ${ACTIVE_CC} == "gcc"
@


1.21
log
@-Wno-format-truncation is only needed when using GCC
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.20 2019/02/06 04:23:16 christos Exp $
d88 4
@


1.21.2.1
log
@Pull up following revision(s) (requested by jmcneill in ticket #525):

	external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c: revision 1.1
	distrib/sets/lists/modules/md.i386: revision 1.83
	share/mk/bsd.own.mk: revision 1.1168
	usr.bin/mkubootimage/mkubootimage.c: revision 1.25
	sys/modules/dtrace/Makefile: revision 1.7
	usr.bin/mkubootimage/mkubootimage.c: revision 1.26
	sys/modules/dtrace/Makefile: revision 1.8
	external/cddl/osnet/dist/lib/libdtrace/aarch64/dt_isadep.c: revision 1.2
	distrib/sets/lists/modules/mi: revision 1.128
	sys/arch/aarch64/include/frame.h: revision 1.3
	sys/arch/evbarm/conf/mk.generic64: revision 1.4
	external/cddl/osnet/dist/lib/libdtrace/common/dt_link.c: revision 1.12
	sys/modules/cyclic/Makefile: revision 1.4
	sys/arch/aarch64/conf/Makefile.aarch64: revision 1.16
	external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c: revision 1.1
	sys/arch/aarch64/aarch64/start.S: revision 1.3
	sys/arch/aarch64/aarch64/trap.c: revision 1.22
	external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.1
	external/cddl/osnet/dev/dtrace/aarch64/dtrace_asm.S: revision 1.1
	external/cddl/osnet/dev/fbt/aarch64/fbt_isa.h: revision 1.1
	external/cddl/osnet/dev/dtrace/aarch64/regset.h: revision 1.1
	external/cddl/osnet/lib/libdtrace/Makefile: revision 1.26
	distrib/sets/lists/modules/md.amd64: revision 1.82
	usr.bin/mkubootimage/mkubootimage.1: revision 1.13
	distrib/sets/lists/modules/ad.arm: revision 1.14

Add KDTRACE_HOOKS support.

Define lwp_trapframe() macro

dtrace: add support for aarch64

Add syscall_linux back for other arm architectures (accidently removed
in previous)

Add -u flag for updating headers in place.

Fix alignment of .text section by changing load address to
0xffffffc000000000 and adding 64 bytes of padding before the entry point.

Update arm64 image header in place

Move dtrace_syscall_linux out of mi set list

Enable DTrace on aarch64

Fix signed/unsigned comparison
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2019/02/11 17:49:37 tnn Exp $
a103 3
.elif ${MACHINE_ARCH} == "aarch64"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/aarch64
@


1.20
log
@uses the idiom len = snprintf(&tmp, 1, ...) to compute length.
needs -Wno-format-truncation
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2018/06/07 13:21:44 kamil Exp $
d108 1
a108 1
COPTS.dt_link.c	+= -Wno-format-truncation
@


1.19
log
@Replace HAVE_GCC with ACTIVE_CC == gcc checks

Kernel modules build with GCC and Clang/LLVM.

Requested by <joerg>
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.18 2018/06/06 14:18:39 kamil Exp $
d108 1
@


1.19.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.21 2019/02/11 17:49:37 tnn Exp $
a107 1
COPTS.dt_link.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-format-truncation :}
@


1.19.2.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
a94 6
.if (${MKLIBCSANITIZER:Uno} == "yes")
.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8)
COPTS.dt_proc.c+=	-Wno-error=maybe-uninitialized
.endif
.endif

a103 3
.elif ${MACHINE_ARCH} == "aarch64"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/aarch64
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/aarch64
@


1.19.2.3
log
@Mostly merge changes from HEAD upto 20200411
@
text
@a87 2
COPTS.dt_lex.c		+= ${GCC_NO_STRINGOP_TRUNCATION}
COPTS.dt_pid.c		+= ${GCC_NO_STRINGOP_TRUNCATION}
d117 1
a117 1
COPTS.dt_link.c		+= ${GCC_NO_FORMAT_TRUNCATION}
@


1.18
log
@Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes

Clang/LLVM does not recognize:
 - -Wno-maybe-uninitialized
 - -Wno-unused-but-set-variable

MKGCC=yes still builds the distribution.

This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build.

Sponsored by <The NetBSD Foundation>
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.17 2018/05/28 21:05:09 chs Exp $
d90 1
a90 3
.if defined(HAVE_GCC)
COPTS.dt_consume.c	+= -Wno-maybe-uninitialized
.endif
d92 1
a92 3
.if defined(HAVE_GCC)
COPTS.dt_pid.c		+= -Wno-unused-but-set-variable
.endif
d101 1
a101 3
.if defined(HAVE_GCC)
COPTS.dis_tables.c	+= -Wno-maybe-uninitialized
.endif
@


1.17
log
@merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
 - dtrace FBT probes can now be placed in kernel modules.
 - ZFS now supports mmap().
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2016/12/19 01:26:31 christos Exp $
d89 4
a92 1
COPTS.dt_consume.c	+= -Wno-parentheses -Wno-maybe-uninitialized
d94 1
d96 1
d104 4
a107 1
COPTS.dis_tables.c	+= -Wno-parentheses -Wno-maybe-uninitialized
@


1.16
log
@arrange for .in files to be rebuilt.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2016/08/04 17:07:24 christos Exp $
d3 1
a3 1
# $FreeBSD: src/cddl/lib/libdtrace/Makefile,v 1.2.2.1 2009/08/03 08:13:06 kensmith Exp $
a9 2
#WARNS=		1

d25 1
d48 1
d58 3
a72 4
# XXX need new libelf (not GPL)

#CFLAGS+=	-DYYDEBUG

d89 5
d96 4
a99 3
CPPFLAGS+=	-I${.CURDIR}/../../dev/dtrace/i386
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/i386 ${.CURDIR}/../../dev/dtrace/i386
SRCS+=	dt_isadep.c # dis_tables.c
a104 1
SRCS+=	dt_isadep.c
a122 3
foo:
	echo ${OPENSOLARIS_USR_DISTDIR}

a128 3
FILES=		${DSRCS}
FILESDIR=	/usr/lib/dtrace

@


1.16.12.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.19 2018/06/07 13:21:44 kamil Exp $
d3 1
a3 1
# $FreeBSD: head/cddl/lib/libdtrace/Makefile 314654 2017-03-04 11:30:04Z ngie $
d10 2
a26 1
		dt_isadep.c \
a48 1
		dt_sugar.c \
a57 3
FILES=		${DSRCS}
FILESDIR=	/usr/lib/dtrace

d70 4
a89 6
COPTS.dt_consume.c	+= -Wno-parentheses
COPTS.dt_consume.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
COPTS.dt_options.c	+= -Wno-parentheses
COPTS.dt_pid.c		+= ${${ACTIVE_CC} == "gcc" :? -Wno-unused-but-set-variable :}
COPTS.dt_isadep.c	+= -Wno-unused-variable

d92 3
a94 5
CPPFLAGS+=	-I${.CURDIR}/../../dev/dtrace/x86
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/i386 ${.CURDIR}/../../dev/dtrace/x86
SRCS+=		dis_tables.c
COPTS.dis_tables.c	+= -Wno-parentheses
COPTS.dis_tables.c	+= ${${ACTIVE_CC} == "gcc" :? -Wno-maybe-uninitialized :}
d100 1
d119 3
d128 3
@


1.15
log
@include bsd.init.mnk for consistency and set NOLINT since this overrides
MKLINT which can be re-set from /etc/mk.conf.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.14 2015/10/05 17:49:10 christos Exp $
d122 6
@


1.14
log
@Arrange to install the dtrace files (some are broken, sets will need to be
fixed)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2015/09/30 00:17:09 christos Exp $
d6 1
a6 3
.include <bsd.own.mk>

.include	"../../Makefile.inc"
@


1.14.2.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.15 2016/08/04 17:07:24 christos Exp $
d6 3
a8 1
.include <bsd.init.mk>
@


1.14.2.2
log
@Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.16 2016/12/19 01:26:31 christos Exp $
a121 6
.SUFFIXES: .in
.in:
	${CPP} -D_KERNEL ${CPPFLAGS} $< | tr -d ' ' | tr '"' '@@' | \
	    ${TOOL_SED} -e 's/\&/\\\&/g' | grep '^s/' > ${.TARGET}


@


1.13
log
@do the stack protector stuff like the other files.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.12 2015/09/29 23:50:17 christos Exp $
d124 2
a125 6
#beforeinstall:
#.if exists(${DESTDIR}/usr/lib/dtrace)
#.for file in ${DSRCS}
#	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace
#.endfor
#.endif
@


1.12
log
@- make the generated file rules depend on the source files
- hack for clang on Darwin
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.11 2015/09/24 14:36:54 christos Exp $
d86 1
a110 4
.if ${_HOST_OSNAME} == "Darwin"
COPTS.dt_print.c+=	-fno-stack-protector
.endif

@


1.11
log
@Add build stuff.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.10 2015/02/07 20:30:03 christos Exp $
d110 3
a112 2
dt_errtags.c:
	sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mkerrtags.sh < ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/dt_errtags.h > dt_errtags.c
d114 7
a120 2
dt_names.c:
	sh ${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common/mknames.sh < ${OPENSOLARIS_SYS_DISTDIR}/uts/common/sys/dtrace.h > dt_names.c
@


1.10
log
@check and fix printf formats, negative array indices, uninitialized variables,
shadowed variables.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.9 2014/03/16 06:51:43 ozaki-r Exp $
d40 1
d42 1
d64 1
d93 3
d128 2
@


1.9
log
@Use MACHINE_CPU instead of MACHINE_ARCH with pattern matching

Include bsd.own.mk to use MACHINE_CPU.

Advised by matt@@
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.8 2014/03/16 05:11:19 ozaki-r Exp $
d5 1
@


1.8
log
@Look up arm directory on MACHINE_ARCH=*arm*
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7 2013/06/21 19:16:01 christos Exp $
d5 2
d91 1
a91 1
.elif !empty(MACHINE_ARCH:M*arm*)
@


1.7
log
@Make dtrace/zfs compile on arm based on the diff from:
    http://people.freebsd.org/~gonzo/arm/dtrace-arm.diff
Completely untested, kernel support not added.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.6 2012/02/13 12:52:54 wiz Exp $
d89 1
a89 1
.elif ${MACHINE_ARCH} == "arm"
@


1.6
log
@Use the correct MACHINE_ARCH for amd64.
Remove temporary hack while here.
From Henning Petersen in PR 46001.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2010/04/03 18:34:19 christos Exp $
d89 4
@


1.6.6.1
log
@resync from head
@
text
@d1 1
a1 1
#	$NetBSD$
a88 4
.elif ${MACHINE_ARCH} == "arm"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/arm
SRCS+=	dt_isadep.c
@


1.6.6.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a4 2
.include <bsd.own.mk>

d89 1
a89 1
.elif ${MACHINE_CPU} == "arm"
@


1.5
log
@- use CPPFLAGS instead of CFLAGS
- use relative .PATH
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.4 2010/02/24 15:40:54 tron Exp $
d85 1
a85 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
a88 3
.else
# temporary hack
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
@


1.5.6.1
log
@sync with head
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.5 2010/04/03 18:34:19 christos Exp $
d85 1
a85 1
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
d89 3
@


1.5.6.2
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,v 1.5.6.1 2012/04/17 00:04:09 yamt Exp $
a4 2
.include <bsd.own.mk>

a88 4
.elif ${MACHINE_CPU} == "arm"
CPPFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/arm
.PATH:		${.CURDIR}/../../dist/lib/libdtrace/arm
SRCS+=	dt_isadep.c
@


1.4
log
@Disable stack protection warnings for more sources which use dynamically
sized stack buffers.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.3 2010/02/24 12:51:05 tron Exp $
d55 2
a56 2
.PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libdtrace/common
.PATH:		${OPENSOLARIS_USR_DISTDIR}/lib/libgen/common
d58 1
a58 1
CFLAGS+=	-I${.OBJDIR} \
d86 1
a86 1
CFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
d88 1
a88 1
CFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/sparc
d91 1
a91 1
CFLAGS+=	-I${OPENSOLARIS_SYS_DISTDIR}/uts/intel
d108 3
@


1.3
log
@Disable stack protection warnings for sources which use dynamically
sized stack buffers.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.2 2010/02/21 01:46:35 darran Exp $
d73 11
@


1.2
log
@Apply NetBSD changes to DTrace.

Ok with core@@.
@
text
@d1 1
a1 1
#	$NetBSD$
d70 4
@


1.1
log
@Add the FreeBSD 8-RC1 changes for DTrace.

Ok with core@@.
@
text
@d1 2
a7 1
SHLIB_MAJOR=	2
d9 1
a9 1
WARNS=		1
d59 2
a60 2
		-I${.CURDIR}/../../../sys/cddl/compat/opensolaris \
		-I${.CURDIR}/../../../cddl/compat/opensolaris/include \
d66 2
d83 1
a83 1
CLEANFILES=	dt_errtags.c dt_names.c
d93 6
a98 6
beforeinstall:
.if exists(${DESTDIR}/usr/lib/dtrace)
.for file in ${DSRCS}
	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} ${.CURDIR}/${file} ${DESTDIR}/usr/lib/dtrace
.endfor
.endif
@

