This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC automatic linkage of libquadmath with gfortran: PR driver/46516; libgfortran.spec, multilib search path
- From: Michael Matz <matz at suse dot de>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>, gfortran <fortran at gcc dot gnu dot org>
- Date: Sat, 20 Nov 2010 19:43:19 +0100 (CET)
- Subject: Re: RFC automatic linkage of libquadmath with gfortran: PR driver/46516; libgfortran.spec, multilib search path
- References: <4CE80CA9.9050205@net-b.de>
Hi,
On Sat, 20 Nov 2010, Tobias Burnus wrote:
> d) Michael suggested to add a FE hook to the link command spec, i.e. in
> fortran/lang-specs.h
> #define LANG_LINK_LIBS "%:include(libgfortran.spec)%lib_gfortran)"
> and then use it in gcc.c's LINK_COMMAND_SPEC. However, a straight-forward
> approach does not work as this would apply to all front ends.
Oh right. I didn't consider that the lang-specs.h files are all included
together, and not just for the lang-specific driver :-/
There's currently one language specific hook coming right before linking
that you might be able to use: lang_specific_pre_link(). It might work if
you just do 'do_spec ("%:include(libgfortran.spec)")' in there (with the
current contents of libgfortran.spec, i.e. replacing '*lib:') in case
libgfortran.spec wasn't found in one of the -L paths in
lang_specific_driver() function (that is, you'll have to remember state
from lang_specific_driver to lang_specific_pre_link).
Ciao,
Michael.