GetPrerequisites: Update output matching for newer 'file' versions
Detect PIE binaries with newer 'file' (5.22). It no longer prints "(uses shared libraries)" but does print "interpreter": # file 5.19 $ file /usr/bin/su /usr/bin/su: ... shared object, ..., dynamically linked (uses shared libs), ... # file 5.22 $ file /usr/bin/su /usr/bin/su: ... shared object, ..., dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, ...
This commit is contained in:
parent
d95d4c2c77
commit
fe558718b3
|
@ -260,6 +260,13 @@ function(is_file_executable file result_var)
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# "file" version 5.22 does not print "(used shared libraries)"
|
||||||
|
# but uses "interpreter"
|
||||||
|
if("${file_ov}" MATCHES "shared object.*interpreter")
|
||||||
|
set(${result_var} 1 PARENT_SCOPE)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "warning: No 'file' command, skipping execute_process...")
|
message(STATUS "warning: No 'file' command, skipping execute_process...")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue