einpoklum
einpoklum

Reputation: 132128

How can I check whether my (build) machine can run 32-bit executables?

I am building some application on Linux, using CMake. As part of my build process, I need to run a certain tool, for which I don't have the source - only a compiled 32-bit executable. My question: Is there a CMake-provided mechanism for checking whether that executable can be run on my machine?

More concretely, I have

$ file mytool
mytool: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.4, 
... with debug_info, not stripped

now, I can manually check, with CMake, whether /lib/ld-linux.so.2 exists; but I would rather avoid rewriting that wheel, if CMake already offers me something else.

Upvotes: 0

Views: 19

Answers (0)

Related Questions