Closed kencu closed 2 years ago
'tis tricky - the reason that I put it first is that the usual reasoning is
"the user added this on purpose, so we should look there first"
That means that the path will override the compiler defaults - which allows newer libraries in the --with-darwin-add-path
to take precedence.
Of course, the converse argument is equally valid (i.e. the compiler was tested with the libraries installed with it, so do not disturb).
I went for the first - it seems probably more flexible for your use-cases (since you specifically intend to make use of the most recent version of each named lib)
NOTE: AFAIR -rpath /some/place/else
will precede any of the defaults - so there should be a 'get out of jail' mechanism if something fails - but we can adjust this if needed.
It's a very easy thing to change the ordering - but one has to make some choice :)
I probably should rename the option to something like --with-darwin-additional-rpath=
before anyone uses it in anger (open to more succinct alternatives)
--with-darwin-extra-runpath ? --with-darwin-extra-rpath ?
IMO - either of these sound quite clear to me. Of course the bikeshed can be many colours
--with-darwin-additional-rpath= --with-darwin-extra-rpath=
going with --with-darwin-extra-rpath=
shorter is usually better, so long as the meaning is clear.
This is in 12.1r1 and 11.3.r2 (and will be in 10.4r0 I hope).
using gcc-11-3-darwin-pre-r2 the extra rpath search directory is added and all looks great from here.
I just thought I'd ask about the optimal order for those rpath search directories. What do you think people would expect?
I wonder if libraries at @loader_path should be first in the search -- would people expect that adjacent libraries would be the ones found first and used?