r46266 - in /packages/lapack/trunk/debian: control rules tests/ tests/control tests/xerbla-c tests/xerbla-fortran

jtaylor-guest at users.alioth.debian.org jtaylor-guest at users.alioth.debian.org
Mon Sep 9 22:43:51 UTC 2013


Author: jtaylor-guest
Date: Mon Sep  9 22:43:49 2013
New Revision: 46266

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=46266
Log:
strip -Bsymbolic-functions from LDFLAGS

-Bsymbolic-functions breaks xerbla_ error handling overrides as internal calls
to it will not go over the plt anymore.
With bfd linker --dynamic-list could be used instead but it doesn't seem work
with gold linker.
Closes: #722252

Added:
    packages/lapack/trunk/debian/tests/
    packages/lapack/trunk/debian/tests/control
    packages/lapack/trunk/debian/tests/xerbla-c   (with props)
    packages/lapack/trunk/debian/tests/xerbla-fortran   (with props)
Modified:
    packages/lapack/trunk/debian/control
    packages/lapack/trunk/debian/rules

Modified: packages/lapack/trunk/debian/control
URL: http://svn.debian.org/wsvn/debian-science/packages/lapack/trunk/debian/control?rev=46266&op=diff
==============================================================================
--- packages/lapack/trunk/debian/control	(original)
+++ packages/lapack/trunk/debian/control	Mon Sep  9 22:43:49 2013
@@ -11,6 +11,7 @@
 Homepage: http://www.netlib.org/lapack/
 Vcs-Svn: svn://svn.debian.org/svn/debian-science/packages/lapack/
 Vcs-Browser: http://svn.debian.org/viewsvn/debian-science/packages/lapack/
+XS-Testsuite: autopkgtest
 
 Package: liblapack3
 Architecture: any

Modified: packages/lapack/trunk/debian/rules
URL: http://svn.debian.org/wsvn/debian-science/packages/lapack/trunk/debian/rules?rev=46266&op=diff
==============================================================================
--- packages/lapack/trunk/debian/rules	(original)
+++ packages/lapack/trunk/debian/rules	Mon Sep  9 22:43:49 2013
@@ -8,6 +8,11 @@
 VERS:=$(SO).$(MN)
 
 CC:=/usr/bin/cc
+
+# xerblas_ and LAPACK_xerblas must be overrideable by applications
+# --dynamic-list does not work with gold, so drop the flag completely
+BUILDFLAGS_ENV:=DEB_LDFLAGS_MAINT_STRIP="-Wl,-Bsymbolic-functions"
+LDFLAGS:=$(shell $(BUILDFLAGS_ENV) dpkg-buildflags --get LDFLAGS)
 
 ARCH:=$(shell dpkg --print-architecture)
 F77:=gfortran
@@ -89,7 +94,7 @@
 	echo "Building liblapack.so.$(VERS) from liblapack_pic.a"
 	mkdir -p tmp
 	cd tmp && ar x ../$<
-	$(F77) -shared -Wl,-soname=liblapack.so.$(SO) -o $@ tmp/*.o  -L. -lblas $(shell dpkg-buildflags --get LDFLAGS)
+	$(F77) -shared -Wl,-soname=liblapack.so.$(SO) -o $@ tmp/*.o  -L. -lblas $(LDFLAGS)
 	rm -rf tmp
 
 liblapack.so.$(SO): liblapack.so.$(VERS)
@@ -117,7 +122,7 @@
 	cd lapacke; \
 	mkdir -p tmp; \
 	cd tmp && ar x ../$< && cd -; \
-	$(CC) -shared -Wl,-soname=liblapacke.so.$(SO) -o $@ tmp/*.o  -L.. -lblas -llapack $(shell dpkg-buildflags --get LDFLAGS); \
+	$(CC) -shared -Wl,-soname=liblapacke.so.$(SO) -o $@ tmp/*.o  -L.. -lblas -llapack $(LDFLAGS); \
 	rm -rf tmp
 
 liblapacke.so.$(SO): liblapacke.so.$(VERS)

Added: packages/lapack/trunk/debian/tests/control
URL: http://svn.debian.org/wsvn/debian-science/packages/lapack/trunk/debian/tests/control?rev=46266&op=file
==============================================================================
--- packages/lapack/trunk/debian/tests/control	(added)
+++ packages/lapack/trunk/debian/tests/control	Mon Sep  9 22:43:49 2013
@@ -0,0 +1,5 @@
+Tests: xerbla-fortran
+Depends: liblapack-dev, gfortran
+
+Tests: xerbla-c
+Depends: liblapacke-dev, gcc

Added: packages/lapack/trunk/debian/tests/xerbla-c
URL: http://svn.debian.org/wsvn/debian-science/packages/lapack/trunk/debian/tests/xerbla-c?rev=46266&op=file
==============================================================================
--- packages/lapack/trunk/debian/tests/xerbla-c	(added)
+++ packages/lapack/trunk/debian/tests/xerbla-c	Mon Sep  9 22:43:49 2013
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -ue
+cd $ADTTMP
+
+cat << EOF > tmp.c
+#include <stdio.h>
+#include <lapacke.h>
+void LAPACKE_xerbla( const char *name, lapack_int info )
+{
+    if( info < 0 ) { 
+        printf( "OVERRIDE SUCCESSFUL override %d in %s\n", -(int) info, name );
+    }   
+}
+
+
+int main (int argc, const char * argv[])
+{
+   double a[5][3] = {1,1,1,2,3,4,3,5,2,4,2,5,5,4,3};
+   double b[5][2] = {-10,-3,12,14,14,12,16,16,18,16};
+   lapack_int info,m,n,lda,ldb,nrhs;
+   int i,j;
+
+   m = 5;
+   n = 9;
+   nrhs = 2;
+   lda = 3;
+   ldb = 2;
+
+   info = LAPACKE_dgels(LAPACK_ROW_MAJOR,'N',m,n,nrhs,*a,lda,*b,ldb);
+   return(info);
+}
+EOF
+gcc tmp.c -llapacke
+./a.out 2>&1 | grep "OVERRIDE SUCCESSFUL"
+

Propchange: packages/lapack/trunk/debian/tests/xerbla-c
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/lapack/trunk/debian/tests/xerbla-fortran
URL: http://svn.debian.org/wsvn/debian-science/packages/lapack/trunk/debian/tests/xerbla-fortran?rev=46266&op=file
==============================================================================
--- packages/lapack/trunk/debian/tests/xerbla-fortran	(added)
+++ packages/lapack/trunk/debian/tests/xerbla-fortran	Mon Sep  9 22:43:49 2013
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -ue
+cd $ADTTMP
+
+cat << EOF > tmp.f
+        Program LinearEquations
+        Implicit none
+        Real*4 A(3,3), b(3)
+        integer i, j, pivot(3), ok
+        call SGESV(9, 1, A, 3, pivot, b, 3, ok)
+        end
+
+
+        SUBROUTINE XERBLA(srcname, info)
+        PRINT *,'OVERRIDE SUCCESSFUL'
+        RETURN
+        END
+EOF
+gfortran tmp.f -llapack
+./a.out 2>&1 | grep "OVERRIDE SUCCESSFUL"
+

Propchange: packages/lapack/trunk/debian/tests/xerbla-fortran
------------------------------------------------------------------------------
    svn:executable = *




More information about the debian-science-commits mailing list