From 537f945fc89fab53f60fee07ac42c8aeab704ce7 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Sun, 9 Jul 2023 18:46:12 +0100 Subject: [PATCH] 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 --- Makefile.libcompat | 6 +++--- 1 file 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 \