[cmake-developers] [CMake 0016112]: "uname -p" is a very poor choice to evaluate the CMAKE_*SYSTEM_PROCESSOR and may even be wrong
Mantis Bug Tracker
mantis at public.kitware.com
Thu May 26 05:03:58 EDT 2016
The following issue has been SUBMITTED.
======================================================================
https://public.kitware.com/Bug/view.php?id=16112
======================================================================
Reported By: Gert Wollny
Assigned To:
======================================================================
Project: CMake
Issue ID: 16112
Category: CMake
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-05-26 05:03 EDT
Last Modified: 2016-05-26 05:03 EDT
======================================================================
Summary: "uname -p" is a very poor choice to evaluate the
CMAKE_*SYSTEM_PROCESSOR and may even be wrong
Description:
When running cmake in a i386 user space on top of an amd64 kernel the reported
processor type may be X86_64 instead of i386, as it so happens with DCMTK as
shown by the reproducible build effort:
https://tests.reproducible-builds.org/rb-pkg/testing/i386/dcmtk.html
In the case of DCMTK this is of no serious consequence, but other projects might
use this value for compile time decisions that could result in code that can not
actually be run on the selected target architecture.
Additional Information:
For a further discussion see also:
https://stackoverflow.com/questions/11944060/how-to-detect-target-architecture-using-cmake
There is also a link to code that might be used to estimate the host arch based
on try_compile.
best,
Gert
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-05-26 05:03 Gert Wollny New Issue
======================================================================
More information about the cmake-developers
mailing list