From ac6b2b4344cd586847fe4318c776e1213b09e6de Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 27 Mar 2023 14:27:16 -0700 Subject: [PATCH] build: glibc on Linux defines explicit_bzero in . 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 --- tools/build/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index c7875622b042..71a38534f7ac 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -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