GNU bug report logs - #54239
[PATCH] gnu: Add cross-clang.

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Thu, 3 Mar 2022 16:04:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Julien Lepiller <julien <at> lepiller.eu>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 54239 <at> debbugs.gnu.org
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 <at> 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?




This bug report was last modified 2 years and 330 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.