On 2/8/24 18:16, Jason Merrill wrote:
Hmm. In stage 1, when we build with the system gcc, I'd think we want
the just-built gnat1 to find the system libgcc.
In stage 2, when we build with the stage 1 gcc, we want the just-built
gnat1 to find the stage 1 libgcc.
In neither case do we want it to find the libgcc from the current stage.
So it seems to me that what we want is for stage2+ LD_LIBRARY_PATH to
include the TARGET_LIB_PATH from the previous stage. Something like
the below, on top of the earlier patch.
Does this make sense? Does it work on Darwin?
Oops, that was broken, please consider this one instead:
Yes, this one makes sense (and the current code would not work since it
lacks the prev- prefix on TARGET_LIB_PATH).
Paolo