summaryrefslogtreecommitdiffstats
path: root/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
diff options
context:
space:
mode:
authorSamuel Martin <s.martin49@gmail.com>2014-04-23 01:15:36 +0200
committerPeter Korsgaard <peter@korsgaard.com>2014-05-04 09:10:55 +0200
commitdd5dbe627f4d66603e03ae2fdb09d4fe34d34dc7 (patch)
treee2d858ea270970c17f8f678c8fb6927eadd83675 /package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
parent2b41d31c344943428c3ce29c3cbfc5dd41052813 (diff)
downloadbuildroot-dd5dbe627f4d66603e03ae2fdb09d4fe34d34dc7.tar.gz
buildroot-dd5dbe627f4d66603e03ae2fdb09d4fe34d34dc7.zip
clapack: new package
This package provides BLAS and LAPACK libraries. Though it is common to find implementation of these two libraries in Fortran, this package provides a C-implementation for both, because: - Fortran support has been deprecated in Buildroot since the 2013.11 release; - most of the external toolchains do not provide a Fortran compiler. Often BLAS build-systems build some test programs and run them to generate some source files or adjust some build optimizations, naively assuming they are building the library for the build-machine. This does not play well when cross-compiling. This implementation has this defect too, by building and running a tool generating a header. However, the build-system allows to pass an empty header. So, we have to patch the CMake to build the generator (but never install it) and correctly support building with and without this header provided by the user. Also, some CMake patches are needed to fix the build and install rules. [Peter: needs largefile, fix _LICENSE_FILES, tweak patch desc] Signed-off-by: Samuel Martin <s.martin49@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch')
-rw-r--r--package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch b/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
new file mode 100644
index 0000000000..8fede9da91
--- /dev/null
+++ b/package/clapack/clapack-0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
@@ -0,0 +1,32 @@
+From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sat, 11 Jan 2014 22:05:25 +0100
+Subject: [PATCH 1/6] cmake: force libf2c to be built as a static library
+
+As stated in INSTALL/LAPACK_version.c, liblapack requires to be linked
+against the static library of libf2c.
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ F2CLIBS/libf2c/CMakeLists.txt | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
+index 43d7b3f..f98d66a 100644
+--- a/F2CLIBS/libf2c/CMakeLists.txt
++++ b/F2CLIBS/libf2c/CMakeLists.txt
+@@ -58,5 +58,10 @@ if(WIN32)
+ endif()
+ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
+ include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
+-add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
++add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
+ set_property(TARGET f2c PROPERTY PREFIX lib)
++# Set fPIC on the library when build shared libraries is enabled, because
++# libf2c.a will most likely be included by some shared libraries in such cases.
++if(UNIX AND BUILD_SHARED_LIBS)
++ set_target_properties(f2c PROPERTIES COMPILE_FLAGS "-fPIC")
++endif()
+--
+1.8.5.3
+
OpenPOWER on IntegriCloud