Skip to contentSkip to conversation

autobuilder: static link CMake packages fixes

PATCH New Samuel Martin 2 participants 19 messages Aug 31, 2014

lore
Share & tools
lore
#0 lore raw

v2 cover autobuilder: static link CMake packages fixes

Hi all,

Here is a couple of aautobuild fixes concerning CMake-based packages, in configuration in which BR2_PREFER_STATIC_LIB is set.

These fixes gives priority to patching the per-project CMake code in order to keep using the standard CMake flag (BUILD_SHARED_LIBS) instead of using the custom options.

Note that I'll post the patchs to each project.

Cheers,

Samuel Martin (9):
package/cmake: add host-pkgconf as dependency package/yajl: add sequence number in patch names package/yajl: fix static link package/libplist: fix static link package/librtlsdr: fix static link package/musepack: add sequence number in patch names package/musepack: fix static link package/polarssl: fix static link package/taglib: fix static link

 package/cmake/cmake.mk                             |   2 +
 ...1-cmake-let-CMake-drives-the-library-type.patch |  37 ++++++++
 ...sure-the-libxml2-module-correctly-set-all.patch |  48 ++++++++++
 ...sure-the-libusb-module-correctly-set-all-.patch |  45 +++++++++
 ...le-rtlsdr_shared-library-target-in-BUILD_.patch | 104 +++++++++++++++++++++
 ...ack-shared.patch => musepack-0001-shared.patch} |   0
 ...he-standard-CMake-flag-to-drive-the-share.patch |  43 +++++++++
 ...he-standard-CMake-flag-to-drive-the-share.patch |  39 ++++++++
 package/polarssl/polarssl.mk                       |   2 -
 ...he-standard-CMake-flag-to-drive-the-share.patch |  40 ++++++++
 ...4-math-link.patch => yajl-0001-math-link.patch} |   0
 ...le-shared-library-build-when-BUILD_SHARED.patch |  44 +++++++++
 12 files changed, 402 insertions(+), 2 deletions(-)
 create mode 100644 package/libplist/libplist-0001-cmake-let-CMake-drives-the-library-type.patch
 create mode 100644 package/libplist/libplist-0002-cmake-make-sure-the-libxml2-module-correctly-set-all.patch
 create mode 100644 package/librtlsdr/librtlsdr-0001-cmake-make-sure-the-libusb-module-correctly-set-all-.patch
 create mode 100644 package/librtlsdr/librtlsdr-0002-cmake-disable-rtlsdr_shared-library-target-in-BUILD_.patch
 rename package/musepack/{musepack-shared.patch => musepack-0001-shared.patch} (100%)
 create mode 100644 package/musepack/musepack-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
 create mode 100644 package/polarssl/polarssl-0003-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
 create mode 100644 package/taglib/taglib-0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
 rename package/yajl/{yajl-2.0.4-math-link.patch => yajl-0001-math-link.patch} (100%)
 create mode 100644 package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch

--
2.1.0

#1 lore raw

PATCH v2 1/9 package/cmake: add host-pkgconf as dependency

Since some CMake modules (even upstream ones) use pgk_check_modules primtives to find {C,LD}FLAGS, then add it to the dependency list.

---
changes v1->v2:
- new patch

---
 package/cmake/cmake.mk | 2 ++
 1 file changed, 2 insertions(+)
package/cmake/cmake.mk +2 -0
index 6987f09..bfeb147 100644
@@ -10,6 +10,8 @@ CMAKE_SITE = http://www.cmake.org/files/v$(CMAKE_VERSION_MAJOR)
 CMAKE_LICENSE = BSD-3c
 CMAKE_LICENSE_FILES = Copyright.txt
 
+HOST_CMAKE_DEPENDENCIES = host-pkgconf
+
 define HOST_CMAKE_CONFIGURE_CMDS
 	(cd $(@D); \
 		LDFLAGS="$(HOST_LDFLAGS)" \
Signature · 1 line
2.1.0
#2 lore raw

PATCH v2 1/9 package/cmake: add host-pkgconf as dependency

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Since some CMake modules (even upstream ones) use pgk_check_modules primtives to find {C,LD}FLAGS, then add it to the dependency list.

Committed with the commit message fixed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v2 2/9 package/yajl: add sequence number in patch names

In reply to Samuel Martin

Also remove the package version from the patch names.

---
changes v1->v2:
- new patch

---
 package/yajl/{yajl-2.0.4-math-link.patch => yajl-0001-math-link.patch} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename package/yajl/{yajl-2.0.4-math-link.patch => yajl-0001-math-link.patch} (100%)
package/yajl/yajl-0001-math-link.patch renamed from package/yajl/yajl-2.0.4-math-link.patch +0 -0
similarity index 100%
rename from package/yajl/yajl-2.0.4-math-link.patch
rename to package/yajl/yajl-0001-math-link.patch
Signature · 1 line
2.1.0
#4 lore raw

PATCH v2 2/9 package/yajl: add sequence number in patch names

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

Also remove the package version from the patch names.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH v2 3/9 package/yajl: fix static link

In reply to Samuel Martin

- disable shared object build when BR2_PREFER_STATIC_LIB is set

---
changes v1->v2:
- new patch

---
 ...le-shared-library-build-when-BUILD_SHARED.patch | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch
package/yajl/yajl-0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch new file +44 -0
new file mode 100644
index 0000000..261c486
@@ -0,0 +1,44 @@
+From bb4fb7ff71fd6cadd9c1bf8716845a91e5998c0c Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sun, 31 Aug 2014 00:39:11 +0200
+Subject: [PATCH 2/2] cmake: disable shared library build when
+ BUILD_SHARED_LIBS is off
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ src/CMakeLists.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e36b736..6a24424 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -37,6 +37,7 @@ SET(LIBRARY_OUTPUT_PATH ${libDir})
+ 
+ ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS})
+ 
++IF(BUILD_SHARED_LIBS)
+ ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
+ 
+ #### setup shared library version number
+@@ -51,6 +52,7 @@ IF(APPLE)
+   SET_TARGET_PROPERTIES(yajl PROPERTIES
+                         INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ ENDIF(APPLE)
++ENDIF(BUILD_SHARED_LIBS)
+ 
+ #### build up an sdk as a post build step
+ 
+@@ -78,7 +80,9 @@ INCLUDE_DIRECTORIES(${incDir}/..)
+ IF(NOT WIN32)
+   # at build time you may specify the cmake variable LIB_SUFFIX to handle
+   # 64-bit systems which use 'lib64'
++  IF(BUILD_SHARED_LIBS)
+   INSTALL(TARGETS yajl LIBRARY DESTINATION lib${LIB_SUFFIX})
++  ENDIF(BUILD_SHARED_LIBS)
+   INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
+   INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)
+   INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl)
+-- 
+2.1.0
+
Signature · 1 line
2.1.0
#6 lore raw

PATCH v2 3/9 package/yajl: fix static link

Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

- disable shared object build when BR2_PREFER_STATIC_LIB is set

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH v2 4/9 package/libplist: fix static link

In reply to Samuel Martin

- libplist depends on libm and optionnaly on zlib and libiconv (via libxml2), so add a patch fixing the build-system that way
- disable shared object build when BR2_PREFER_STATIC_LIB is set

Fixes:
http://autobuild.buildroot.net/results/9a3/9a364e3d91634a2da2bc481da1dee0ad0e870941/

---
changes v1->v2:
- make the libxml2 CMake module correctly handles/checks for the libxml2 optional deps.

---
 ...1-cmake-let-CMake-drives-the-library-type.patch | 37 +++++++++++++++++
 ...sure-the-libxml2-module-correctly-set-all.patch | 48 ++++++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 package/libplist/libplist-0001-cmake-let-CMake-drives-the-library-type.patch
 create mode 100644 package/libplist/libplist-0002-cmake-make-sure-the-libxml2-module-correctly-set-all.patch
package/libplist/libplist-0001-cmake-let-CMake-drives-the-library-type.patch new file +37 -0
new file mode 100644
index 0000000..247f3f0
@@ -0,0 +1,37 @@
+From 13150b8e2b49a9c95eaad831ff69429ff9f66aa4 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sat, 30 Aug 2014 11:20:36 +0200
+Subject: [PATCH 1/2] cmake: let CMake drives the library type
+
+Do not force CMake to build shared object when BUILD_SHARED_LIBS is off.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ src/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a0d6179..78946b1 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -34,7 +34,7 @@ SET(libcnary_object_files
+ 
+ SET_SOURCE_FILES_PROPERTIES(${libcnary_object_files} PROPERTIES EXTERNAL_OBJECT true GENERATED true)
+ 
+-ADD_LIBRARY( plist SHARED ${libplist_SRC} ${libcnary_object_files} )
++ADD_LIBRARY( plist ${libplist_SRC} ${libcnary_object_files} )
+ TARGET_LINK_LIBRARIES( plist ${LIBXML2_LIBRARIES} )
+ SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
+ SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
+@@ -42,7 +42,7 @@ if(APPLE)
+   SET_TARGET_PROPERTIES( plist PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+ endif()
+ 
+-ADD_LIBRARY( plist++ SHARED ${libplist++_SRC} )
++ADD_LIBRARY( plist++ ${libplist++_SRC} )
+ TARGET_LINK_LIBRARIES( plist++ plist )
+ SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
+ SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
+-- 
+2.1.0
+
package/libplist/libplist-0002-cmake-make-sure-the-libxml2-module-correctly-set-all.patch new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.1.0
#8 lore raw

PATCH v2 4/9 package/libplist: fix static link

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

- libplist depends on libm and optionnaly on zlib and libiconv (via libxml2), so add a patch fixing the build-system that way
- disable shared object build when BR2_PREFER_STATIC_LIB is set

Fixes:
http://autobuild.buildroot.net/results/9a3/9a364e3d91634a2da2bc481da1dee0ad0e870941/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH v2 5/9 package/librtlsdr: fix static link

In reply to Samuel Martin

This patch adds 2 patches to librtlsdr fixing static linking.

The first one makes sure the libusb CMake module will find all the dependencies, so the ldflags will be correct, even for static link.

The second patch disable the shared object build when it BUILD_SHARED_LIBS is off.

Fixes:
http://autobuild.buildroot.org/results/2d9/2d91d7fa10ac3bd22fb5ce72acd7a0ce177f054f/

---
changes v1->v2:
- make the libusb CMake module correctly handles/checks its deps.

---
 ...sure-the-libusb-module-correctly-set-all-.patch |  45 +++++++++
 ...le-rtlsdr_shared-library-target-in-BUILD_.patch | 104 +++++++++++++++++++++
 2 files changed, 149 insertions(+)
 create mode 100644 package/librtlsdr/librtlsdr-0001-cmake-make-sure-the-libusb-module-correctly-set-all-.patch
 create mode 100644 package/librtlsdr/librtlsdr-0002-cmake-disable-rtlsdr_shared-library-target-in-BUILD_.patch
package/librtlsdr/librtlsdr-0001-cmake-make-sure-the-libusb-module-correctly-set-all-.patch new file +45 -0
new file mode 100644
index 0000000..a1faca0
@@ -0,0 +1,45 @@
+From 3d5ab5eea351b5b19b8236c9c39857b6f2d3d126 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sun, 31 Aug 2014 10:14:38 +0200
+Subject: [PATCH] cmake: make sure the libusb module correctly set all ldflags
+ in case of static link
+
+When executing a statically linked build, the default libusb CMake
+module fails to get the libusb dependencies; so the link phase fails.
+
+However, pkg-config correctly gives these dependencies, even for static
+build. So, extend the libusb library list with what the pkg_check_modules
+CMake primitive found.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ cmake/Modules/FindLibUSB.cmake | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/cmake/Modules/FindLibUSB.cmake b/cmake/Modules/FindLibUSB.cmake
+index c2c3f63..8adf805 100644
+--- a/cmake/Modules/FindLibUSB.cmake
++++ b/cmake/Modules/FindLibUSB.cmake
+@@ -24,6 +24,19 @@ endif()
+     /usr/local/lib
+   )
+ 
++  # Make sure we get all ldflags in case of static link
++  if(NOT BUILD_SHARED_LIBS)
++    foreach(_lib ${LIBUSB_PKG_STATIC_LIBRARIES})
++          string(TOUPPER ${_lib} _Ulib)
++          find_library(_${_Ulib}_LIBRARIES NAMES ${_lib} lib${_lib}
++              HINTS
++              ${LIBUSB_PKG_LIBDIR}
++              ${LIBUSB_PKG_LIBRARY_DIRS}
++              )
++            list(APPEND LIBUSB_LIBRARIES ${_${_Ulib}_LIBRARIES})
++      endforeach()
++  endif()
++
+ include(CheckFunctionExists)
+ if(LIBUSB_INCLUDE_DIRS)
+     set(CMAKE_REQUIRED_INCLUDES ${LIBUSB_INCLUDE_DIRS})
+-- 
+2.1.0
+
package/librtlsdr/librtlsdr-0002-cmake-disable-rtlsdr_shared-library-target-in-BUILD_.patch new file +104 -0

104 lines not on this page · raw message

Signature · 1 line
2.1.0
#10 lore raw

PATCH v2 5/9 package/librtlsdr: fix static link

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

This patch adds 2 patches to librtlsdr fixing static linking. The first one makes sure the libusb CMake module will find all the dependencies, so the ldflags will be correct, even for static link.

Quoted 7 lines

The second patch disable the shared object build when it BUILD_SHARED_LIBS is off.

Fixes:
http://autobuild.buildroot.org/results/2d9/2d91d7fa10ac3bd22fb5ce72acd7a0ce177f054f/

Hmm, something goes wrong here:

Quoted 1 line
Quoted 1 line
Quoted 1 line

librtlsdr v0.5.3 Configuring

(cd /home/peko/source/buildroot/output/build/librtlsdr-v0.5.3/ && rm -f CMakeCache.txt && PATH="/home/peko/source/buildroot/output/host/bin:/home/peko/source/buildroot/output/host/sbin:/home/peko/source/buildroot/output/host/usr/bin:/home/peko/source/buildroot/output/host/usr/sbin:/home/peko/bin:/home/peko/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" /home/peko/source/buildroot/output/host/usr/bin/cmake /home/peko/source/buildroot/output/build/librtlsdr-v0.5.3/ -DCMAKE_TOOLCHAIN_FILE="/home/peko/source/buildroot/output/host/usr/share/buildroot/toolchainfile.cmake" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_COLOR_MAKEFILE=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DUSE_CCACHE=OFF -DDETACH_KERNEL_DRIVER=1 ) Re-run cmake no build system arguments
-- The C compiler identification is GNU 4.7.3
-- Check for working C compiler: /home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc
-- Check for working C compiler: /home/peko/source/buildroot/output/host/usr/bin/arm-linux-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Extracting version information from git describe...
-- Found PkgConfig: /home/peko/source/buildroot/output/host/usr/bin/pkg-config (found version "0.27")
-- checking for module 'libusb-1.0'
-- found libusb-1.0, version 1.0.19
-- Looking for libusb_handle_events_timeout_completed
-- Looking for libusb_handle_events_timeout_completed - not found
-- Looking for libusb_error_name
-- Looking for libusb_error_name - not found
-- Found libusb-1.0: /home/peko/source/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/libusb-1.0, /home/peko/source/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libusb-1.0.a;/home/peko/source/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libusb-1.0.a
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Check if compiler accepts -pthread
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
THREADS_PTHREAD_ARG (advanced)
For details see /home/peko/source/buildroot/output/build/librtlsdr-v0.5.3/TryRunResults.cmake
-- Check if compiler accepts -pthread - no
-- Found Threads: TRUE
-- Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON
-- Building with kernel driver detaching enabled
-- Building for version: 0.5.3 / 0.5.3
-- Using install prefix: /usr
-- Configuring incomplete, errors occurred!
See also "/home/peko/source/buildroot/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeOutput.log".
See also "/home/peko/source/buildroot/output/build/librtlsdr-v0.5.3/CMakeFiles/CMakeError.log".
package/pkg-generic.mk:167: recipe for target '/home/peko/source/buildroot/output/build/librtlsdr-v0.5.3/.stamp_configured' failed

That didn't used to happen.

Any ideas?

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

PATCH v2 6/9 package/musepack: add sequence number in patch names

In reply to Samuel Martin

---
changes v1->v2:
- new patch

---
 package/musepack/{musepack-shared.patch => musepack-0001-shared.patch} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename package/musepack/{musepack-shared.patch => musepack-0001-shared.patch} (100%)
package/musepack/musepack-0001-shared.patch renamed from package/musepack/musepack-shared.patch +0 -0
similarity index 100%
rename from package/musepack/musepack-shared.patch
rename to package/musepack/musepack-0001-shared.patch
Signature · 1 line
2.1.0
#13 lore raw

PATCH v2 7/9 package/musepack: fix static link

In reply to Samuel Martin

- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using standard CMake flags, instead of the custom ones.

Fixes:
http://autobuild.buildroot.org/results/e5e/e5eef14d5ed76db824c47a7e679e68397a023526/

---
changes v1->v2:
- new patch

---
 ...he-standard-CMake-flag-to-drive-the-share.patch | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/musepack/musepack-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
package/musepack/musepack-0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +43 -0
new file mode 100644
index 0000000..4bfeca0
@@ -0,0 +1,43 @@
+From d2f01ba6fa2a065156fad686d1849309c661e527 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sun, 31 Aug 2014 12:07:31 +0200
+Subject: [PATCH 2/2] cmake: use the standard CMake flag to drive the shared
+ object build
+
+If BUILD_SHARED_LIBS is set and SHARED undefined, then drive SHARED with
+the BUILD_SHARED_LIBS value.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ CMakeLists.txt | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b13f78c..db75510 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,11 +7,16 @@ project(libmpc C)
+ set(CMAKE_VERBOSE_MAKEFILE false)
+ TEST_BIG_ENDIAN(MPC_ENDIANNESS)
+ 
+-if(WIN32)
+-  option(SHARED "Use shared libmpcdec" OFF)
+-else(WIN32)
+-  option(SHARED "Use shared libmpcdec" ON)
+-endif(WIN32)
++# Use the standard CMake flag to drive the shared object build.
++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED SHARED)
++  set(SHARED ${BUILD_SHARED_LIBS})
++else()
++  if(WIN32)
++    option(SHARED "Use shared libmpcdec" OFF)
++  else(WIN32)
++    option(SHARED "Use shared libmpcdec" ON)
++  endif(WIN32)
++endif()
+ 
+ add_definitions(-DFAST_MATH -DCVD_FASTLOG)
+ 
+-- 
+2.1.0
+
Signature · 1 line
2.1.0
#14 lore raw

PATCH v2 7/9 package/musepack: fix static link

Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using standard CMake flags, instead of the custom ones.

Fixes:
http://autobuild.buildroot.org/results/e5e/e5eef14d5ed76db824c47a7e679e68397a023526/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#15 lore raw

PATCH v2 8/9 package/polarssl: fix static link

In reply to Samuel Martin

- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using standard CMake flags, instead of the ucstom ones.

Fixes:
http://autobuild.buildroot.net/results/754/754947d2a77a4dbe91057d8ce64fc4996e716ece/

---
changes v1->v2:
- add patch handling static/shared object build using standard CMake flags, instead of the custom ones.

---
 ...he-standard-CMake-flag-to-drive-the-share.patch | 39 ++++++++++++++++++++++
 package/polarssl/polarssl.mk                       |  2 --
 2 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 package/polarssl/polarssl-0003-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
package/polarssl/polarssl-0003-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +39 -0
new file mode 100644
index 0000000..d241ae2
@@ -0,0 +1,39 @@
+From a14028b0878c1ba27f7c7a6d0962874d0f7f3801 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sun, 31 Aug 2014 11:54:37 +0200
+Subject: [PATCH 3/3] cmake: use the standard CMake flag to drive the shared
+ object build
+
+If BUILD_SHARED_LIBS is set and not USE_SHARED_POLARSSL_LIBRARY, then
+drive USE_SHARED_POLARSSL_LIBRARY with the BUILD_SHARED_LIBS value.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ library/CMakeLists.txt | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
+index 27bd2e0..2ae0aba 100644
+--- a/library/CMakeLists.txt
++++ b/library/CMakeLists.txt
+@@ -1,5 +1,15 @@
+-option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON)
+-option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF)
++# Use the standard CMake flag to drive the shared object build.
++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED USE_STATIC_POLARSSL_LIBRARY AND NOT DEFINED USE_SHARED_POLARSSL_LIBRARY)
++  set(USE_STATIC_POLARSSL_LIBRARY ON)
++  if(BUILD_SHARED_LIBS)
++    set(USE_SHARED_POLARSSL_LIBRARY ON)
++  else()
++    set(USE_SHARED_POLARSSL_LIBRARY OFF)
++  endif()
++else()
++  option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON)
++  option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF)
++endif()
+ 
+ set(src
+      aes.c
+-- 
+2.1.0
+
package/polarssl/polarssl.mk +0 -2
index 24f09ed..a8bcca6 100644
@@ -8,8 +8,6 @@ POLARSSL_SITE = https://polarssl.org/code/releases
 POLARSSL_VERSION = 1.2.11
 POLARSSL_SOURCE = polarssl-$(POLARSSL_VERSION)-gpl.tgz
 POLARSSL_CONF_OPT = \
-	-DUSE_SHARED_POLARSSL_LIBRARY=ON \
-	-DUSE_STATIC_POLARSSL_LIBRARY=ON \
 	-DBUILD_TESTS=OFF \
 	-DENABLE_PROGRAMS=$(if $(BR2_PACKAGE_POLARSSL_PROGRAMS),ON,OFF)
 
Signature · 1 line
2.1.0
#16 lore raw

PATCH v2 8/9 package/polarssl: fix static link

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using standard CMake flags, instead of the ucstom ones.

Fixes:
http://autobuild.buildroot.net/results/754/754947d2a77a4dbe91057d8ce64fc4996e716ece/

Quoted 6 lines

---
changes v1->v2:
- add patch handling static/shared object build using standard CMake flags, instead of the custom ones.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#17 lore raw

PATCH v2 9/9 package/taglib: fix static link

In reply to Samuel Martin

- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using standard CMake flags, instead of the custom ones.

Fixes:
http://autobuild.buildroot.net/results/a9c/a9cfe66c57bffc5a4560b2e4dcb41994da59e294/

---
changes v1->v2:
- add patch handling static/shared object build using standard CMake flags, instead of the custom ones.

---
 ...he-standard-CMake-flag-to-drive-the-share.patch | 40 ++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/taglib/taglib-0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
package/taglib/taglib-0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +40 -0
new file mode 100644
index 0000000..535ccb4
@@ -0,0 +1,40 @@
+From 4e6a75eed3602f10aff516f49c8088c6da8db9df Mon Sep 17 00:00:00 2001
+From: Samuel Martin <[email protected]>
+Date: Sun, 31 Aug 2014 12:11:57 +0200
+Subject: [PATCH 1/1] cmake: use the standard CMake flag to drive the shared
+ object build
+
+If BUILD_SHARED_LIBS is set and ENABLE_STATIC undefined, then drive
+ENABLE_STATIC with the BUILD_SHARED_LIBS value.
+
+Signed-off-by: Samuel Martin <[email protected]>
+---
+ CMakeLists.txt | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 317ffa1..9931957 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -2,7 +2,17 @@ project(taglib)
+ 
+ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+ 
+-option(ENABLE_STATIC "Make static version of libtag"  OFF)
++# Use the standard CMake flag to drive the shared object build.
++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED ENABLE_STATIC)
++  if(BUILD_SHARED_LIBS)
++    set(ENABLE_STATIC OFF)
++  else()
++    set(ENABLE_STATIC ON)
++  endif()
++else()
++  option(ENABLE_STATIC "Make static version of libtag"  OFF)
++endif()
++
+ if(ENABLE_STATIC)
+   add_definitions(-DTAGLIB_STATIC)
+   set(BUILD_SHARED_LIBS OFF)
+-- 
+2.1.0
+
Signature · 1 line
2.1.0
#18 lore raw

PATCH v2 9/9 package/taglib: fix static link

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Samuel" == Samuel Martin <[email protected]> writes:

- disable shared object build when BR2_PREFER_STATIC_LIB is set
- patch the CMake code for handling static/shared object build using standard CMake flags, instead of the custom ones.

Fixes:
http://autobuild.buildroot.net/results/a9c/a9cfe66c57bffc5a4560b2e4dcb41994da59e294/

Quoted 6 lines

---
changes v1->v2:
- add patch handling static/shared object build using standard CMake flags, instead of the custom ones.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard