Summary: | dev-utils/cmake - Cross-compile fixes | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | James Le Cuirot <chewi> |
Component: | Current packages | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | PATCH |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 503216 | ||
Bug Blocks: | |||
Attachments: |
cross-cmake-ebuild.patch
cmake-2.8.12.2-no-cross-docs.patch cross-cmake-ebuild.patch Patch against cmake-3.18.0.ebuild |
Description
James Le Cuirot
2014-03-02 16:21:25 UTC
Created attachment 371570 [details, diff]
cmake-2.8.12.2-no-cross-docs.patch
Comment on attachment 371568 [details, diff] cross-cmake-ebuild.patch >+ if use arm || use ppc ; then >+ mycmakeargs+=(-DKWSYS_CHAR_IS_SIGNED=0) >+ else >+ mycmakeargs+=(-DKWSYS_CHAR_IS_SIGNED=1) >+ fi hardcoding char behavior doesn't belong in here, not to mention this logic is horribly broken. for gcc, you need to query the compiler directly (in conjunction with $CFLAGS and such) and see if __CHAR_UNSIGNED__ is defined. Okay, didn't know there was such a macro, I'll definitely use that instead. Maybe a toolchain-funcs helper would be appropriate here but are you saying that we shouldn't set KWSYS_CHAR_IS_SIGNED at all? Created attachment 373934 [details, diff]
cross-cmake-ebuild.patch
Assuming that's not what you meant, here's a better attempt that adds a tc-has-unsigned-char function to toolchain-funcs.
We can't do anything unless the toolchain-funcs.eclass patch is applied. Also, it would be nice to send the no-cross-docs patch upstream. What's the current status here? Created attachment 650248 [details, diff]
Patch against cmake-3.18.0.ebuild
Things have obviously moved on a bit since. Luckily it's an easier fix now but still along the same lines.
Bootstrapping appears to be conditional now, I don't think it was back then. has_version should check against BROOT, hence I've added the -b flag.
I was able to successfully cross-compile for m68k, with and without bootstrapping.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=222acbcb270567379e34ebfdec3c0b5e6534628d commit 222acbcb270567379e34ebfdec3c0b5e6534628d Author: James Le Cuirot <chewi@gentoo.org> AuthorDate: 2020-07-22 22:24:17 +0000 Commit: James Le Cuirot <chewi@gentoo.org> CommitDate: 2020-08-23 17:10:42 +0000 dev-util/cmake: Fix cross-compiling in 3.18.1 Closes: https://bugs.gentoo.org/503218 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: James Le Cuirot <chewi@gentoo.org> dev-util/cmake/cmake-3.18.1.ebuild | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) |