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: [fortran,patch] BLAS-enabled matmul


On Apr 4, 2006, at 12:36 AM, FX Coudert wrote:
All in all, I'm most favorable to Brooks' suggestion that we have libgfortran_blas and libgfortran_external_blas, i.e. an additional function call.

I think one can do:


gnuc_my_blas = real_blas_name

and then have:

call gnuc_my_blas

and have it go directly to real_blas_name

on some assemblers (GNU as for example), if you want to optimize the common case and eliminate the call/return overhead completely for libgfortran_external_blas. I think this is non-portable, so you might have to autoconf for it.

The only thing that I don't yet see clearly how to resolve is we can avoid the user supplying the -fblas="-lblas" extra argument, and simply link in its blas library by "-lblas".

I'm not sure I followed that exactly, but, if you want to add a linker option on the basis of a flag to the compiler:


%{fprofile-arcs|fprofile-generate|coverage|fcreate-profile:-lgcov}

is one such example (target from gcc.c).

You can also do the inverse:

%{!nostdlib:%(link_gcc_math)}

So, something like:

%{fblas:-lblas}

though, if you want to have configure figure out the library name and pass it to the building of the file that has this spec, it'd just be a little more work.


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