changeset 32281:6fa106924c19 stable

mkoctfile: Skip parsing for less flags (bug #64590). * src/mkoctfile.in.cc: Don't skip parsing of arguments that follow something that looks like a compiler option containing '='.
author Markus Mützel <markus.muetzel@gmx.de>
date Mon, 28 Aug 2023 11:44:31 +0200
parents 2e8b8d38431c
children d607947a6f2a dde186dc7b4c
files src/mkoctfile.in.cc
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/mkoctfile.in.cc	Sat Aug 26 13:25:10 2023 +0200
+++ b/src/mkoctfile.in.cc	Mon Aug 28 11:44:31 2023 +0200
@@ -943,9 +943,12 @@
         {
           // Pass through any unrecognized options.
           pass_on_options += (' ' + arg);
-          // Check for an additional argument following the option.
-          // However, don't check the final position which is typically a file
-          if (i < argc-2)
+          // If the current argument does not contain a '=' character, check
+          // for an additional argument following the option.
+          // However, don't copy the final position which is typically a file.
+          // FIXME: We might be copying flags that might need to be parsed
+          //        instead.  See bugs #52928 and #64590.
+          if (i < argc-2 && (arg.find ('=') == std::string::npos))
             {
               arg = argv[i+1];
               if (arg[0] != '-')