<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You probably want what SFE does and OpenCSW and a few others<br>
builing ontop of a OS-distro. That is: Make the runtime loaded<br>
from the private directory.<br>
<br>
Snipped from SFE patch gcc-05-LINK_LIBGCC_SPEC-49.diff<br>
gcc/config/sol2.h<br></blockquote><div><br></div><div>Thanks for your input !<br></div><div>I did try patching this way but it could not work out of the box for 5.3 and I then followed what was done for gcc-3.<br></div><div>Also there is an autotools option to specify using gcc with runtime libs for the specific version but reports say that it is broken for some architecture since about 2011.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
+#undef LINK_LIBGCC_SPEC<br>
+#define LINK_LIBGCC_SPEC "%{m64:" "-R /usr/gcc/4.8/lib/ÄRCH64_SUBDIR":/usr/gcc/lib/ÄRCH64_SUBDIR" %D" "}%{!m64:" "-R /usr/gcc/4.8/lib:/usr/gcc/lib %D" "}"<br>
<br>
Described in very much detail (be strong when reading) some time ago,<br>
but still valid: <a href="http://tom.blog.in-ulm.de/GNU_gcc_spec_file" rel="noreferrer" target="_blank">http://tom.blog.in-ulm.de/GNU_gcc_spec_file</a><br>
and <a href="http://tom.blog.in-ulm.de/gcc_cookbook_for_a_distribution" rel="noreferrer" target="_blank">http://tom.blog.in-ulm.de/gcc_cookbook_for_a_distribution</a><br>
<br>
What is to avoid is: Really don't specify in the software which<br>
is to be compiled:<br>
"-L/usr/lib" or "-L/lib", "-R/usr/lib" and "-R/lib"<br>
<br>
So you might have rare occurence of a F/OSS build system that<br>
is so stupid to specify the _default_ searchpath of /usr/lib:/lib.<br>
The runtime linker does search these directories in any case as last<br>
resort (-L|-R as written in RPATH comes first!), so there is never<br>
a need for specifying this (on Solaris).<br>
<br>
As this might still lead to finding gcc-runtime in /usr/lib before the<br>
really wanted runtime from the correct gcc version is found in the<br>
private directory.<br>
<br>
So, SFE is really happy since years with the private gcc runtime,<br>
that means a distro should be safe a well, if the distro:<br>
- either compiles all with static gcc runtime<br>
or<br>
- keeps /usr/lib clean of libgcc_s.so and libstdc++.so.6 and<br>
run a compiler which searches _for_the_gcc_runtime first in<br>
the private directory, for instance /usr/gcc/5.3/lib/<libgcc_s.so|libstdc++.so.6><br>
<br>
<br>
So the newer gcc versions removed LINK_LIBGCC_SPEC because they thought with<br>
"unwind" they would have solved that runtime problem. They didn't. So I patched<br>
back in the LINK_LIBGCC_SPEC defines for SFE in the more recent gcc versions.<br>
OI should as well use this define and not *ARCH32* and such.<br>
<br>
Regards,<br>
Thomas<br>
<br>
<br>
<br>
On Thu, May 12, 2016 at 01:40:52PM +0300, Alexander Pyhalov wrote:<br>
<span class="">> On 05/12/2016 00:01, Aurélien Larcher wrote:<br>
> > I thought that -Y and -R that I added to the arch spec would take care of<br>
> > that. Is -L also needed ?<br>
> ><br>
><br>
> Seems so. Adding -L makes things better.<br>
><br>
><br>
><br>
><br>
> --<br>
> Best regards,<br>
> Alexander Pyhalov,<br>
> system administrator of Southern Federal University IT department<br>
<br>
</span>> --- ./gcc/config/sol2.h.orig 2016-05-08 21:13:10.810423614 +0200<br>
> +++ ./gcc/config/sol2.h 2016-05-08 21:16:55.681535743 +0200<br>
> @@ -195,8 +195,8 @@<br>
> "%{G:-G} \<br>
> %{YP,*} \<br>
> %{R*} \<br>
> - %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp%R/lib:%R/usr/lib} \<br>
> - %{!p:%{!pg:-Y P,%R/lib:%R/usr/lib}}}"<br>
> + %{!YP,*:%{p|pg:-Y P,%R/usr/gcc/5.3/lib:%R/lib:%R/usr/lib -R %R/usr/gcc/5.3/lib -L %R/usr/gcc/5.3/lib} \<br>
> + %{!p:%{!pg:-Y P,%R/usr/gcc/5.3/lib:%R/lib:%R/usr/lib -R %R/usr/gcc/5.3/lib -L %R/usr/gcc/5.3/lib}}}"<br>
><br>
> #undef LINK_ARCH32_SPEC<br>
> #define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE<br>
> @@ -208,8 +208,8 @@<br>
> "%{G:-G} \<br>
> %{YP,*} \<br>
> %{R*} \<br>
> - %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \<br>
> - %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"<br>
> + %{!YP,*:%{p|pg:-Y P,%R/usr/gcc/5.3/lib/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR " -R %R/usr/gcc/5.3/lib/" ARCH64_SUBDIR " -L %R/usr/gcc/5.3/lib/" ARCH64_SUBDIR "} \<br>
> + %{!p:%{!pg:-Y P,%R/usr/gcc/5.3/lib/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR " -R %R/usr/gcc/5.3/lib/" ARCH64_SUBDIR " -L %R/usr/gcc/5.3/lib/" ARCH64_SUBDIR "}}}"<br>
><br>
> #undef LINK_ARCH64_SPEC<br>
> #ifndef USE_GLD<br>
<span class="im HOEnZb"><br>
> _______________________________________________<br>
> oi-dev mailing list<br>
> <a href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a><br>
> <a href="http://openindiana.org/mailman/listinfo/oi-dev" rel="noreferrer" target="_blank">http://openindiana.org/mailman/listinfo/oi-dev</a><br>
<br>
</span><span class="HOEnZb"><font color="#888888">--<br>
--<br>
Thomas Wagner<br>
<br>
------------------------------------------------------------------------<br>
Service rund um UNIX(TM), Wagner Network Services, Thomas Wagner<br>
Solaris(TM), Linux(TM) Eschenweg 21, 89174 Altheim, Germany<br>
Novell(TM), Windows(TM) TEL: <a href="tel:%2B49-731-9807799" value="+497319807799">+49-731-9807799</a>, FAX: <a href="tel:%2B49-731-9807711" value="+497319807711">+49-731-9807711</a><br>
Telekommunikation, LAN, MOBILE/CELL: <a href="tel:%2B49-171-6135989" value="+491716135989">+49-171-6135989</a><br>
Internet-Service, Elektronik EMAIL: <a href="mailto:wagner@wagner-net.com">wagner@wagner-net.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
oi-dev mailing list<br>
<a href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a><br>
<a href="http://openindiana.org/mailman/listinfo/oi-dev" rel="noreferrer" target="_blank">http://openindiana.org/mailman/listinfo/oi-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font style="font-family:courier new,monospace" size="1">---<br>Praise the Caffeine embeddings<br></font></div></div></div></div>
</div></div>