[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54239] [PATCH] gnu: Add cross-clang.
From: |
Julien Lepiller |
Subject: |
[bug#54239] [PATCH] gnu: Add cross-clang. |
Date: |
Thu, 3 Mar 2022 22:11:36 +0100 |
Le Thu, 03 Mar 2022 19:59:17 +0100,
Maxime Devos <maximedevos@telenet.be> a écrit :
> Julien Lepiller schreef op do 03-03-2022 om 19:35 [+0100]:
> > >
> > > Also, WDYT of making 'cross-clang' a memoising procedure, such
> > > that there's only one package object for a cross-clang of a fixed
> > > target system (and version)?
> >
> > I don't know how to do that. Are there some examples around?
>
> Search for 'cross-pkg-config' and 'standard-cross-packages'.
>
> Greetings,
> Maxime.
Thanks! I used mlambda, I think it should work :)
So I tried renaming clang to <target>-clang, but then I noticed the
build of libcxxabi fails:
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:21 (project):
The CMAKE_CXX_COMPILER:
clang++
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the
environment variable "CXX" or the CMake cache entry
CMAKE_CXX_COMPILER to the full path to the compiler, or to the
compiler name if it is in the PATH.
This is because it really expects clang, not <target>-clang. The
autotools might be smarter (haven't tested), but they're the only one.
I don't want to substitute* every CMakeList.txt to make sure they
understand what we're the only ones to do.
Furthermore, clang is already a cross-compiler, and cross-clang only
makes it work in the context of guix packaging and changes the default
target for convenience. Outside of a guix package, although not very
convenient, our clang package already works like everyone else's I
think. I don't think it makes sense to have clang AND i586-gnu-clang in
your profile. Also, cross-clang just like cross-gcc is not accessible
from the CLI.
WDYT?