[PATCH] Update support patch for ACML vectorized intrinsic library
Richard Guenther
rguenther@suse.de
Fri Aug 24 11:03:00 GMT 2007
On Tue, 21 Aug 2007, Richard Guenther wrote:
> On Mon, 20 Aug 2007, Uros Bizjak wrote:
>
> > Hello!
> >
> > > This is about the best thing we can do at the moment without introducing
> > > libgcc-math, so I'd like to go ahead with this for 4.3 at least.
> > >
> > > Any opinion on whether we automatically should link acml_mv?
> >
> > What about having to specify full library name to -mveclib= ? This name can be
> > processed by appropriate _SPEC define to automatically link specified library.
> > The benefit of specifying a full name would be to distinguish between i.e.
> > acml_mv and (possible) acml_mv2.
>
> Uh, I don't like giving full paths to an option. If acml_mv will become
> acml_mv2 it probably changes the ABI so we would need adjustments to the
> code anyway, so I don't expect this to happen.
>
> We should be able to process -mveclib=acml in the specs processing as well
> and just add -lacml_mv - the question was mainly whether we should do that
> (given that gfortran doesn't do it for -fexternal-blas).
So, the following extra hunk for the patch automatically links the
library.
Is the patch ok for mainline?
Thanks,
Richard.
* config/i386/linux64.h (LIB_SPEC): Copy from config/linux.h.
Link with libacml_mv as needed, if building with -mveclib=acml.
Index: config/i386/linux64.h
===================================================================
*** config/i386/linux64.h.orig 2007-08-20 13:44:10.000000000 +0200
--- config/i386/linux64.h 2007-08-24 12:48:44.000000000 +0200
*************** along with GCC; see the file COPYING3.
*** 74,79 ****
--- 74,86 ----
%{" SPEC_64 ":%{!dynamic-linker:-dynamic-linker "
LINUX_DYNAMIC_LINKER64 "}}} \
%{static:-static}}"
+ #undef LIB_SPEC
+ #define LIB_SPEC\
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}} \
+ %{mveclib=acml:--as-needed -lacml_mv --no-as-needed}"
+
/* Similar to standard Linux, but adding -ffast-math support. */
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
More information about the Gcc-patches
mailing list