summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/gcc.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index ba4723d86..5817b0269 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -288,6 +288,7 @@ function nf_rpathdir(self, dir)
return maps[name]
end))}
if self:is_plat("bsd") then
+ -- FreeBSD ld must have "-zorigin" with "-rpath". Otherwise, $ORIGIN is not translated and it is literal.
table.insert(flags, 1, "-Wl,-zorigin")
end
return flags