From aef88b83384976e96a8fb287a001588a2277ecd5 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 2 Oct 2025 08:53:45 +0800 Subject: [PATCH] binutils/GCC: Quote ${COMPILER_FOR_TARGET} Replace if test x${COMPILER_FOR_TARGET} = x"\$(CC)"; then with if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then since COMPILER_FOR_TARGET may contain spaces when configuring GCC. * configure: Regenerated. config/ * clang-plugin.m4 (CLANG_PLUGIN_FILE_FOR_TARGET): Quote ${COMPILER_FOR_TARGET}. * gcc-plugin.m4 (GCC_PLUGIN_OPTION_FOR_TARGET): Likewise. Signed-off-by: H.J. Lu --- config/clang-plugin.m4 | 2 +- config/gcc-plugin.m4 | 2 +- configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/clang-plugin.m4 b/config/clang-plugin.m4 index b6b28ab8d21..cc051fe48e3 100644 --- a/config/clang-plugin.m4 +++ b/config/clang-plugin.m4 @@ -68,7 +68,7 @@ dnl (SHELL-CODE_HANDLER) dnl AC_DEFUN([CLANG_PLUGIN_FILE_FOR_TARGET],[dnl COMPILER_FOR_TARGET="${CC_FOR_TARGET}" - if test x${COMPILER_FOR_TARGET} = x"\$(CC)"; then + if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then COMPILER_FOR_TARGET="$CC" fi saved_CC="$CC" diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4 index 687af3e7c17..0382147b381 100644 --- a/config/gcc-plugin.m4 +++ b/config/gcc-plugin.m4 @@ -178,7 +178,7 @@ dnl AC_DEFUN([GCC_PLUGIN_OPTION_FOR_TARGET],[dnl COMPILER_FOR_TARGET="${CC_FOR_TARGET}" dnl Check if the host compiler is used. -if test x${COMPILER_FOR_TARGET} = x"\$(CC)"; then +if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then COMPILER_FOR_TARGET="$CC" fi saved_CC="$CC" diff --git a/configure b/configure index 90f99cdef7b..54b71af5d3b 100755 --- a/configure +++ b/configure @@ -20599,7 +20599,7 @@ NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target} # Try CLANG_PLUGIN_FILE_FOR_TARGET first since GCC_PLUGIN_OPTION_FOR_TARGET # may return the wrong PLUGIN_OPTION_FOR_TARGET with clang. COMPILER_FOR_TARGET="${CC_FOR_TARGET}" - if test x${COMPILER_FOR_TARGET} = x"\$(CC)"; then + if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then COMPILER_FOR_TARGET="$CC" fi saved_CC="$CC" @@ -20701,7 +20701,7 @@ if test -n "$PLUGIN_FILE_FOR_TARGET"; then PLUGIN_OPTION_FOR_TARGET="--plugin $PLUGIN_FILE_FOR_TARGET" else COMPILER_FOR_TARGET="${CC_FOR_TARGET}" -if test x${COMPILER_FOR_TARGET} = x"\$(CC)"; then +if test x"${COMPILER_FOR_TARGET}" = x"\$(CC)"; then COMPILER_FOR_TARGET="$CC" fi saved_CC="$CC" -- 2.47.3