aboutsummaryrefslogtreecommitdiff
path: root/Makefile.libcompat
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@FreeBSD.org>2023-07-09 17:46:12 +0000
committerJessica Clarke <jrtc27@FreeBSD.org>2023-07-09 17:46:12 +0000
commit537f945fc89fab53f60fee07ac42c8aeab704ce7 (patch)
tree56cc7c16f4d94043e7a5b54c319ded49db79d807 /Makefile.libcompat
parent0fbb77c3ef8eecb91caad8997a325a17c5fb374e (diff)
downloadsrc-537f945fc89fab53f60fee07ac42c8aeab704ce7.tar.gz
src-537f945fc89fab53f60fee07ac42c8aeab704ce7.zip
Makefile.libcompat: Quote CFLAGS and CXXFLAGS for sub-make
Currently none of the words in these require quoting, but a future commit will add words that do, thus we should make sure to quote each word so the shell doesn't mangle them before calling the sub-make. (Note that :@var@expr@ is the bmake syntax for map, replacing each word with expr's evaluation, with var containing the input word) Reviewed by: emaste, brooks, jhb Differential Revision: https://reviews.freebsd.org/D40921
Diffstat (limited to 'Makefile.libcompat')
-rw-r--r--Makefile.libcompat6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.libcompat b/Makefile.libcompat
index 4bcb7479270c..72ea4d865647 100644
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -25,9 +25,9 @@ LIB${_LIBCOMPAT}WMAKEENV+= \
# Don't rebuild build-tools targets during normal build.
LIB${_LIBCOMPAT}WMAKEENV+= BUILD_TOOLS_META=.NOMETA
.endif
-LIB${_LIBCOMPAT}WMAKEFLAGS+= CC="${XCC} ${LIB${_LIBCOMPAT}CFLAGS}" \
- CXX="${XCXX} ${LIB${_LIBCOMPAT}CXXFLAGS} ${LIB${_LIBCOMPAT}CFLAGS}" \
- CPP="${XCPP} ${LIB${_LIBCOMPAT}CFLAGS}" \
+LIB${_LIBCOMPAT}WMAKEFLAGS+= CC="${XCC} ${LIB${_LIBCOMPAT}CFLAGS:@v@${v:Q}@}" \
+ CXX="${XCXX} ${LIB${_LIBCOMPAT}CXXFLAGS:@v@${v:Q}@} ${LIB${_LIBCOMPAT}CFLAGS:@v@${v:Q}@}" \
+ CPP="${XCPP} ${LIB${_LIBCOMPAT}CFLAGS:@v@${v:Q}@}" \
DESTDIR=${WORLDTMP} \
-DNO_CPU_CFLAGS \
MK_BOOT=no \