configs: mx53loco: Bump U-Boot version to 2016.07
[buildroot-gz.git] / package / clapack / 0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch
blob8fede9da91e4d1a9cc4b3958f8cf0a712e9e5aaa
1 From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001
2 From: Samuel Martin <s.martin49@gmail.com>
3 Date: Sat, 11 Jan 2014 22:05:25 +0100
4 Subject: [PATCH 1/6] cmake: force libf2c to be built as a static library
6 As stated in INSTALL/LAPACK_version.c, liblapack requires to be linked
7 against the static library of libf2c.
9 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
10 ---
11 F2CLIBS/libf2c/CMakeLists.txt | 7 ++++++-
12 1 file changed, 6 insertions(+), 1 deletion(-)
14 diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt
15 index 43d7b3f..f98d66a 100644
16 --- a/F2CLIBS/libf2c/CMakeLists.txt
17 +++ b/F2CLIBS/libf2c/CMakeLists.txt
18 @@ -58,5 +58,10 @@ if(WIN32)
19 endif()
20 include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c)
21 include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c)
22 -add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
23 +add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h)
24 set_property(TARGET f2c PROPERTY PREFIX lib)
25 +# Set fPIC on the library when build shared libraries is enabled, because
26 +# libf2c.a will most likely be included by some shared libraries in such cases.
27 +if(UNIX AND BUILD_SHARED_LIBS)
28 + set_target_properties(f2c PROPERTIES COMPILE_FLAGS "-fPIC")
29 +endif()
30 --
31 1.8.5.3