This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, libgfortran] PR24909 libmatmul.la breaks Darwin build
The following appears to do the right thing for me wrt enabling
vectorization, without using a convenience library. I'm running
it through one more test run on x86_64.
r~
* Makefile.am: Revert 2005-11-14 change. Enable -free-vectorize
via gmake per-target variables.
Index: Makefile.am
===================================================================
--- Makefile.am (revision 107194)
+++ Makefile.am (working copy)
@@ -433,7 +433,7 @@ m4_files= m4/iparm.m4 m4/ifunction.m4 m4
gfor_built_src= $(i_all_c) $(i_any_c) $(i_count_c) $(i_maxloc0_c) \
$(i_maxloc1_c) $(i_maxval_c) $(i_minloc0_c) $(i_minloc1_c) $(i_minval_c) \
$(i_product_c) $(i_sum_c) $(i_dotprod_c) $(i_dotprodl_c) $(i_dotprodc_c) \
- $(i_matmull_c) $(i_transpose_c) $(i_shape_c) $(i_eoshift1_c) \
+ $(i_matmul_c) $(i_matmull_c) $(i_transpose_c) $(i_shape_c) $(i_eoshift1_c) \
$(i_eoshift3_c) $(i_cshift1_c) $(i_reshape_c) $(in_pack_c) $(in_unpack_c) \
$(i_exponent_c) $(i_fraction_c) $(i_nearest_c) $(i_set_exponent_c) \
$(i_pow_c) \
@@ -573,17 +573,14 @@ $(gfor_built_specific2_src) \
intrinsics/dprod_r8.f90 \
intrinsics/f2c_specifics.F90
-EXTRA_LTLIBRARIES = libmatmul.la
-libmatmul_la_SOURCES = $(i_matmul_c)
-libmatmul_la_CFLAGS = -ftree-vectorize $(AM_CFLAGS)
+# Turn on vectorization for matmul.
+$(patsubst %.c,%.lo,$(notdir $(i_matmul_c))): AM_CFLAGS += -ftree-vectorize
BUILT_SOURCES=$(gfor_built_src) $(gfor_built_specific_src) \
- $(gfor_built_specific2_src) $(libmatmul_la_SOURCES)
+ $(gfor_built_specific2_src)
libgfortran_la_SOURCES = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
$(gfor_helper_src) $(gfor_io_headers) $(gfor_specific_src)
-libgfortran_la_LIBADD = libmatmul.la
-
I_M4_DEPS=m4/iparm.m4
I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4