소스 검색

fix rpath

ruki 2 년 전
부모
커밋
4e1172b4fd
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      configure

+ 4 - 4
configure

@@ -778,7 +778,10 @@ _get_abstract_flag_for_gcc_clang() {
         frameworks) flag="-framework ${value}";;
         frameworks) flag="-framework ${value}";;
         frameworkdirs) flag="-F${value}";;
         frameworkdirs) flag="-F${value}";;
         rpathdirs)
         rpathdirs)
-            if test_eq "${toolname}" "gcc" || test_eq "${toolname}" "gxx"; 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
                 # escape $ORIGIN in makefile, TODO we need also handle it for ninja
                 string_replace "${value}" "@loader_path" '$$ORIGIN'; value="${_ret}"
                 string_replace "${value}" "@loader_path" '$$ORIGIN'; value="${_ret}"
                 if is_plat "bsd"; then
                 if is_plat "bsd"; then
@@ -786,9 +789,6 @@ _get_abstract_flag_for_gcc_clang() {
                 else
                 else
                     flag="-Wl,-rpath='${value}'"
                     flag="-Wl,-rpath='${value}'"
                 fi
                 fi
-            elif test_eq "${toolname}" "clang" || test_eq "${toolname}" "clangxx"; then
-                string_replace "${value}" "\$ORIGIN" "@loader_path"; value="${_ret}"
-                flag="-Xlinker -rpath -Xlinker ${value}"
             fi
             fi
             ;;
             ;;
         symbols)
         symbols)