https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91879

--- Comment #23 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to jos...@codesourcery.com from comment #22)
> On Thu, 3 Oct 2019, stsp at users dot sourceforge.net wrote:
> And overriding like that is fundamentally unsafe, because in general in a 
> multi-stage build (such as for a cross to GNU/Linux where the first stage 
> is a static-only C-only compiler) the libraries have to be built with the 
> more-fully-featured compiler built in the same stage - not with the 
> previous stage's compiler.

But isn't there always a possibility to add
one more stage? Say, in the example above where
at stage1 we only have a static-only compiler,
we could add stage2 and stage3. stage2 is a fully-featured
compiler to build stage3. I think this approach
will always work, just use N+1 stages.

> Then maybe an option is needed to find both headers and libraries in the 
> non-sysroot case (where the option for libraries gives the top-level 
> directory under which subdirectories for each multilib, using the multilib 
> OS suffix, can be found).  An option to find the build-time equivalent of 
> $exec_prefix/$target, with lib and include subdirectories, say.

And then why such an option is not called --with-build-sysroot?
In comment #11 you say
"there is no non-sysroot-headers equivalent of --with-build-sysroot",
but I don't understand what do you mean. Can we use --with-build-sysroot
w/o --with-sysroot, making it exactly an option you describe
above?

> The build system design is that where A and B are both built at the same 
> time, and the build of B uses A, it should use the *newly built* copy of A

Lets do A --> B' --> B then. :)

> "make all-target-libstdc++-v3" or whatever).  In general, if you don't 
> want to build with the newly built copy of A you should configure and 
> build in such a way that there isn't a newly built copy of A at all.

Mm, yes, I was thinking about renaming the dirs
during build to hide stuff from configure, but
decided against doing so as being too hackish.
Would you suggest this way for the wide adoption?

Reply via email to