head	1.12;
access;
symbols
	perseant-exfatfs-base-20261102:1.12
	netbsd-11-1-RELEASE:1.12
	netbsd-10-2-RELEASE:1.10
	netbsd-9-5-RELEASE:1.8
	netbsd-11-0-RELEASE:1.12
	netbsd-11-0-RC7:1.12
	netbsd-11-0-RC6:1.12
	netbsd-11-0-RC5:1.12
	netbsd-11-0-RC4:1.12
	netbsd-11-0-RC3:1.12
	netbsd-11-0-RC2:1.12
	netbsd-11-0-RC1:1.12
	perseant-exfatfs-base-20250801:1.12
	netbsd-11:1.12.0.4
	netbsd-11-base:1.12
	netbsd-10-1-RELEASE:1.10
	perseant-exfatfs-base-20240630:1.12
	perseant-exfatfs:1.12.0.2
	perseant-exfatfs-base:1.12
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.8
	netbsd-10-0-RELEASE:1.10
	netbsd-10-0-RC6:1.10
	netbsd-10-0-RC5:1.10
	netbsd-10-0-RC4:1.10
	netbsd-10-0-RC3:1.10
	netbsd-10-0-RC2:1.10
	netbsd-10-0-RC1:1.10
	netbsd-10:1.10.0.8
	netbsd-10-base:1.10
	netbsd-9-3-RELEASE:1.8
	cjep_sun2x-base1:1.10
	cjep_sun2x:1.10.0.6
	cjep_sun2x-base:1.10
	cjep_staticlib_x-base1:1.10
	netbsd-9-2-RELEASE:1.8
	cjep_staticlib_x:1.10.0.4
	cjep_staticlib_x-base:1.10
	netbsd-9-1-RELEASE:1.8
	phil-wifi-20200421:1.10
	phil-wifi-20200411:1.10
	is-mlppp:1.10.0.2
	is-mlppp-base:1.10
	phil-wifi-20200406:1.10
	netbsd-8-2-RELEASE:1.7
	netbsd-9-0-RELEASE:1.8
	netbsd-9-0-RC2:1.8
	netbsd-9-0-RC1:1.8
	phil-wifi-20191119:1.10
	netbsd-9:1.8.0.2
	netbsd-9-base:1.8
	phil-wifi-20190609:1.8
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.24
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.7.0.22
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.7.0.20
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.18
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.16
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.14
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.7.0.12
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.7.0.10
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.7
	netbsd-7-nhusb:1.7.0.8
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.6
	pgoyette-localcount-base:1.7
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.4
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-6-0-6-RELEASE:1.4
	netbsd-6-1-5-RELEASE:1.4
	netbsd-7:1.7.0.2
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.4.2.2
	netbsd-6-1-4-RELEASE:1.4
	netbsd-6-0-5-RELEASE:1.4
	tls-earlyentropy:1.6.0.6
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.6
	riastradh-drm2-base3:1.6
	netbsd-6-1-3-RELEASE:1.4
	netbsd-6-0-4-RELEASE:1.4
	netbsd-6-1-2-RELEASE:1.4
	netbsd-6-0-3-RELEASE:1.4
	netbsd-6-1-1-RELEASE:1.4
	riastradh-drm2-base2:1.6
	riastradh-drm2-base1:1.6
	riastradh-drm2:1.6.0.2
	riastradh-drm2-base:1.6
	netbsd-6-1:1.4.0.10
	netbsd-6-0-2-RELEASE:1.4
	netbsd-6-1-RELEASE:1.4
	netbsd-6-1-RC4:1.4
	netbsd-6-1-RC3:1.4
	agc-symver:1.6.0.4
	agc-symver-base:1.6
	netbsd-6-1-RC2:1.4
	netbsd-6-1-RC1:1.4
	yamt-pagecache-base8:1.6
	netbsd-6-0-1-RELEASE:1.4
	yamt-pagecache-base7:1.6
	matt-nb6-plus-nbase:1.4
	yamt-pagecache-base6:1.6
	netbsd-6-0:1.4.0.8
	netbsd-6-0-RELEASE:1.4
	netbsd-6-0-RC2:1.4
	tls-maxphys:1.5.0.2
	tls-maxphys-base:1.7
	matt-nb6-plus:1.4.0.6
	matt-nb6-plus-base:1.4
	netbsd-6-0-RC1:1.4
	yamt-pagecache-base5:1.5
	yamt-pagecache-base4:1.5
	netbsd-6:1.4.0.4
	netbsd-6-base:1.4
	yamt-pagecache-base3:1.4
	yamt-pagecache-base2:1.4
	yamt-pagecache:1.4.0.2
	yamt-pagecache-base:1.4
	cherry-xenmp:1.2.0.2
	cherry-xenmp-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.1.0.2
	bouyer-quota2-base:1.1
	matt-mips64-premerge-20101231:1.1;
locks; strict;
comment	@# @;


1.12
date	2023.11.10.23.03.25;	author christos;	state Exp;
branches;
next	1.11;
commitid	cAq7UflqazD8m7ME;

1.11
date	2023.06.03.09.09.15;	author lukem;	state Exp;
branches;
next	1.10;
commitid	aBaIRnuykonRStrE;

1.10
date	2019.10.13.07.28.14;	author mrg;	state Exp;
branches;
next	1.9;
commitid	vRNwN94v7NgB2GGB;

1.9
date	2019.09.29.23.45.01;	author mrg;	state Exp;
branches;
next	1.8;
commitid	xrLFk44PaFrGTXEB;

1.8
date	2019.02.04.05.24.18;	author mrg;	state Exp;
branches;
next	1.7;
commitid	zxBQim0KcEIlqpaB;

1.7
date	2014.04.06.19.28.59;	author christos;	state Exp;
branches
	1.7.24.1;
next	1.6;
commitid	IAEaeuKh6UpMPEvx;

1.6
date	2012.09.23.17.22.25;	author joerg;	state Exp;
branches
	1.6.6.1;
next	1.5;

1.5
date	2012.04.04.10.59.48;	author joerg;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2011.06.12.21.12.46;	author plunky;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2011.06.12.19.22.01;	author plunky;	state Exp;
branches;
next	1.2;

1.2
date	2011.02.26.02.41.33;	author pgoyette;	state Exp;
branches
	1.2.2.1;
next	1.1;

1.1
date	2010.12.27.02.04.19;	author pgoyette;	state Exp;
branches
	1.1.2.1;
next	;

1.7.24.1
date	2019.06.10.22.10.04;	author christos;	state Exp;
branches;
next	1.7.24.2;
commitid	jtc8rnCzWiEEHGqB;

1.7.24.2
date	2020.04.13.08.05.27;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;

1.6.6.1
date	2014.08.10.06.57.21;	author tls;	state Exp;
branches;
next	;
commitid	AUQXqF8ZGN9RCMLx;

1.5.2.1
date	2012.11.20.03.02.55;	author tls;	state Exp;
branches;
next	1.5.2.2;

1.5.2.2
date	2014.08.20.00.04.50;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.4.2.1
date	2012.04.17.00.09.11;	author yamt;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	2012.10.30.19.00.01;	author yamt;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2014.05.22.11.42.21;	author yamt;	state Exp;
branches;
next	;
commitid	30ZGlhv2KNB1MwBx;

1.2.2.1
date	2011.06.23.14.20.39;	author cherry;	state Exp;
branches;
next	;

1.1.2.1
date	2011.03.05.15.10.55;	author bouyer;	state Exp;
branches;
next	;


desc
@@


1.12
log
@PR/57689: RVP: getcwd() not overridable with -D_FORTIFY_SOURCE
@
text
@# $NetBSD: Makefile,v 1.11 2023/06/03 09:09:15 lukem Exp $

NOMAN=		# defined

.include <bsd.own.mk>

WARNS=	4

CPPFLAGS+=	-D_FORTIFY_SOURCE=2

COPTS.h_raw.c=	-fstack-protector-all -Wstack-protector
COPTS.h_raw.c+=	${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
COPTS.h_raw.c+=	${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}

# Bootstrap hack

.ifmake !clean && !obj && !cleandir
.BEGIN:
	${AR} cr libssp_nonshared.a
.endif

CLEANFILES+= 	libssp_nonshared.a
LDFLAGS+=	-L.

TESTSDIR=	${TESTSBASE}/lib/libc/ssp

TESTS_SH+=	t_ssp

BINDIR=		${TESTSDIR}

PROGS=		h_fgets
PROGS+=		h_gets
PROGS+=		h_getcwd
PROGS+=		h_getcwd2
PROGS+=		h_memcpy
PROGS+=		h_memmove
PROGS+=		h_memset
PROGS+=		h_raw
PROGS+=		h_read
PROGS+=		h_readlink
PROGS+=		h_snprintf
PROGS+=		h_sprintf
PROGS+=		h_stpcpy
PROGS+=		h_stpncpy
PROGS+=		h_strcat
PROGS+=		h_strcpy
PROGS+=		h_strncat
PROGS+=		h_strncpy
PROGS+=		h_vsnprintf
PROGS+=		h_vsprintf

# Test exercises truncation
COPTS.h_snprintf.c+=	${CC_WNO_FORMAT_TRUNCATION}

.include <bsd.test.mk>
@


1.11
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.10 2019/10/13 07:28:14 mrg Exp $
d34 1
@


1.10
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.9 2019/09/29 23:45:01 mrg Exp $
d52 1
a52 1
COPTS.h_snprintf.c+=	${GCC_NO_FORMAT_TRUNCATION}
@


1.9
log
@convert HAVE_GCC == 7 to HAVE_GCC >= 7.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2019/02/04 05:24:18 mrg Exp $
a50 1
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
d52 1
a52 2
COPTS.h_snprintf.c+=	-Wno-error=format-truncation
.endif
@


1.8
log
@- tests explicitly check failure modes, ignore those warnings
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2014/04/06 19:28:59 christos Exp $
d51 1
a51 1
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
@


1.7
log
@add stp*cpy() tests
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2012/09/23 17:22:25 joerg Exp $
d51 5
@


1.7.24.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2019/02/04 05:24:18 mrg Exp $
a50 5
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
# Test exercises truncation
COPTS.h_snprintf.c+=	-Wno-error=format-truncation
.endif

@


1.7.24.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@d1 1
a1 1
# $NetBSD$
d51 1
d53 2
a54 1
COPTS.h_snprintf.c+=	${GCC_NO_FORMAT_TRUNCATION}
@


1.6
log
@Update LLVM/Clang snapshot to r164464. This adopts the GCC options for
the SSP parameters and a not-yet-default rewrite of SROA.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2012/04/04 10:59:48 joerg Exp $
d42 2
@


1.6.6.1
log
@Rebase.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2014/04/06 19:28:59 christos Exp $
a41 2
PROGS+=		h_stpcpy
PROGS+=		h_stpncpy
@


1.5
log
@Disable new -Wstring-plus-int warning where needed for now.
Adjust various places that add GCC-only options to check for the active
compiler first.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2011/06/12 21:12:46 plunky Exp $
d13 1
a13 2
COPTS.h_raw.c+=	${${ACTIVE_CC} == "clang":? -mllvm -stack-protector-buffer-size=1 :}

@


1.5.2.1
log
@Resync to 2012-11-19 00:00:00 UTC
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2012/09/23 17:22:25 joerg Exp $
d13 2
a14 1
COPTS.h_raw.c+=	${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
@


1.5.2.2
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 1
# $NetBSD$
a41 2
PROGS+=		h_stpcpy
PROGS+=		h_stpncpy
@


1.4
log
@reinstate ssp:raw test, slightly differently.. this one is built
with -fstack-protector-all and tests that the compiler built in
stack protection works, by poking directly outside the buffer
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2011/06/12 19:22:01 plunky Exp $
d11 4
a14 1
COPTS.h_raw.c=	-fstack-protector-all -Wstack-protector --param=ssp-buffer-size=1
@


1.4.2.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2011/06/12 21:12:46 plunky Exp $
d11 1
a11 4
COPTS.h_raw.c=	-fstack-protector-all -Wstack-protector
COPTS.h_raw.c+=	${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
COPTS.h_raw.c+=	${${ACTIVE_CC} == "clang":? -mllvm -stack-protector-buffer-size=1 :}

@


1.4.2.2
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4.2.1 2012/04/17 00:09:11 yamt Exp $
d13 2
a14 1
COPTS.h_raw.c+=	${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
@


1.4.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,v 1.4.2.2 2012/10/30 19:00:01 yamt Exp $
a41 2
PROGS+=		h_stpcpy
PROGS+=		h_stpncpy
@


1.3
log
@don't pass -fstack-protector for these, the tests are actually for the
__*_chk functions included by -D_FORTIFY_SOURCE=2, and if the compiler
provides additional protection, it can mask broken functions..

(none of the _chk functions will return or process any data if
the length given is known to be larger than the buffer)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2011/02/26 02:41:33 pgoyette Exp $
d11 2
d35 1
@


1.2
log
@The ssp/raw test is useless.  Remove it.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2010/12/27 02:04:19 pgoyette Exp $
a9 2
CFLAGS+=	-fstack-protector-all -Wstack-protector
LDFLAGS+=	-fstack-protector-all -Wstack-protector
@


1.2.2.1
log
@Catchup with rmind-uvmplock merge.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2011/06/12 21:12:46 plunky Exp $
d10 2
a11 2

COPTS.h_raw.c=	-fstack-protector-all -Wstack-protector --param=ssp-buffer-size=1
a34 1
PROGS+=		h_raw
@


1.1
log
@Migrate the ssp tests from regress to atf.

Of the 17 tests, 4 fail in both the regress and atf style.  3 additional
tests fails in atf that did NOT fail in regress: gets, fgets, and read.
I will investigate why, and update when I can, but it is still useful to
get these tests into the new format where they can be exercised.
@
text
@d1 1
a1 1
# $NetBSD$
a34 1
PROGS+=		h_raw
@


1.1.2.1
log
@Sync with HEAD
@
text
@d35 1
@


