From 30bb617f3f4cb1c4a704a5f20f54bce6baf54446 Mon Sep 17 00:00:00 2001 From: Nicholaus Clark Date: Thu, 20 Feb 2025 16:31:06 -0500 Subject: [PATCH] Escape spaces in rpath with quotes --- src/tools/gcc.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/gcc.lua b/src/tools/gcc.lua index 24dd3874c0..c4c91328ff 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