head	1.21;
access;
symbols
	netbsd-11-0-RC6:1.21
	netbsd-11-0-RC5:1.21
	netbsd-11-0-RC4:1.21
	netbsd-11-0-RC3:1.21
	netbsd-11-0-RC2:1.21
	netbsd-11-0-RC1:1.21
	perseant-exfatfs-base-20250801:1.21
	netbsd-11:1.21.0.14
	netbsd-11-base:1.21
	netbsd-10-1-RELEASE:1.21
	perseant-exfatfs-base-20240630:1.21
	perseant-exfatfs:1.21.0.12
	perseant-exfatfs-base:1.21
	netbsd-8-3-RELEASE:1.16
	netbsd-9-4-RELEASE:1.19
	netbsd-10-0-RELEASE:1.21
	netbsd-10-0-RC6:1.21
	netbsd-10-0-RC5:1.21
	netbsd-10-0-RC4:1.21
	netbsd-10-0-RC3:1.21
	netbsd-10-0-RC2:1.21
	thorpej-ifq:1.21.0.10
	thorpej-ifq-base:1.21
	thorpej-altq-separation:1.21.0.8
	thorpej-altq-separation-base:1.21
	netbsd-10-0-RC1:1.21
	netbsd-10:1.21.0.6
	netbsd-10-base:1.21
	netbsd-9-3-RELEASE:1.19
	cjep_sun2x-base1:1.21
	cjep_sun2x:1.21.0.4
	cjep_sun2x-base:1.21
	cjep_staticlib_x-base1:1.21
	netbsd-9-2-RELEASE:1.19
	cjep_staticlib_x:1.21.0.2
	cjep_staticlib_x-base:1.21
	netbsd-9-1-RELEASE:1.19
	bouyer-xenpvh-base2:1.19
	phil-wifi-20200421:1.19
	bouyer-xenpvh-base1:1.19
	bouyer-xenpvh:1.19.0.8
	bouyer-xenpvh-base:1.19
	phil-wifi-20200411:1.19
	is-mlppp:1.19.0.6
	is-mlppp-base:1.19
	phil-wifi-20200406:1.19
	netbsd-8-2-RELEASE:1.16
	ad-namecache-base3:1.19
	netbsd-9-0-RELEASE:1.19
	netbsd-9-0-RC2:1.19
	ad-namecache:1.19.0.4
	ad-namecache-base:1.19
	netbsd-9-0-RC1:1.19
	phil-wifi-20191119:1.19
	netbsd-9:1.19.0.2
	netbsd-9-base:1.19
	phil-wifi-20190609:1.19
	netbsd-8-1-RELEASE:1.16
	netbsd-8-1-RC1:1.16
	pgoyette-compat-merge-20190127:1.17.2.1
	pgoyette-compat-20190127:1.18
	pgoyette-compat-20190118:1.18
	pgoyette-compat-1226:1.18
	pgoyette-compat-1126:1.18
	pgoyette-compat-1020:1.18
	pgoyette-compat-0930:1.18
	pgoyette-compat-0906:1.18
	netbsd-7-2-RELEASE:1.16
	pgoyette-compat-0728:1.17
	netbsd-8-0-RELEASE:1.16
	phil-wifi:1.17.0.4
	phil-wifi-base:1.17
	pgoyette-compat-0625:1.17
	netbsd-8-0-RC2:1.16
	pgoyette-compat-0521:1.17
	pgoyette-compat-0502:1.17
	pgoyette-compat-0422:1.17
	netbsd-8-0-RC1:1.16
	pgoyette-compat-0415:1.17
	pgoyette-compat-0407:1.17
	pgoyette-compat-0330:1.17
	pgoyette-compat-0322:1.17
	pgoyette-compat-0315:1.17
	netbsd-7-1-2-RELEASE:1.16
	pgoyette-compat:1.17.0.2
	pgoyette-compat-base:1.17
	netbsd-7-1-1-RELEASE:1.16
	tls-maxphys-20171202:1.17
	matt-nb8-mediatek:1.16.0.20
	matt-nb8-mediatek-base:1.16
	perseant-stdc-iso10646:1.16.0.18
	perseant-stdc-iso10646-base:1.16
	netbsd-8:1.16.0.16
	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.14
	prg-localcount2-base:1.16
	pgoyette-localcount-20170426:1.16
	bouyer-socketcan-base1:1.16
	pgoyette-localcount-20170320:1.16
	netbsd-7-1:1.16.0.12
	netbsd-7-1-RELEASE:1.16
	netbsd-7-1-RC2:1.16
	netbsd-7-nhusb-base-20170116:1.16
	bouyer-socketcan:1.16.0.10
	bouyer-socketcan-base:1.16
	pgoyette-localcount-20170107:1.16
	netbsd-7-1-RC1:1.16
	pgoyette-localcount-20161104:1.16
	netbsd-7-0-2-RELEASE:1.16
	localcount-20160914:1.16
	netbsd-7-nhusb:1.16.0.8
	netbsd-7-nhusb-base:1.16
	pgoyette-localcount-20160806:1.16
	pgoyette-localcount-20160726:1.16
	pgoyette-localcount:1.16.0.6
	pgoyette-localcount-base:1.16
	netbsd-7-0-1-RELEASE:1.16
	netbsd-7-0:1.16.0.4
	netbsd-7-0-RELEASE:1.16
	netbsd-7-0-RC3:1.16
	netbsd-7-0-RC2:1.16
	netbsd-7-0-RC1:1.16
	netbsd-5-2-3-RELEASE:1.10
	netbsd-5-1-5-RELEASE:1.10
	netbsd-6-0-6-RELEASE:1.11
	netbsd-6-1-5-RELEASE:1.11
	netbsd-7:1.16.0.2
	netbsd-7-base:1.16
	yamt-pagecache-base9:1.15
	yamt-pagecache-tag8:1.11.2.1
	netbsd-6-1-4-RELEASE:1.11
	netbsd-6-0-5-RELEASE:1.11
	tls-earlyentropy:1.15.0.2
	tls-earlyentropy-base:1.15
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.15
	riastradh-drm2-base3:1.15
	netbsd-6-1-3-RELEASE:1.11
	netbsd-6-0-4-RELEASE:1.11
	netbsd-5-2-2-RELEASE:1.10
	netbsd-5-1-4-RELEASE:1.10
	netbsd-6-1-2-RELEASE:1.11
	netbsd-6-0-3-RELEASE:1.11
	netbsd-5-2-1-RELEASE:1.10
	netbsd-5-1-3-RELEASE:1.10
	rmind-smpnet-nbase:1.12
	netbsd-6-1-1-RELEASE:1.11
	riastradh-drm2-base2:1.12
	riastradh-drm2-base1:1.12
	riastradh-drm2:1.12.0.4
	riastradh-drm2-base:1.12
	rmind-smpnet-base:1.12
	netbsd-6-1:1.11.0.10
	netbsd-6-0-2-RELEASE:1.11
	netbsd-6-1-RELEASE:1.11
	khorben-n900:1.12.0.8
	netbsd-6-1-RC4:1.11
	netbsd-6-1-RC3:1.11
	agc-symver:1.12.0.6
	agc-symver-base:1.12
	netbsd-6-1-RC2:1.11
	netbsd-6-1-RC1:1.11
	yamt-pagecache-base8:1.12
	netbsd-5-2:1.10.0.18
	netbsd-6-0-1-RELEASE:1.11
	yamt-pagecache-base7:1.12
	netbsd-5-2-RELEASE:1.10
	netbsd-5-2-RC1:1.10
	matt-nb6-plus-nbase:1.11
	yamt-pagecache-base6:1.12
	netbsd-6-0:1.11.0.8
	netbsd-6-0-RELEASE:1.11
	netbsd-6-0-RC2:1.11
	tls-maxphys:1.12.0.2
	tls-maxphys-base:1.16
	matt-nb6-plus:1.11.0.6
	matt-nb6-plus-base:1.11
	netbsd-6-0-RC1:1.11
	yamt-pagecache-base5:1.11
	yamt-pagecache-base4:1.11
	netbsd-6:1.11.0.4
	netbsd-6-base:1.11
	netbsd-5-1-2-RELEASE:1.10
	netbsd-5-1-1-RELEASE:1.10
	yamt-pagecache-base3:1.11
	yamt-pagecache-base2:1.11
	yamt-pagecache:1.11.0.2
	yamt-pagecache-base:1.11
	cherry-xenmp:1.10.0.14
	cherry-xenmp-base:1.10
	bouyer-quota2-nbase:1.10
	bouyer-quota2:1.10.0.16
	bouyer-quota2-base:1.10
	matt-mips64-premerge-20101231:1.10
	matt-nb5-mips64-premerge-20101231:1.10
	matt-nb5-pq3:1.10.0.12
	matt-nb5-pq3-base:1.10
	netbsd-5-1:1.10.0.10
	netbsd-5-1-RELEASE:1.10
	yamt-nfs-mp-base11:1.10
	netbsd-5-1-RC4:1.10
	matt-nb5-mips64-k15:1.10
	yamt-nfs-mp-base10:1.10
	netbsd-5-1-RC3:1.10
	netbsd-5-1-RC2:1.10
	netbsd-5-1-RC1:1.10
	rmind-uvmplock-base:1.10
	yamt-nfs-mp-base9:1.10
	netbsd-5-0-2-RELEASE:1.10
	matt-nb5-mips64-premerge-20091211:1.10
	matt-premerge-20091211:1.10
	yamt-nfs-mp-base8:1.10
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.10
	matt-nb4-mips64-k7-u2a-k9b:1.10
	matt-nb5-mips64-u1-k1-k5:1.10
	yamt-nfs-mp-base7:1.10
	matt-nb5-mips64:1.10.0.8
	netbsd-5-0-1-RELEASE:1.10
	jymxensuspend-base:1.10
	yamt-nfs-mp-base6:1.10
	yamt-nfs-mp-base5:1.10
	yamt-nfs-mp-base4:1.10
	jym-xensuspend-nbase:1.10
	yamt-nfs-mp-base3:1.10
	netbsd-5-0:1.10.0.6
	netbsd-5-0-RELEASE:1.10
	netbsd-5-0-RC4:1.10
	netbsd-5-0-RC3:1.10
	netbsd-5-0-RC2:1.10
	jym-xensuspend:1.10.0.4
	jym-xensuspend-base:1.10
	netbsd-5-0-RC1:1.10
	netbsd-5:1.10.0.2
	netbsd-5-base:1.10
	matt-mips64-base2:1.9
	matt-mips64:1.6.0.20
	netbsd-4-0-1-RELEASE:1.6
	wrstuden-revivesa-base-3:1.9
	wrstuden-revivesa-base-2:1.9
	wrstuden-fixsa-newbase:1.6
	wrstuden-revivesa-base-1:1.9
	yamt-pf42-base4:1.9
	yamt-pf42-base3:1.8
	hpcarm-cleanup-nbase:1.8
	yamt-pf42-baseX:1.8
	yamt-pf42-base2:1.8
	yamt-nfs-mp-base2:1.8
	wrstuden-revivesa:1.8.0.6
	wrstuden-revivesa-base:1.9
	yamt-nfs-mp-base:1.8
	yamt-pf42:1.8.0.4
	yamt-pf42-base:1.8
	yamt-lazymbuf-base15:1.8
	yamt-lazymbuf-base14:1.8
	keiichi-mipv6:1.8.0.2
	keiichi-mipv6-base:1.8
	matt-armv6-nbase:1.8
	matt-armv6-prevmlocking:1.6
	wrstuden-fixsa-base-1:1.6
	netbsd-4-0:1.6.0.18
	netbsd-4-0-RELEASE:1.6
	yamt-kmem-base3:1.7
	cube-autoconf:1.7.0.2
	cube-autoconf-base:1.7
	yamt-kmem-base2:1.7
	yamt-kmem-base:1.7
	reinoud-bufcleanup-nbase:1.7
	netbsd-4-0-RC5:1.6
	netbsd-4-0-RC4:1.6
	yamt-x86pmap-base4:1.6
	netbsd-4-0-RC3:1.6
	yamt-x86pmap-base3:1.6
	yamt-x86pmap-base2:1.6
	netbsd-4-0-RC2:1.6
	yamt-x86pmap-base:1.6
	netbsd-4-0-RC1:1.6
	matt-armv6:1.6.0.16
	matt-armv6-base:1.7
	matt-mips64-base:1.6
	hpcarm-cleanup:1.6.0.14
	hpcarm-cleanup-base:1.8
	yamt-idlelwp-base8:1.6
	wrstuden-fixsa:1.6.0.12
	wrstuden-fixsa-base:1.6
	thorpej-atomic:1.6.0.10
	thorpej-atomic-base:1.6
	reinoud-bufcleanup:1.6.0.8
	reinoud-bufcleanup-base:1.7
	vmlocking:1.6.0.6
	vmlocking-base:1.6
	yamt-splraiseipl-base5:1.6
	yamt-splraiseipl-base4:1.6
	yamt-splraiseipl-base3:1.6
	abandoned-netbsd-4-base:1.5
	abandoned-netbsd-4:1.5.0.2
	newlock2:1.6.0.2
	newlock2-base:1.6
	yamt-splraiseipl-base2:1.5
	yamt-splraiseipl-base:1.5
	yamt-pdpolicy-base9:1.5
	yamt-pdpolicy-base8:1.5
	yamt-pdpolicy-base7:1.5
	netbsd-4:1.6.0.4
	netbsd-4-base:1.6
	yamt-pdpolicy-base6:1.5
	yamt-pdpolicy-base5:1.5;
locks; strict;
comment	@# @;


1.21
date	2021.04.27.09.14.24;	author skrll;	state Exp;
branches;
next	1.20;
commitid	znObY0EuqNHTyUQC;

1.20
date	2020.04.30.03.28.18;	author riastradh;	state Exp;
branches;
next	1.19;
commitid	cPJImU3MZz0Vhm6C;

1.19
date	2019.06.04.15.07.55;	author hannken;	state Exp;
branches;
next	1.18;
commitid	btUZeAkzm4bmNSpB;

1.18
date	2018.08.03.03.35.17;	author kamil;	state Exp;
branches;
next	1.17;
commitid	BPF44DwtUnSUKCMA;

1.17
date	2017.11.30.05.47.24;	author riastradh;	state Exp;
branches
	1.17.2.1
	1.17.4.1;
next	1.16;
commitid	Xv9t7ikdg7HBo1hA;

1.16
date	2014.08.10.23.25.49;	author matt;	state Exp;
branches;
next	1.15;
commitid	nUOYsVLDom8Q5SLx;

1.15
date	2014.01.29.23.37.18;	author joerg;	state Exp;
branches;
next	1.14;
commitid	XzET6rd2DWYkm4nx;

1.14
date	2014.01.16.11.43.49;	author joerg;	state Exp;
branches;
next	1.13;
commitid	b7UEpEOWJELBPklx;

1.13
date	2014.01.15.20.58.09;	author joerg;	state Exp;
branches;
next	1.12;
commitid	v5g8MDnA7INJVflx;

1.12
date	2012.07.08.01.21.12;	author rmind;	state Exp;
branches
	1.12.2.1;
next	1.11;

1.11
date	2011.06.16.16.39.14;	author joerg;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	2008.10.26.07.22.50;	author mrg;	state Exp;
branches
	1.10.14.1;
next	1.9;

1.9
date	2008.06.15.20.35.11;	author christos;	state Exp;
branches;
next	1.8;

1.8
date	2008.01.22.12.34.58;	author nakayama;	state Exp;
branches
	1.8.4.1
	1.8.6.1;
next	1.7;

1.7
date	2007.11.28.15.25.44;	author ad;	state Exp;
branches;
next	1.6;

1.6
date	2006.10.27.21.23.15;	author christos;	state Exp;
branches
	1.6.2.1
	1.6.10.1
	1.6.16.1;
next	1.5;

1.5
date	2005.12.27.08.43.05;	author yamt;	state Exp;
branches;
next	1.4;

1.4
date	2005.12.27.07.31.45;	author yamt;	state Exp;
branches;
next	1.3;

1.3
date	2005.12.21.21.47.30;	author christos;	state Exp;
branches;
next	1.2;

1.2
date	2005.12.20.22.51.18;	author christos;	state Exp;
branches;
next	1.1;

1.1
date	2005.12.20.19.28.49;	author christos;	state Exp;
branches;
next	;

1.17.2.1
date	2018.09.06.06.51.32;	author pgoyette;	state Exp;
branches;
next	;
commitid	HCi1bXD317XIK0RA;

1.17.4.1
date	2019.06.10.21.41.05;	author christos;	state Exp;
branches;
next	1.17.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.17.4.2
date	2020.04.21.18.41.14;	author martin;	state dead;
branches;
next	1.17.4.3;
commitid	86tA4aEmdr3VCh5C;

1.17.4.3
date	2020.04.21.19.37.41;	author martin;	state Exp;
branches;
next	;
commitid	x6IB64bYH9UmWh5C;

1.12.2.1
date	2014.08.19.23.45.11;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;

1.11.2.1
date	2012.10.30.18.46.09;	author yamt;	state Exp;
branches;
next	1.11.2.2;

1.11.2.2
date	2014.05.22.11.26.28;	author yamt;	state Exp;
branches;
next	;
commitid	cEEO2r50Gg5BGwBx;

1.10.14.1
date	2011.06.23.14.17.49;	author cherry;	state Exp;
branches;
next	;

1.8.4.1
date	2008.06.17.09.13.31;	author yamt;	state Exp;
branches;
next	;

1.8.6.1
date	2008.06.23.04.26.44;	author wrstuden;	state Exp;
branches;
next	;

1.6.2.1
date	2006.10.27.21.23.15;	author christos;	state dead;
branches;
next	1.6.2.2;

1.6.2.2
date	2006.10.27.21.23.16;	author christos;	state Exp;
branches;
next	;

1.6.10.1
date	2007.04.17.05.53.52;	author thorpej;	state Exp;
branches;
next	;

1.6.16.1
date	2008.01.09.01.20.46;	author matt;	state Exp;
branches;
next	1.6.16.2;

1.6.16.2
date	2008.03.23.00.12.40;	author matt;	state Exp;
branches;
next	;


desc
@@


1.21
log
@Provide all the LSE operation fuctions.  The use of LSE instructions is
currently disabled.
@
text
@# $NetBSD: Makefile.inc,v 1.20 2020/04/30 03:28:18 riastradh Exp $

.include <bsd.own.mk>

COMMON_DIR:=${.PARSEDIR}
COMMON_CODEDIRS=atomic gen gmon inet md misc net rpc stdlib string sys
COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/sha3 hash/rmd160 hash/murmurhash

.if defined(COMMON_MACHINE_ARCH) && !empty(COMMON_MACHINE_ARCH) && \
    exists(${COMMON_DIR}/arch/${COMMON_MACHINE_ARCH})
COMMON_ARCHSUBDIR=	${COMMON_MACHINE_ARCH}
.elif defined(COMMON_MACHINE_CPU) && !empty(COMMON_MACHINE_CPU) && \
    exists(${COMMON_DIR}/arch/${COMMON_MACHINE_CPU})
COMMON_ARCHSUBDIR=	${COMMON_MACHINE_CPU}
.elif defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
    exists(${KERNDIR}/arch/${LIBKERN_ARCH})
COMMON_ARCHSUBDIR=	${LIBKERN_ARCH}
.elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
COMMON_ARCHSUBDIR=	${MACHINE_ARCH}
.elif exists(${COMMON_DIR}/arch/${MACHINE_CPU})
COMMON_ARCHSUBDIR=	${MACHINE_CPU}
.endif

COMMON_ARCHDIR=${COMMON_DIR}/arch/${COMMON_ARCHSUBDIR}

.for i in ${COMMON_CODEDIRS}
.if exists(${COMMON_DIR}/$i)
.PATH.c: ${COMMON_DIR}/$i
.endif
.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
.include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
.endif
.if !empty(CPPFLAGS:M-DLIBKERN_OPTIMISE_SPACE) && \
    exists(${COMMON_ARCHDIR}/$i/small)
.PATH.S: ${COMMON_ARCHDIR}/$i/small
.endif

.if exists(${COMMON_ARCHDIR}/$i)
.PATH.c: ${COMMON_ARCHDIR}/$i
.PATH.S: ${COMMON_ARCHDIR}/$i
.endif
.endfor

CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string
.if defined(COMMON_ARCHSUBDIR)
CPPFLAGS+=-I${COMMON_ARCHDIR}/string
CPPFLAGS+=-I${COMMON_ARCHDIR}/atomic
.endif
CPPFLAGS+=-I${COMMON_DIR}/hash/sha3
@


1.20
log
@Rewrite entropy subsystem.

Primary goals:

1. Use cryptography primitives designed and vetted by cryptographers.
2. Be honest about entropy estimation.
3. Propagate full entropy as soon as possible.
4. Simplify the APIs.
5. Reduce overhead of rnd_add_data and cprng_strong.
6. Reduce side channels of HWRNG data and human input sources.
7. Improve visibility of operation with sysctl and event counters.

Caveat: rngtest is no longer used generically for RND_TYPE_RNG
rndsources.  Hardware RNG devices should have hardware-specific
health tests.  For example, checking for two repeated 256-bit outputs
works to detect AMD's 2019 RDRAND bug.  Not all hardware RNGs are
necessarily designed to produce exactly uniform output.

ENTROPY POOL

- A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1
  kludge as the cryptographic primitive.

- `Entropy depletion' is available for testing purposes with a sysctl
  knob kern.entropy.depletion; otherwise it is disabled, and once the
  system reaches full entropy it is assumed to stay there as far as
  modern cryptography is concerned.

- No `entropy estimation' based on sample values.  Such `entropy
  estimation' is a contradiction in terms, dishonest to users, and a
  potential source of side channels.  It is the responsibility of the
  driver author to study the entropy of the process that generates
  the samples.

- Per-CPU gathering pools avoid contention on a global queue.

- Entropy is occasionally consolidated into global pool -- as soon as
  it's ready, if we've never reached full entropy, and with a rate
  limit afterward.  Operators can force consolidation now by running
  sysctl -w kern.entropy.consolidate=1.

- rndsink(9) API has been replaced by an epoch counter which changes
  whenever entropy is consolidated into the global pool.
  . Usage: Cache entropy_epoch() when you seed.  If entropy_epoch()
    has changed when you're about to use whatever you seeded, reseed.
  . Epoch is never zero, so initialize cache to 0 if you want to reseed
    on first use.
  . Epoch is -1 iff we have never reached full entropy -- in other
    words, the old rnd_initial_entropy is (entropy_epoch() != -1) --
    but it is better if you check for changes rather than for -1, so
    that if the system estimated its own entropy incorrectly, entropy
    consolidation has the opportunity to prevent future compromise.

- Sysctls and event counters provide operator visibility into what's
  happening:
  . kern.entropy.needed - bits of entropy short of full entropy
  . kern.entropy.pending - bits known to be pending in per-CPU pools,
    can be consolidated with sysctl -w kern.entropy.consolidate=1
  . kern.entropy.epoch - number of times consolidation has happened,
    never 0, and -1 iff we have never reached full entropy

CPRNG_STRONG

- A cprng_strong instance is now a collection of per-CPU NIST
  Hash_DRBGs.  There are only two in the system: user_cprng for
  /dev/urandom and sysctl kern.?random, and kern_cprng for kernel
  users which may need to operate in interrupt context up to IPL_VM.

  (Calling cprng_strong in interrupt context does not strike me as a
  particularly good idea, so I added an event counter to see whether
  anything actually does.)

- Event counters provide operator visibility into when reseeding
  happens.

INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG)

- Unwired for now; will be rewired in a subsequent commit.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.19 2019/06/04 15:07:55 hannken Exp $
d47 1
@


1.19
log
@Move the basic part of XDR to common/include/rpc and common/lib/libc/rpc.

No functional change intended.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.18 2018/08/03 03:35:17 kamil Exp $
d48 1
@


1.18
log
@Register a new directory in common/lib/libc/misc

Registe misc/ with ubsan.c.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.17 2017/11/30 05:47:24 riastradh Exp $
d6 1
a6 1
COMMON_CODEDIRS=atomic gen gmon inet md misc net stdlib string sys
@


1.17
log
@Import SHA-3 code into libc and libkern.

No new public symbols in libc, but publishing the symbols is a simple
matter if/when we decide to do so.

Proposed on tech-kern and tech-userlevel with no objections:

https://mail-index.NetBSD.org/tech-kern/2017/11/11/msg022581.html
https://mail-index.NetBSD.org/tech-userlevel/2017/11/11/msg010968.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.16 2014/08/10 23:25:49 matt Exp $
d6 1
a6 1
COMMON_CODEDIRS=atomic gen gmon inet md net stdlib string sys
@


1.17.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.19 2019/06/04 15:07:55 hannken Exp $
d6 1
a6 1
COMMON_CODEDIRS=atomic gen gmon inet md misc net rpc stdlib string sys
@


1.17.4.2
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.17.4.1 2019/06/10 21:41:05 christos Exp $
@


1.17.4.3
log
@Ooops, restore accidently removed files from merge mishap
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.19 2019/06/04 15:07:55 hannken Exp $
@


1.17.2.1
log
@Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.18 2018/08/03 03:35:17 kamil Exp $
d6 1
a6 1
COMMON_CODEDIRS=atomic gen gmon inet md misc net stdlib string sys
@


1.16
log
@MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE_CPU
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.15 2014/01/29 23:37:18 joerg Exp $
d7 1
a7 1
COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160 hash/murmurhash
@


1.15
log
@Include compiler-rt in libc, libm and libkern.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.14 2014/01/16 11:43:49 joerg Exp $
d12 3
@


1.14
log
@Include bsd.own.mk in case it hasn't been yet.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.13 2014/01/15 20:58:09 joerg Exp $
a7 3
.if ${HAVE_LIBGCC} != "no"
COMMON_CODEDIRS+=quad
.endif
@


1.13
log
@Use the quad support from compiler-rt for MKLIBGCC=no.
@
text
@d1 3
a3 1
# $NetBSD: Makefile.inc,v 1.12 2012/07/08 01:21:12 rmind Exp $
@


1.12
log
@Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
The code is taken from the upstream and is in the public domain.

OK christos@@
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.11 2011/06/16 16:39:14 joerg Exp $
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
d6 3
@


1.12.2.1
log
@Rebase to HEAD as of a few days ago.
@
text
@d1 1
a1 3
# $NetBSD$

.include <bsd.own.mk>
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net stdlib string sys
a9 3
.elif defined(COMMON_MACHINE_CPU) && !empty(COMMON_MACHINE_CPU) && \
    exists(${COMMON_DIR}/arch/${COMMON_MACHINE_CPU})
COMMON_ARCHSUBDIR=	${COMMON_MACHINE_CPU}
@


1.11
log
@Add support for size optimised versions of the assembler functions in
the small subdirectory. Provide more compact versions of the functions
used by bootxx in x86.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.10 2008/10/26 07:22:50 mrg Exp $
d5 1
a5 1
COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160
@


1.11.2.1
log
@sync with head
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.11 2011/06/16 16:39:14 joerg Exp $
d5 1
a5 1
COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160 hash/murmurhash
@


1.11.2.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 3
# $NetBSD: Makefile.inc,v 1.11.2.1 2012/10/30 18:46:09 yamt Exp $

.include <bsd.own.mk>
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net stdlib string sys
@


1.10
log
@look for COMMON_MACHINE_ARCH before MACHINE_ARCH or MACHINE_CPU.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.9 2008/06/15 20:35:11 christos Exp $
d28 5
@


1.10.14.1
log
@Catchup with rmind-uvmplock merge.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.11 2011/06/16 16:39:14 joerg Exp $
a27 5
.if !empty(CPPFLAGS:M-DLIBKERN_OPTIMISE_SPACE) && \
    exists(${COMMON_ARCHDIR}/$i/small)
.PATH.S: ${COMMON_ARCHDIR}/$i/small
.endif

@


1.9
log
@Hook into sys
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.8 2008/01/22 12:34:58 nakayama Exp $
d7 4
a10 1
.if defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
@


1.8
log
@Search files in arch/sparc64/atomic before arch/sparc/atomic in case of
sparc64 32-bit kernel.

Make sparc64 32-bit kernel works again.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.7 2007/11/28 15:25:44 ad Exp $
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string
@


1.8.6.1
log
@Sync w/ -current. 34 merge conflicts to follow.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.8 2008/01/22 12:34:58 nakayama Exp $
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
@


1.8.4.1
log
@sync with head.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.8 2008/01/22 12:34:58 nakayama Exp $
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string sys
@


1.7
log
@Hook the atomic ops in. Right now they are only built into libkern, and
only if available.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.6 2006/10/27 21:23:15 christos Exp $
d22 3
a28 3
.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
.include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
.endif
@


1.6
log
@this is shared with the kernel now.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.5 2005/12/27 08:43:05 yamt Exp $
d4 1
a4 1
COMMON_CODEDIRS=gen gmon inet md net quad stdlib string
d23 1
d26 3
@


1.6.2.1
log
@file Makefile.inc was added on branch newlock2 on 2006-10-27 21:23:16 +0000
@
text
@d1 30
@


1.6.2.2
log
@this is shared with the kernel now.
@
text
@a0 30
# $NetBSD: Makefile.inc,v 1.6 2006/10/27 21:23:15 christos Exp $

COMMON_DIR:=${.PARSEDIR}
COMMON_CODEDIRS=gen gmon inet md net quad stdlib string
COMMON_CODEDIRS+=hash/sha1 hash/sha2 hash/rmd160

.if defined(LIBKERN_ARCH) && !empty(LIBKERN_ARCH) && \
    exists(${KERNDIR}/arch/${LIBKERN_ARCH})
COMMON_ARCHSUBDIR=	${LIBKERN_ARCH}
.elif exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
COMMON_ARCHSUBDIR=	${MACHINE_ARCH}
.elif exists(${COMMON_DIR}/arch/${MACHINE_CPU})
COMMON_ARCHSUBDIR=	${MACHINE_CPU}
.endif

COMMON_ARCHDIR=${COMMON_DIR}/arch/${COMMON_ARCHSUBDIR}

.for i in ${COMMON_CODEDIRS}
.if exists(${COMMON_DIR}/$i)
.PATH.c: ${COMMON_DIR}/$i
.endif
.if exists(${COMMON_ARCHDIR}/$i)
.PATH.S: ${COMMON_ARCHDIR}/$i
.endif
.endfor

CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string
.if defined(COMMON_ARCHSUBDIR)
CPPFLAGS+=-I${COMMON_ARCHDIR}/string
.endif
@


1.6.16.1
log
@sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD$
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string
a22 1
.PATH.c: ${COMMON_ARCHDIR}/$i
a24 3
.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
.include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
.endif
@


1.6.16.2
log
@sync with HEAD
@
text
@d1 1
a1 1
# Makefile.inc,v 1.6.16.1 2008/01/09 01:20:46 matt Exp
a21 3
.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
.include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
.endif
d26 3
@


1.6.10.1
log
@Add build glue for i386 atomic ops.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.6 2006/10/27 21:23:15 christos Exp $
d4 1
a4 1
COMMON_CODEDIRS=atomic gen gmon inet md net quad stdlib string
a22 1
.PATH.c: ${COMMON_ARCHDIR}/$i
a24 3
.if exists(${COMMON_ARCHDIR}/${i}/Makefile.inc)
.include "${COMMON_ARCHDIR}/${i}/Makefile.inc"
.endif
@


1.5
log
@lack of COMMON_ARCHDIR is not fatal.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.4 2005/12/27 07:31:45 yamt Exp $
d4 2
a5 1
COMMON_CODEDIRS=gen gmon hash/sha1 inet md net quad stdlib string
@


1.4
log
@print a meaningful error rather than "Need an operator".
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.3 2005/12/21 21:47:30 christos Exp $
d13 1
a13 5
.else
.BEGIN:
	@@echo no COMMON_ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
	@@false
.endif    
d26 4
a29 1
CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_DIR}/string -I${COMMON_ARCHDIR}/string
@


1.3
log
@x86_64 uses i386 assembly files in standalone mode.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.2 2005/12/20 22:51:18 christos Exp $
d15 1
a15 1
        @@echo no COMMON_ARCHSUBDIR for ${MACHINE_ARCH} nor ${MACHINE_CPU}
@


1.2
log
@Include string in the cpp flags.
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.1 2005/12/20 19:28:49 christos Exp $
d6 5
a10 2
.if exists(${COMMON_DIR}/arch/${MACHINE_ARCH})
COMMON_ARCHSUBDIR=     ${MACHINE_ARCH}
d12 1
a12 1
COMMON_ARCHSUBDIR=     ${MACHINE_CPU}
@


1.1
log
@Merge libkern + libc common files. As requested by core.
@
text
@d1 1
a1 1
# $NetBSD$
d27 1
a27 1
CPPFLAGS+=-I${COMMON_DIR}/quad -I${COMMON_ARCHDIR}/string
@
