git: 016e46fd869e - main - libc: Fix build with WITHOUT_MACHDEP_OPTIMIZATIONS=YES set.

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Tue, 10 Jan 2023 14:01:40 UTC
The branch main has been updated by arrowd (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=016e46fd869ebf9891ca4b2cf1d22b337717a8c8

commit 016e46fd869ebf9891ca4b2cf1d22b337717a8c8
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2023-01-10 10:17:01 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-01-10 14:00:41 +0000

    libc: Fix build with WITHOUT_MACHDEP_OPTIMIZATIONS=YES set.
    
    Test Plan: `make buildword WITHOUT_MACHDEP_OPTIMIZATIONS=YES` on 14-CURRENT and 13-STABLE
    
    Reviewed by: emaste
    
    Differential Revision: https://reviews.freebsd.org/D38017
    
    PR:             266900
---
 lib/libc/string/Makefile.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc
index afc113eeb867..3ecc3bc5b334 100644
--- a/lib/libc/string/Makefile.inc
+++ b/lib/libc/string/Makefile.inc
@@ -1,7 +1,10 @@
 #	@(#)Makefile.inc	8.1 (Berkeley) 6/4/93
 # $FreeBSD$
 
-.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string ${LIBC_SRCTOP}/string
+.if ${MK_MACHDEP_OPTIMIZATIONS} != "no"
+.PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/string
+.endif
+.PATH: ${LIBC_SRCTOP}/string
 .PATH: ${SRCTOP}/sys/libkern
 
 CFLAGS+= -I${LIBC_SRCTOP}/locale
@@ -39,8 +42,10 @@ CFLAGS.memchr.c+=		-fno-sanitize=address
 .endif
 
 
+.if ${MK_MACHDEP_OPTIMIZATIONS} != "no"
 # machine-dependent string sources
 .sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/string/Makefile.inc"
+.endif
 
 MAN+=	bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \
 	memcmp.3 memcpy.3 memmem.3 memmove.3 memset.3 strcasecmp.3 strcat.3 \