[binutils-gdb] binutils/GCC: Quote ${COMPILER_FOR_TARGET}
H.J. Lu
hjl@sourceware.org
Thu Oct 2 01:07:16 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aef88b83384976e96a8fb287a001588a2277ecd5
commit aef88b83384976e96a8fb287a001588a2277ecd5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Thu Oct 2 08:53:45 2025 +0800
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 <hjl.tools@gmail.com>
Diff:
---
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"
More information about the Binutils-cvs
mailing list