DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.59k stars 554 forks source link

Incorrect decision-making about 32/64-bit arm #5204

Open benjaminmordaunt opened 2 years ago

benjaminmordaunt commented 2 years ago

CMAKE_SYSTEM_PROCESSOR sometimes reports "arm64" (or similar e.g. "arm64-v8a") instead of "aarch64" as you are expecting here. For example, this happens for GCC on macOS. This results in CMake incorrectly trying to build for 32-bit arm, flagging "-mthumb" as a nonsense flag on those systems.

https://github.com/DynamoRIO/dynamorio/blob/a7737a1aaa86348bcff14e1846275fcbb0810abd/CMakeLists.txt#L214

benjaminmordaunt commented 2 years ago

See https://gitlab.kitware.com/-/snippets/2643 for a better example of target selection.

derekbruening commented 2 years ago

We would be happy to look at a pull request generalizing the check