Re: libstdc++ search path while building GCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Jonathan Wakely <jwakely.gcc@xxxxxxxxx> skribis:

> On Wed, 22 Jul 2020 at 21:39, Ludovic Courtès <ludovic.courtes@xxxxxxxx> wrote:
>>
>> Hello,
>>
>> While building GCC on a non-FHS distro, we do something like¹:
>>
>>   export CPLUS_INCLUDE_PATH=/path/to/host/gcc/include/c++:/path/to/host/gcc/include
>
> That looks wrong. Why are you doing this? Doesn't your host GCC
> already know where its headers are?

It does.  With Guix, CPLUS_INCLUDE_PATH is automatically populated with
all the include/ and include/c++/ directories of dependencies, which
includes GCC’s own libstdc++.  We could override that, but I’m trying to
understand what’s going on.

>> This ensures the host GCC’s C++ headers are found by ‘xgcc’ during
>> build.
>
> Why do you want that to happen?
>
> It's wrong in general, but it's specifically wrong in your case
> because the host compiler is a different version to the one you're
> trying to build. There is absolutely no guarantee that GCC 10.1 can
> compile the libstdc++ headers from GCC 7.5, and trying to do so is not
> supported.

Is it wrong?  I’m talking about the first time where
‘libstdc++-v3/configure’ runs, which itself checks for C++ features.
It’s checking for C++ features of the host compiler/C++ library, isn’t it?

Thanks for your feedback!

Ludo’.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux