[6/N,v2,x86_64] Vectorized math functions

Message ID CAMXFM3sC3ft+LGWMOX+9hk_ig_jFNdefHxdoW4vkJ+OQc4L91w@mail.gmail.com
State Superseded
Headers

Commit Message

Andrew Senkevich Dec. 2, 2014, 4:50 p.m. UTC
  Patch adds installation of libm.so as linker script (only in case of
libmvec.so build).

2014-12-02  Andrew Senkevich  <andrew.n.senkevich@gmail.com>

        * math/Makefile: Added rule for libm.so installation.

  test-misc test-fpucw test-fpucw-ieee tst-definitions test-tgmath \




--
WBR,
Andrew
  

Comments

Joseph Myers Dec. 3, 2014, 6:05 p.m. UTC | #1
On Tue, 2 Dec 2014, Andrew Senkevich wrote:

> +ifeq ($(build-mathvec),yes)
> +# We need to install libm.so as linker script
> +# for more comfortable use of vector math library.
> +install-lib-ldscripts := libm.so
> +libmvec-so-ver = libmvec.so$(libmvec.so-version)
> +install_subdir: $(inst_libdir)/libm.so
> +$(inst_libdir)/libm.so: $(common-objpfx)format.lds $(libm) \
> +			$(common-objpfx)mathvec/$(libmvec-so-ver) \
> +			$(+force)
> +	(echo '/* GNU ld script'; echo '*/';\
> +	cat $<; \
> +	echo 'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \
> +	'AS_NEEDED ( $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \

Watch indentation.  Commands inside () should be indented one space after 
the initial TAB so they all line up; the 'AS_NEEDED...' argument to echo 
should be indented to line up with the 'GROUP...' argument.

I think patches 5 and 6 in the series should be combined (that is, 
building and installing the library should be in the same patch).
  

Patch

diff --git a/math/Makefile b/math/Makefile
index fbd2ded..a77687e 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -86,6 +86,22 @@  generated += $(foreach s,.c .S l.c l.S f.c
f.S,$(calls:s_%=m_%$s))
 routines = $(calls) $(calls:=f) $(long-c-$(long-double-fcts))
 long-c-yes = $(calls:=l)

+ifeq ($(build-mathvec),yes)
+# We need to install libm.so as linker script
+# for more comfortable use of vector math library.
+install-lib-ldscripts := libm.so
+libmvec-so-ver = libmvec.so$(libmvec.so-version)
+install_subdir: $(inst_libdir)/libm.so
+$(inst_libdir)/libm.so: $(common-objpfx)format.lds $(libm) \
+ $(common-objpfx)mathvec/$(libmvec-so-ver) \
+ $(+force)
+ (echo '/* GNU ld script'; echo '*/';\
+ cat $<; \
+ echo 'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \
+ 'AS_NEEDED ( $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \
+ ) > $@
+endif
+
 # Rules for the test suite.
 tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \