summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-12-29 22:54:17 +0800
committerruki <[email protected]>2022-12-29 22:54:17 +0800
commit46a6064fcc6edb0c792315a8a7f62cf2b5f5dff8 (patch)
tree542500b71c68a5bfc0d952361b26178631b6467e
parenteb26aaa8a8be3ba533f323d90438823fe6c89ef1 (diff)
update configure
-rwxr-xr-xconfigure14
1 files changed, 9 insertions, 5 deletions
diff --git a/configure b/configure
index d83e3d354..2b692d54e 100755
--- a/configure
+++ b/configure
@@ -778,13 +778,17 @@ _get_abstract_flag_for_gcc_clang() {
frameworks) flag="-framework ${value}";;
frameworkdirs) flag="-F${value}";;
rpathdirs)
- if test_eq "${toolname}" "gcc" || test_eq "${toolname}" "gxx"; then
- # escape $ORIGIN in makefile, TODO we need also handle it for ninja
- string_replace "${value}" "@loader_path" '$$ORIGIN'; value="${_ret}"
- flag="-Wl,-rpath='${value}'"
- elif test_eq "${toolname}" "clang" || test_eq "${toolname}" "clangxx"; then
+ if is_plat "macosx"; then
string_replace "${value}" "\$ORIGIN" "@loader_path"; value="${_ret}"
flag="-Xlinker -rpath -Xlinker ${value}"
+ else
+ # escape $ORIGIN in makefile, TODO we need also handle it for ninja
+ string_replace "${value}" "@loader_path" '$$ORIGIN'; value="${_ret}"
+ if is_plat "bsd"; then
+ flag="-Wl,-zorigin -Wl,-rpath='${value}'"
+ else
+ flag="-Wl,-rpath='${value}'"
+ fi
fi
;;
symbols)