[suitesparse] 02/05: Fixes for shared libraries related to the PIC version of libsuitesparseconfig.

Sébastien Villemot sebastien at debian.org
Mon Jan 19 18:33:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository suitesparse.

commit fcd4ebf96a2f4b6d7223aebbc8959c39e2af7842
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Mon Jan 19 18:47:19 2015 +0100

    Fixes for shared libraries related to the PIC version of libsuitesparseconfig.
    
    Git-Dch: Ignore
---
 .../libsuitesparse_config-pic-version.patch        | 33 ------------------
 debian/patches/series                              |  1 -
 debian/patches/shared-libraries.patch              | 39 ++++++++++++++++++----
 3 files changed, 33 insertions(+), 40 deletions(-)

diff --git a/debian/patches/libsuitesparse_config-pic-version.patch b/debian/patches/libsuitesparse_config-pic-version.patch
deleted file mode 100644
index e15eac1..0000000
--- a/debian/patches/libsuitesparse_config-pic-version.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Description: Create a PIC version of libsuitesparse_config
- This will be embedded in the shared libraries which need it. Note that creating
- a separate shared library package for this would have been an overkill, since
- there is only one (small) source file.
-Author: Sébastien Villemot <sebastien at debian.org>
-Forwarded: not-needed
-Last-Update: 2013-04-29
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/SuiteSparse_config/Makefile
-+++ b/SuiteSparse_config/Makefile
-@@ -8,7 +8,7 @@
- 
- include SuiteSparse_config.mk
- 
--ccode: libsuitesparseconfig.a
-+ccode: libsuitesparseconfig.a libsuitesparseconfig_pic.a
- 
- all: libsuitesparseconfig.a
- 
-@@ -20,6 +20,12 @@
- 	$(RANLIB) libsuitesparseconfig.a
- 	- $(RM) SuiteSparse_config.o
- 
-+libsuitesparseconfig_pic.a: SuiteSparse_config.c SuiteSparse_config.h
-+	$(CC) $(CF) -fPIC -o SuiteSparse_config.oo -c SuiteSparse_config.c
-+	$(ARCHIVE) libsuitesparseconfig_pic.a SuiteSparse_config.oo
-+	$(RANLIB) libsuitesparseconfig_pic.a
-+	- $(RM) SuiteSparse_config.oo
-+
- distclean: purge
- 
- purge: clean
diff --git a/debian/patches/series b/debian/patches/series
index 4dc2ea4..18d2e8e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,6 @@
 disable-metis.patch
 use-generic-blas.patch
 shared-libraries.patch
-libsuitesparse_config-pic-version.patch
 fix-KLU-compilation-ordering.patch
 buildflags.patch
 parallel-build.patch
diff --git a/debian/patches/shared-libraries.patch b/debian/patches/shared-libraries.patch
index 81a5fa8..1e5e561 100644
--- a/debian/patches/shared-libraries.patch
+++ b/debian/patches/shared-libraries.patch
@@ -1,4 +1,7 @@
 Description: Build shared version of libraries
+ Note that for libsuitesparseconfig we don't create a separate shared library,
+ since it is too small. We rather embed a PIC version of it in the shared
+ libraries that need it.
 Author: Daniel Rus Morales <danirus at tol-project.org>
 Forwarded: no
 ---
@@ -44,7 +47,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  	- $(RANLIB) libamd.a
  
 +libamd.so.$(SOVERSION): $(AMDI_SL) $(AMDL_SL)
-+	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libamd.so
 +
  #-------------------------------------------------------------------------------
@@ -155,7 +158,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  	- $(RANLIB) libcamd.a
  
 +libcamd.so.$(SOVERSION): $(CAMDI_SL) $(CAMDL_SL)
-+	$(CC) $(LDFLAGS) -shared $^ -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcamd.so
 +
  #-------------------------------------------------------------------------------
@@ -181,7 +184,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 +libccolamd.so.$(SOVERSION):  $(SRC) $(INC)
 +	$(CC) -fPIC $(CF) $(I) -c ../Source/ccolamd.c -o ccolamd.oo
 +	$(CC) -fPIC $(CF) $(I) -c ../Source/ccolamd.c -DDLONG -o ccolamd_l.oo
-+	$(CC) $(LDFLAGS) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared *.oo -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libccolamd.so
 +
  ccode: libccolamd.a
@@ -910,7 +913,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 +libcolamd.so.$(SOVERSION):  $(SRC) $(INC)
 +	$(CC) -fPIC $(CF) $(I) -c ../Source/colamd.c -o colamd.oo
 +	$(CC) -fPIC $(CF) $(I) -c ../Source/colamd.c -DDLONG -o colamd_l.oo
-+	$(CC) $(LDFLAGS) -shared *.oo -lm -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared *.oo -lm ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libcolamd.so
 +
  ccode: libcolamd.a
@@ -1094,7 +1097,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
 -$(OBJ): $(INC)
 +libklu.so.$(SOVERSION): $(OBJ_SL)
-+	$(CC) $(LDFLAGS) -shared $^ -lm ../../AMD/Lib/libamd.so ../../BTF/Lib/libbtf.so ../../COLAMD/Lib/libcolamd.so -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm ../../AMD/Lib/libamd.so ../../BTF/Lib/libbtf.so ../../COLAMD/Lib/libcolamd.so ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libklu.so
 +
 +$(OBJ) $(OBJ_SL): $(INC)
@@ -1455,7 +1458,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  	- $(RANLIB) libspqr.a
  
 +libspqr.so.$(SOVERSION): $(OBJ_SL)
-+	$(CC) $(LDFLAGS) -shared $^ -lm -lblas -llapack ../../CHOLMOD/Lib/libcholmod.so ../../SuiteSparse_config/libsuitesparseconfig.a -Wl,-soname -Wl,$@ -o $@
++	$(CC) $(LDFLAGS) -shared $^ -lm -lblas -llapack ../../CHOLMOD/Lib/libcholmod.so ../../SuiteSparse_config/libsuitesparseconfig_pic.a -Wl,-soname -Wl,$@ -o $@
 +	ln -s $@ libspqr.so
 +
  spqr_1colamd.o: ../Source/spqr_1colamd.cpp
@@ -1950,3 +1953,27 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
  
  #-------------------------------------------------------------------------------
  # Remove all but the files in the original distribution
+--- a/SuiteSparse_config/Makefile
++++ b/SuiteSparse_config/Makefile
+@@ -8,7 +8,7 @@ default: ccode
+ 
+ include SuiteSparse_config.mk
+ 
+-ccode: libsuitesparseconfig.a
++ccode: libsuitesparseconfig.a libsuitesparseconfig_pic.a
+ 
+ all: libsuitesparseconfig.a
+ 
+@@ -20,6 +20,12 @@ libsuitesparseconfig.a: SuiteSparse_conf
+ 	$(RANLIB) libsuitesparseconfig.a
+ 	- $(RM) SuiteSparse_config.o
+ 
++libsuitesparseconfig_pic.a: SuiteSparse_config.c SuiteSparse_config.h
++	$(CC) $(CF) -fPIC -o SuiteSparse_config.oo -c SuiteSparse_config.c
++	$(ARCHIVE) libsuitesparseconfig_pic.a SuiteSparse_config.oo
++	$(RANLIB) libsuitesparseconfig_pic.a
++	- $(RM) SuiteSparse_config.oo
++
+ distclean: purge
+ 
+ purge: clean

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/suitesparse.git



More information about the debian-science-commits mailing list