Hi,

Greg Hogan <c...@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’.

Reply via email to