tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Linking libc into shared libarries (was: CVS commit: src/share/mk)



In article <200804271021.58190.nick.hudson%dsl.pipex.com@localhost>,
Nick Hudson  <nick.hudson%dsl.pipex.com@localhost> wrote:
>-=-=-=-=-=-
>
>On Sunday 27 April 2008 08:43:35 matthew green wrote:
>>    | Hi Christos,
>>    |
>>    | Thank you for linking libc into shared libraries.
>>    | There were some further changes to exclude the gcc libraries, but
>>    | I took this mail to reply to because that was the start.
>>    |
>>    | Hmmm, what about other shared libaries which doesn't use the bsd make,
>>    | e.g. gmake or a bsd make which doesn't use the /usr/share/mk rules?
>>    | Shouldn't they be also linked against libc?
>>    |
>>    | Can this be done in the linker itself and how do other OS handle this?
>>
>>    I don't know how other OS's handle this. I will look.
>>
>>
>> not in the linker..but see what other systems do with "gcc -shared"?
>
>Something like the attached (untested)?
>
>Nick
>(-posix/-pthread with -p or -pg and -shared looks wrong to me)
>
>-=-=-=-=-=-
>
>Index: gnu/dist/gcc4/gcc/config/netbsd.h
>===================================================================
>RCS file: /cvsroot/src/gnu/dist/gcc4/gcc/config/netbsd.h,v
>retrieving revision 1.5
>diff -u -p -u -r1.5 netbsd.h
>--- gnu/dist/gcc4/gcc/config/netbsd.h  13 May 2006 01:48:14 -0000      1.5
>+++ gnu/dist/gcc4/gcc/config/netbsd.h  27 Apr 2008 09:20:09 -0000
>@@ -116,6 +116,7 @@ Boston, MA 02110-1301, USA.  */
>        %{!pg:-lposix}}                \
>      %{p:-lposix_p}           \
>      %{pg:-lposix_p}}         \
>+   %{shared: -lc}             \
>    %{!shared:                 \
>      %{!symbolic:             \
>        %{!p:                  \
>@@ -129,6 +130,7 @@ Boston, MA 02110-1301, USA.  */
>        %{!pg:-lposix}}                \
>      %{p:-lposix_p}           \
>      %{pg:-lposix_p}}         \
>+   %{shared: -lc}             \
>    %{!shared:                 \
>      %{!symbolic:             \
>        %{!p:                  \

This looks right to me. Are you going to test it or should I?

christos



Home | Main Index | Thread Index | Old Index