[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Building clang with gcc-toolchain@11
From: |
Ludovic Courtès |
Subject: |
Re: Building clang with gcc-toolchain@11 |
Date: |
Mon, 07 Mar 2022 11:18:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi,
Greg Hogan <code@greghogan.com> skribis:
> I'd like to instead use the latest gcc-toolchain (currently gcc-toolchain@11)
> and have clang-toolchain built with that gcc-toolchain. No matter what
> I offer in the "--with-c-toolchain" or "--with-input" options I always see
> the following error regarding '(assoc-ref %build-inputs "libc")' evaluating
> as false, even when specifying "--with-c-toolchain=clang=gcc-toolchain@10"
> that should currently be in use by default. Any ideas for fixing this?
The ‘clang’ definition reads:
;; Use a sane default include directory.
(string-append "-DC_INCLUDE_DIRS="
(assoc-ref %build-inputs "libc")
"/include")
What happens if we don’t pass that option, or if we pass
“-DC_INCLUDE_DIRS=/no-such-directory”?
It might work because C_INCLUDE_PATH already contains libc’s include
directory; that way, we’d no longer rely on the “libc” label, which is
what prevents use of ‘--with-c-toolchain’ here.
HTH,
Ludo’.
- Re: Building clang with gcc-toolchain@11,
Ludovic Courtès <=