浏览代码

GetPrerequisites: Ignore relative paths printed by ldd

On x86 Linux, the ldd output for its vDSO (linux-gate.so.1) is a bit
different from other Linux with standard vDSO name (linux-vdso.so.1).

    $ ldd /bin/ls
    linux-gate.so.1 => linux-gate.so.1 (0xf7f5e000)
    libcap.so.2 => /usr/lib32/libcap.so.2 (0xf7f22000)
    libc.so.6 => /usr/lib32/libc.so.6 (0xf7cfb000)
    /lib/ld-linux.so.2 => /usr/lib32/ld-linux.so.2 (0xf7f60000)

This fixes the `Tests/BundleUtilities` test on x86 Linux.
Đoàn Trần Công Danh 2 年之前
父节点
当前提交
cf2ad9995a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Modules/GetPrerequisites.cmake

+ 1 - 1
Modules/GetPrerequisites.cmake

@@ -730,7 +730,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
 
   if(gp_tool MATCHES "ldd$")
     set(gp_cmd_args "")
-    set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+([^\t\(]+)( \(.+\))?${eol_char}$")
+    set(gp_regex "^[\t ]*[^\t ]+ =>[\t ]+(/[^\t\(]+)( \(.+\))?${eol_char}$")
     set(gp_regex_error "not found${eol_char}$")
     set(gp_regex_fallback "^[\t ]*([^\t ]+) => ([^\t ]+).*${eol_char}$")
     set(gp_regex_cmp_count 1)