diff src/mkoctfile.in.cc @ 30368:15ae4d97a632 stable

mkoctfile: Correctly handle relocation in cross-compiler. * configure.ac: Add new makefile variable AMCOND_RELOCATE_ALL. * src/module.mk (mkoctfile CROSS): Optionally, set OCTAVE_REPLACE_PREFIX. * src/mkoctfile.in.cc (replace_prefix): Simplify code. Style fix.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 26 Nov 2021 22:08:49 +0100
parents b98ae05c6b7e
children 25ebd2cdf255 fc9b98382ea7
line wrap: on
line diff
--- a/src/mkoctfile.in.cc	Fri Nov 26 20:50:42 2021 +0100
+++ b/src/mkoctfile.in.cc	Fri Nov 26 22:08:49 2021 +0100
@@ -160,11 +160,11 @@
 {
 #if defined (OCTAVE_REPLACE_PREFIX)
   const std::string match = "${prefix}";
-  const std::string repl = prepend_octave_exec_home ("");
+  const std::string repl = Voctave_exec_home;
   std::size_t pos = s.find (match);
   while (pos != std::string::npos )
     {
-      s.replace(pos, match.length (), repl);
+      s.replace (pos, match.length (), repl);
       pos = s.find (match);
     }
 #endif