build: glibc on Linux defines explicit_bzero in <string.h>.

Don't install strings.h on such systems.  The local prototype doesn't
match the native Linux one when built as C++ breaking the build of
config(8) as a bootstrap tool on some Linux systems.  If the missing
prototype becomes a problem in the future,
tools/build/cross-build/include/linux/strings.h can be patched to add
it.

Reviewed by:	imp, emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D39289
This commit is contained in:
John Baldwin 2023-03-27 14:27:16 -07:00
parent f59727087b
commit ac6b2b4344
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ SYSINCS+= stat.h
SRCS+= futimens.c utimensat.c
.endif
_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero ${HOST_INCLUDE_ROOT}/strings.h || true
_WITH_EXPLICIT_BZERO!= cat ${HOST_INCLUDE_ROOT}/strings.h ${HOST_INCLUDE_ROOT}/string.h | grep -c explicit_bzero || true
.if ${_WITH_EXPLICIT_BZERO} == 0
# .PATH: ${SRCTOP}/sys/libkern
# Adding sys/libkern to .PATH breaks building the cross-build compat library