diff mbox

[8/N,x86_64] Vectorized math functions

Message ID CAMXFM3tKFzy+7a7-2VAh_Vd0=HkdCPsc+i5QYOe7h63REXOJwA@mail.gmail.com
State New
Headers show

Commit Message

Andrew Senkevich Nov. 25, 2014, 5:13 p.m. UTC
This patch changes installation of libm.so to linker script for
utilization of vector math library libmvec.so with no additional
linker flags.

ChangeLog

2014-11-25  Andrew Senkevich  <andrew.n.senkevich@gmail.com>

        * math/Makefile: Added install rule for libm.so as linker script.

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


--
WBR,
Andrew

Comments

Joseph Myers Nov. 28, 2014, 11:43 p.m. UTC | #1
On Tue, 25 Nov 2014, Andrew Senkevich wrote:

> +$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
> +       $(libm) \
> +       $(common-objpfx)mathvec/libmvec.so$(libmvec.so-version) \

The dependencies should be lined up underneath $(common-objpfx)format.lds; 
as is, they could too easily be confused with commands.  If lining them up 
results in source lines over 79 columns, then define an intermediate 
variable to avoid that.
diff mbox

Patch

diff --git a/math/Makefile b/math/Makefile
index f5a23e4..4981358 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -85,6 +85,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
+install_subdir: $(inst_libdir)/libm.so
+$(inst_libdir)/libm.so: $(common-objpfx)format.lds \
+       $(libm) \
+       $(common-objpfx)mathvec/libmvec.so$(libmvec.so-version) \
+       $(+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 \