This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, v3] Potential solution to librt issue.


On Thu, Jul 24, 2008 at 11:58 AM, Paolo Carlini
<paolo.carlini@oracle.com> wrote:
> Hi,
>
>> Thanks, everyone, for pitching in to get this fixed before we
>> entrenched the problem.
>
> Yes. I think we are very close to a solution for now good enough.
>
> I'm only still a bit nervous with the inlining (as I was a few days ago in another context): it implies including sometimes <sys/time.h> (hopefully not very often). It implies "unuglified" names like clock_gettime in the header. It implies system-level calls inside the header. I'm still wondering if we could somehow have a mechanism working *inside* the .so, like having clock_gettime considered weak (Martin ;) inside the .so, and then the linking of librt triggering at the end of the linking process if the symbol is actually referenced somewhere in the user code and remained undefined. Is that vague idea clear, does it make sense (I'm asking the experts)?
>

If you don't want to link libstdc++.so with librt.so, you break
libstdc++.so into shared and
non-shared (see libc.so on Linux). You can put clock_gettime in
libstdc++_nonshared.a.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]