[Pkg-cmake-team] Bug#1110961: debhelper: Consider setting CMAKE_SYSTEM_PROCESSOR even when not cross-compiling
Niels Thykier
niels at thykier.net
Sun Aug 24 08:50:07 BST 2025
Control: tags -1 moreinfo help
Colin Watson:
> Package: debhelper
> Version: 13.24.2
> Severity: wishlist
>
> In https://bugs.debian.org/1103589, I noticed that the upstream
> CMakeLists.txt was misdetecting the intended host architecture as arm64
> due to `CMAKE_SYSTEM_PROCESSOR MATCHES
> "^(aarch64|arm64|armv[89].?|ARM64)$"`. debhelper's cmake buildsystem
> sets CMAKE_SYSTEM_PROCESSOR when cross-compiling to armhf, but when not
> cross-compiling it allows cmake to use its default. According to
> https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html
> that falls back to CMAKE_HOST_SYSTEM_PROCESSOR, which is just the output
> of `uname -m` when building on Linux.
>
> For CMAKE_SYSTEM_NAME it doesn't matter since the autodetection is
> pretty likely to be correct, but it's fairly well-known that `uname -m`
> is an inappropriate thing to use when configuring package builds.
> Should debhelper perhaps pass -DCMAKE_SYSTEM_PROCESSOR also in the
> non-cross-compiling case?
>
> Thanks,
>
Hi Colin,
Thanks for the suggestion and for the follow up clarifying that more
might be needed.
Sadly, I am not an expert on this matter, so all I can do for now is tag
the bug `moreinfo help`. I have CC'ed the CMake team in case they can
help with this. For the CMake team, there is more context in
https://bugs.debian.org/1110961#10 not quoted here.
Best regards,
Niels
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-cmake-team/attachments/20250824/53e2df5e/attachment.sig>
More information about the Pkg-cmake-team
mailing list