This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Quad-float support in Fortran
On Thu, 28 Oct 2010, FX wrote:
> > * should avoid a shared libquad dependency unless the program actually
> > uses the __float128 facilities.
>
> I don't know how to do that. Unless we use a compiler flag, the driver
> has no way of knowing whether the program uses __float128, does it?
The simplest way is using --as-needed (USE_LD_AS_NEEDED target macro and
associated configure tests). That depends on the program and the
libgfortran.a objects it references only referencing libquadmath symbols
if the functionality is needed. If there are difficulties with that (e.g.
for I/O) then use of weak symbols (as in the gthreads code) may be useful,
so that the functionality is available when libquadmath is linked in but
you can still link without it.
--
Joseph S. Myers
joseph@codesourcery.com