[m4ri] New upstream version. New approach to eliminating unnecessary direct shared library dependencies. Mo
Jerry James
jjames at fedoraproject.org
Mon Apr 16 18:17:28 UTC 2012
commit a1f81965fef0e9d1ee14b9739b91d1b4bcbc895a
Author: Jerry James <loganjerry at gmail.com>
Date: Mon Apr 16 12:17:06 2012 -0600
New upstream version.
New approach to eliminating unnecessary direct shared library dependencies.
More robust way of updating installed headers.
Fix the tests.
.gitignore | 2 +-
m4ri-no-sse3.patch | 150 ++++-----------------------------------------------
m4ri.spec | 33 ++++++++---
sources | 2 +-
4 files changed, 38 insertions(+), 149 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 55d5002..0b6c69b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/m4ri-20111203.tar.gz
+/m4ri-20120415.tar.gz
diff --git a/m4ri-no-sse3.patch b/m4ri-no-sse3.patch
index 3f544eb..361ef77 100644
--- a/m4ri-no-sse3.patch
+++ b/m4ri-no-sse3.patch
@@ -1,148 +1,22 @@
---- ./Makefile.am.orig 2011-12-03 06:44:39.000000000 -0700
-+++ ./Makefile.am 2012-01-30 10:52:19.111546653 -0700
-@@ -48,7 +48,7 @@ pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = m4ri.pc
+--- configure.orig 2012-04-13 17:00:41.000000000 -0600
++++ configure 2012-04-16 11:46:11.801540070 -0600
+@@ -11997,9 +11997,6 @@
+ else
- libm4ri_la_LDFLAGS = -release 0.0.20111203 -no-undefined
--libm4ri_la_LIBADD = -lm $(LIBPNG_LIBADD)
-+libm4ri_la_LIBADD = -lgomp $(LIBPNG_LIBADD)
-
- check_PROGRAMS=test_multiplication test_elimination test_trsm test_pls test_solve test_kernel test_random test_smallops test_transpose test_colswap
- test_multiplication_SOURCES=testsuite/test_multiplication.c
---- ./m4/ax_ext.m4.orig 2011-12-03 06:44:39.000000000 -0700
-+++ ./m4/ax_ext.m4 2012-01-30 10:53:06.122461152 -0700
-@@ -65,21 +65,8 @@ AC_DEFUN([AX_EXT],
- fi
- ])
-
-- AC_CACHE_CHECK([whether sse3 is supported], [ax_cv_have_sse3_ext],
-- [
-- ax_cv_have_sse3_ext=no
+ ax_cv_have_sse3_ext=no
- if test "$((0x$ecx&0x01))" = 1; then
- ax_cv_have_sse3_ext=yes
- fi
-- ])
--
-- AC_CACHE_CHECK([whether ssse3 is supported], [ax_cv_have_ssse3_ext],
-- [
-- ax_cv_have_ssse3_ext=no
-- if test "$((0x$ecx>>9&0x01))" = 1; then
-- ax_cv_have_ssse3_ext=yes
-- fi
-- ])
-+ ax_cv_have_sse3_ext=no
-+ ax_cv_have_ssse3_ext=no
-
- if test "$ax_cv_have_mmx_ext" = yes; then
- AC_DEFINE(HAVE_MMX,,[Support mmx instructions])
---- ./m4/ax_func_posix_memalign.m4.orig 2011-12-03 06:44:39.000000000 -0700
-+++ ./m4/ax_func_posix_memalign.m4 2012-01-30 10:54:14.184123698 -0700
-@@ -27,18 +27,15 @@
- AC_DEFUN([AX_FUNC_POSIX_MEMALIGN],
- [AC_CACHE_CHECK([for working posix_memalign],
- [ax_cv_func_posix_memalign_works],
-- [AC_TRY_RUN([
-+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
- #include <stdlib.h>
--
--int
--main ()
--{
-+ ]],[[
- void *buffer;
-
- /* Some versions of glibc incorrectly perform the alignment check on
- * the size word. */
- exit (posix_memalign (&buffer, sizeof(void *), 123) != 0);
--}
-+ ]])
- ],
- [ax_cv_func_posix_memalign_works=yes],
- [ax_cv_func_posix_memalign_works=no],
---- ./configure.ac.orig 2011-12-03 06:44:39.000000000 -0700
-+++ ./configure.ac 2012-01-30 10:55:36.084483796 -0700
-@@ -17,7 +17,7 @@ AC_CONFIG_MACRO_DIR([m4])
- dnl Compiling with per-target flags (test_elimination.c) requires AM_PROG_CC_C_O.
- AM_PROG_CC_C_O
-
--AC_PROG_LIBTOOL
-+LT_INIT
- AC_PROG_INSTALL
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse3_ext" >&5
+@@ -12012,9 +12009,6 @@
+ else
-@@ -200,7 +200,7 @@ fi
-
- have_libpng="no"
- AC_ARG_ENABLE([png],
-- [AC_HELP_STRING([--disable-png], [disable PNG support @<:@default=enabled@:>@])],
-+ [AS_HELP_STRING([--disable-png], [disable PNG support @<:@default=enabled@:>@])],
- [
- if test "x${enableval}" = "xyes" ; then
- want_png="yes"
---- ./configure.orig 2011-12-03 06:44:46.000000000 -0700
-+++ ./configure 2012-01-30 10:55:45.431125717 -0700
-@@ -11987,35 +11987,8 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse2_ext" >&5
- $as_echo "$ax_cv_have_sse2_ext" >&6; }
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sse3 is supported" >&5
--$as_echo_n "checking whether sse3 is supported... " >&6; }
--if ${ax_cv_have_sse3_ext+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
--
-- ax_cv_have_sse3_ext=no
-- if test "$((0x$ecx&0x01))" = 1; then
-- ax_cv_have_sse3_ext=yes
-- fi
--
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_sse3_ext" >&5
--$as_echo "$ax_cv_have_sse3_ext" >&6; }
--
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ssse3 is supported" >&5
--$as_echo_n "checking whether ssse3 is supported... " >&6; }
--if ${ax_cv_have_ssse3_ext+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
--
-- ax_cv_have_ssse3_ext=no
+ ax_cv_have_ssse3_ext=no
- if test "$((0x$ecx>>9&0x01))" = 1; then
- ax_cv_have_ssse3_ext=yes
- fi
--
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_ssse3_ext" >&5
--$as_echo "$ax_cv_have_ssse3_ext" >&6; }
-+ ax_cv_have_sse3_ext=no
-+ ax_cv_have_ssse3_ext=no
-
- if test "$ax_cv_have_mmx_ext" = yes; then
-
-@@ -12255,11 +12228,15 @@ else
- int
- main ()
- {
-+
- void *buffer;
-
- /* Some versions of glibc incorrectly perform the alignment check on
- * the size word. */
- exit (posix_memalign (&buffer, sizeof(void *), 123) != 0);
-+
-+ ;
-+ return 0;
- }
- _ACEOF
---- ./Makefile.in.orig 2011-12-03 06:44:47.000000000 -0700
-+++ ./Makefile.in 2012-01-30 10:55:46.293184922 -0700
-@@ -395,7 +395,7 @@ nodist_pkgincludesub_HEADERS = src/m4ri_
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = m4ri.pc
- libm4ri_la_LDFLAGS = -release 0.0.20111203 -no-undefined
--libm4ri_la_LIBADD = -lm $(LIBPNG_LIBADD)
-+libm4ri_la_LIBADD = -lgomp $(LIBPNG_LIBADD)
- test_multiplication_SOURCES = testsuite/test_multiplication.c
- test_multiplication_LDFLAGS = -lm4ri -lm
- test_multiplication_CFLAGS = -I$(srcdir)/src $(AM_CFLAGS)
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_ssse3_ext" >&5
diff --git a/m4ri.spec b/m4ri.spec
index e9aaf85..6872d0e 100644
--- a/m4ri.spec
+++ b/m4ri.spec
@@ -1,5 +1,5 @@
Name: m4ri
-Version: 20111203
+Version: 20120415
Release: 1%{?dist}
Summary: Linear Algebra over F_2
Group: Development/Libraries
@@ -49,6 +49,14 @@ The %{name}-static package contains the static %{name} library.
# Remove an unnecessary direct library dependency from the pkgconfig file
sed -i -e "s/ -lm//" m4ri.pc.in
+# Fix library dependencies
+sed -i -e "s/-lm \$(LIBPNG_LIBADD)/-lgomp \$(LIBPNG_LIBADD)/" Makefile.in
+
+# Die, rpath, die!
+sed -e "s|\(hardcode_libdir_flag_spec=\)'.*|\1|" \
+ -e "s|\(runpath_var=\)LD_RUN_PATH|\1|" \
+ -i configure
+
# Fix a couple of broken doxygen commands
sed -i -e "s/\\\\output/\\\\return/" -e "s/\\\\seealso/\\\\see/" src/misc.h
@@ -56,17 +64,18 @@ sed -i -e "s/\\\\output/\\\\return/" -e "s/\\\\seealso/\\\\see/" src/misc.h
%build
%ifarch %ix86
# Build an SSE2-enabled version,
-%configure --enable-openmp CFLAGS="$RPM_OPT_FLAGS -march=pentium4"
+%configure --enable-openmp CFLAGS="$RPM_OPT_FLAGS -march=pentium4" \
+ LDFLAGS="$RPM_LD_FLAGS -Wl,--as-needed"
sed -e 's/^#undef HAVE_MMX/#define HAVE_MMX/' \
-e 's/^#undef HAVE_SSE$/#define HAVE_SSE/' \
-e 's/^#undef HAVE_SSE2/#define HAVE_SSE2/' \
-i src/config.h
-sed -e 's/^#define __M4RI_HAVE_SSE2.*/#define __M4RI_HAVE_SSE2 1/' \
- -e 's/^#define __M4RI_SIMD_CFLAGS/#define __M4RI_SIMD_CFLAGS " -mmmx -msse -msse2"/' \
+sed -e 's/^\(#define __M4RI_HAVE_SSE2[[:blank:]]*\)0/\11/' \
+ -e 's/^\(#define __M4RI_SIMD_CFLAGS[[:blank:]]*\).*/\1" -mmmx -msse -msse2"/' \
-i src/m4ri_config.h
sed -i 's/^SIMD_CFLAGS =.*/SIMD_CFLAGS = -mmmx -msse -msse2/' Makefile
%else
-%configure --enable-openmp
+%configure --enable-openmp LDFLAGS="$RPM_LD_FLAGS -Wl,--as-needed"
%endif
make %{?_smp_mflags}
@@ -76,7 +85,8 @@ make %{?_smp_mflags}
cp -a .libs .libs.sse2
make clean
rm -fr .deps
-%configure --enable-openmp --disable-sse2
+%configure --enable-openmp --disable-sse2 \
+ LDFLAGS="$RPM_LD_FLAGS -Wl,--as-needed"
make %{?_smp_mflags}
%endif
@@ -100,8 +110,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}.la
# Fix include references in the installed headers
cd $RPM_BUILD_ROOT%{_includedir}/m4ri
-for f in brilliantrussian.h echelonform.h m4ri.h misc.h mmc.h packedmatrix.h \
- parity.h permutation.h pls.h pls_mmpf.h solve.h strassen.h trsm.h xor.h; do
+for f in `grep -l '^#[[:blank:]]*include[[:blank:]]*".*"' *.h`; do
sed -r 's|^(#[[:blank:]]*include[[:blank:]]+)"(.*)"|\1<m4ri/\2>|' $f > $f.n
touch -r $f $f.n
mv -f $f.n $f
@@ -109,7 +118,7 @@ done
%check
-make check
+make check LD_LIBRARY_PATH=`pwd`/.libs
%post -p /sbin/ldconfig
@@ -138,6 +147,12 @@ make check
%changelog
+* Mon Apr 16 2012 Jerry James <loganjerry at gmail.com> - 20120415-1
+- New upstream version
+- New approach to eliminating unnecessary direct shared library dependencies
+- More robust way of updating installed headers
+- Fix the tests
+
* Mon Jan 30 2012 Jerry James <loganjerry at gmail.com> - 20111203-1
- New upstream version
- Add libpng-devel BR
diff --git a/sources b/sources
index c774203..7f647c2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-7be27d366adebb221165233978da753a m4ri-20111203.tar.gz
+27f5cfec84c1140f8da37f6c62802646 m4ri-20120415.tar.gz
More information about the scm-commits
mailing list