diff --git a/src/tools/gcc.lua b/src/tools/gcc.lua index 24dd3874c..c4c91328f 100644 --- a/src/tools/gcc.lua +++ b/src/tools/gcc.lua @@ -427,8 +427,10 @@ for _, fullpath in ipairs(dirs) do local rpath = path.getrelative(cfg.buildtarget.directory, fullpath) if table.contains(os.getSystemTags(cfg.system), "darwin") then + rpath = p.quoted(rpath) -- quote in case of spaces in path rpath = "@loader_path/" .. rpath elseif (cfg.system == p.LINUX) then + rpath = p.quoted(rpath) -- quote in case of spaces in path rpath = iif(rpath == ".", "", "/" .. rpath) rpath = "$$ORIGIN" .. rpath end