diff src/mkoctfile.in.cc @ 28129:16ccaebe250a stable

mkoctfile: quote linker arguments that may contain spaces (bug #57878) * mkoctfile.in.cc (main): Quote linker arguments and options starting with '-L', '-R', or '-Wl' if they contain file or directory names with spaces.
author Mike Miller <mtmiller@octave.org>
date Fri, 21 Feb 2020 18:25:05 -0800
parents cf59b503db2a
children 7818c5b07403 27df9b38391d
line wrap: on
line diff
--- a/src/mkoctfile.in.cc	Fri Feb 21 14:07:14 2020 -0800
+++ b/src/mkoctfile.in.cc	Fri Feb 21 18:25:05 2020 -0800
@@ -740,7 +740,7 @@
       else if (starts_with (arg, "-Wl,") || starts_with (arg, "-l")
                || starts_with (arg, "-L") || starts_with (arg, "-R"))
         {
-          ldflags += (' ' + arg);
+          ldflags += (' ' + quote_path (arg));
         }
 #if ! defined (OCTAVE_USE_WINDOWS_API)
       else if (arg == "-pthread")