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: RFC automatic linkage of libquadmath with gfortran: PR driver/46516; libgfortran.spec, multilib search path


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.


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