From fc7b2f781c4beed99ee7dd3bb18254bfc87deba7 Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Wed, 9 Aug 2017 16:05:19 -0400 Subject: [PATCH] Bug 519529 - fix handling of quotes in the GCCToolChain scanner info. Some Arduino boards have properties that feed into defines that have spaces in them. The boards.txt property file adds quotes around those things. When resolving the recipe property it results in -D gcc options that have embedded spaces in them. That messes up the ProcessBuilder and the command fails. We'll just strip the quotes from all the command args since they aren't needed in this scenario anyway. Change-Id: I41086ee264b8715823b3eab7931df4371b9ec873 --- .../org/eclipse/cdt/build/gcc/core/GCCToolChain.java | 10 ++++++++++ .../.settings/.api_filters | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.core/.settings/.api_filters diff --git a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java index 60de2f5d9ec..51373ff7d84 100644 --- a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java +++ b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java @@ -183,6 +183,16 @@ public class GCCToolChain extends PlatformObject implements IToolChain { addDiscoveryOptions(commandLine); commandLine.addAll(commandStrings.subList(1, commandStrings.size())); + // Strip quotes from the args on Windows + if (Platform.OS_WIN32.equals(Platform.getOS())) { + for (int i = 0; i < commandLine.size(); i++) { + String arg = commandLine.get(i); + if (arg.contains("\"")) { //$NON-NLS-1$ + commandLine.set(i, arg.replaceAll("\"", "")); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + } + // Change output to stdout boolean haveOut = false; for (int i = 0; i < commandLine.size() - 1; ++i) { diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/.settings/.api_filters b/jtag/org.eclipse.cdt.debug.gdbjtag.core/.settings/.api_filters deleted file mode 100644 index 697d2241993..00000000000 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/.settings/.api_filters +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - -