Hi.

My ‘downstream’ have a situation in which they make use of a directory outside 
of the configured GCC installation - and symlink from there to libraries in the 
actual install tree.

e.g.

/foo/bar/lib:
  libgfortran.dylib -> /gcc/install/path/lib/libgfortran.dylib

Now I want to find a way for them to add an embedded runpath that references 
/foo/bar/lib.

I could add a configure option, that does exactly this job - but then I’d have 
to back port that to every GCC version they are still supporting (not, perhaps, 
the end of the world but much better avoided).

So I was looking at using —with-specs= to add a link-time spec for this:

--with-specs='%{!nodefaultrpaths:%{!r:%:version-compare(>= 10.5 
mmacosx_version_min= -Wl,-rpath,/foo/bar/lib)}}}’

Which works, fine except for PCH jobs which it breaks because the presence of 
an option claimed by the linker causes a link job to be created, even though 
one is not required (similar issue have been seen before).

There is this:
 %{,S:X}  substitutes X, if processing a file which will use spec S.

so I could then do:

--with-specs=‘%{,???:%{!nodefaultrpaths:%{!r:%:version-compare(>= 10.5 
mmacosx_version_min= -Wl,-rpath,/foo/bar/lib)}}}}’

but, unfortunately, I cannot seem to figure out what ??? should be  [I tried 
‘l’ (link_spec) ‘link_command’ (*link_command)]

…JFTR also tried
  %{!.h:
   %{!,c-header:

——
any insight would be welcome, usually I muddle through with specs, but this one 
has me stumped.

thanks
Iain

Reply via email to