* [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring
@ 2014-06-01 9:24 Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation Samuel Martin
` (11 more replies)
0 siblings, 12 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
Hi all,
Here is another series about the CMake infrastructure.
No big change in here, except that now the toolchainfile.cmake file
is templated instead of being generated.
Yours,
Samuel
Samuel Martin (11):
pkg-cmake.mk: refactor the toolchainfile.cmake generation
pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake
pkg-cmake.mk: enable ccache for cmake packages
rpi-userland: cleanup *_CONF_OPT
xbmc: fix missing libraries from rpi-userland
pkg-cmake.mk: globally disable BUILD_TESTING flag
pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using
BR2_ENABLE_DEBUG
openpowerlink: do not override CMAKE_BUILD_TYPE
opencv: do not override CMAKE_BUILD_TYPE
flann: do not override CMAKE_BUILD_TYPE
qhull: do not override CMAKE_BUILD_TYPE
package/flann/flann.mk | 1 -
package/opencv/opencv.mk | 1 -
package/openpowerlink/openpowerlink.mk | 6 ----
package/pkg-cmake.mk | 31 ++++++++++---------
package/qhull/qhull.mk | 1 -
package/rpi-userland/rpi-userland.mk | 2 +-
package/xbmc/xbmc.mk | 3 +-
support/misc/toolchainfile.cmake.in | 56 ++++++++++++++++++++++++++++++++++
8 files changed, 76 insertions(+), 25 deletions(-)
create mode 100644 support/misc/toolchainfile.cmake.in
--
1.9.2
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 10:54 ` Thomas Petazzoni
2014-06-01 20:12 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake Samuel Martin
` (10 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This patch introduces a toolchainfile.cmake.in template which is filled
by Buildroot.
Using a toolchainfile.cmake.in template file allows to avoid overloading
quoting and/or escaping and it becomes much more similar to the
resulting file.
This patch also cleans up the quoting style.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Baruch Siach <baruch@tkos.co.il>
---
changes v3 -> v4:
- rebase
- introduce toolchainfile.cmake template
- squash csets (Baruch, Arnout)
- cleanup quoting (Arnout)
changes v2 -> v3:
- new patch
---
package/pkg-cmake.mk | 23 +++++++++--------------
support/misc/toolchainfile.cmake.in | 20 ++++++++++++++++++++
2 files changed, 29 insertions(+), 14 deletions(-)
create mode 100644 support/misc/toolchainfile.cmake.in
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index edda14a..a7a9380 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -160,17 +160,12 @@ host-cmake-package = $(call inner-cmake-package,host-$(pkgname),$(call UPPERCASE
$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
@mkdir -p $(@D)
- @printf "\
- set(CMAKE_SYSTEM_NAME Linux)\n\
- set(CMAKE_C_COMPILER $(TARGET_CC_NOCCACHE))\n\
- set(CMAKE_CXX_COMPILER $(TARGET_CXX_NOCCACHE))\n\
- set(CMAKE_C_FLAGS \"\$${CMAKE_C_FLAGS} $(TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\
- set(CMAKE_CXX_FLAGS \"\$${CMAKE_CXX_FLAGS} $(TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\
- set(CMAKE_INSTALL_SO_NO_EXE 0)\n\
- set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\
- set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\
- set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
- set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
- set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
- set(ENV{PKG_CONFIG_SYSROOT_DIR} \"$(STAGING_DIR)\")\n\
- " > $@
+ sed \
+ -e 's:@@HOST_DIR@@:$(call qstrip,$(HOST_DIR)):' \
+ -e 's:@@STAGING_DIR@@:$(call qstrip,$(STAGING_DIR)):' \
+ -e 's:@@TARGET_CFLAGS@@:$(call qstrip,$(TARGET_CFLAGS)):' \
+ -e 's:@@TARGET_CXXFLAGS@@:$(call qstrip,$(TARGET_CXXFLAGS)):' \
+ -e 's:@@TARGET_CC_NOCCACHE@@:$(call qstrip,$(TARGET_CC_NOCCACHE)):' \
+ -e 's:@@TARGET_CXX_NOCCACHE@@:$(call qstrip,$(TARGET_CXX_NOCCACHE)):' \
+ < $(TOPDIR)/support/misc/toolchainfile.cmake.in \
+ > $@
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
new file mode 100644
index 0000000..e8cc378
--- /dev/null
+++ b/support/misc/toolchainfile.cmake.in
@@ -0,0 +1,20 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# CMake toolchain file for Buildroot
+#
+
+set(CMAKE_SYSTEM_NAME Linux)
+
+set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS" FORCE)
+set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS" FORCE)
+set(CMAKE_INSTALL_SO_NO_EXE 0)
+
+set(CMAKE_PROGRAM_PATH "@@HOST_DIR@@/usr/bin")
+set(CMAKE_FIND_ROOT_PATH "@@STAGING_DIR@@")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(ENV{PKG_CONFIG_SYSROOT_DIR} "@@STAGING_DIR@@")
+
+set(CMAKE_C_COMPILER "@@TARGET_CC_NOCCACHE@@")
+set(CMAKE_CXX_COMPILER "@@TARGET_CXX_NOCCACHE@@")
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 10:57 ` Thomas Petazzoni
2014-06-01 20:16 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages Samuel Martin
` (9 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
The patch allows sharing or moving the toolchains.
This is a step toward making the toolchain/sdk relocatable.
Closes #6818
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Uwe Strempel <u.strempel@googlemail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
changes v3 -> v4:
- rebase
- add comments to explain the logic (Arnout)
changes v2 -> v3:
- rebase
- use CMAKE_CURRENT_LIST_DIR instead of get_filename_component()
- rewrite subst call in a more natural way (Arnout)
---
package/pkg-cmake.mk | 11 +++++++----
support/misc/toolchainfile.cmake.in | 17 ++++++++++++-----
2 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index a7a9380..2d4a264 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -158,14 +158,17 @@ host-cmake-package = $(call inner-cmake-package,host-$(pkgname),$(call UPPERCASE
# Generation of the CMake toolchain file
################################################################################
+# In order to allow the toolchain to be relocated, we calculate the HOST_DIR
+# based on the toolchainfile.cmake file's location: $(HOST_DIR)/usr/share/buildroot
+# In all the other variables, HOST_DIR will be replaced by RELOCATED_HOST_DIR,
+# so we have to strip "$(HOST_DIR)/" from the paths that contain it.
$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
@mkdir -p $(@D)
sed \
- -e 's:@@HOST_DIR@@:$(call qstrip,$(HOST_DIR)):' \
- -e 's:@@STAGING_DIR@@:$(call qstrip,$(STAGING_DIR)):' \
+ -e 's:@@STAGING_SUBDIR@@:$(call qstrip,$(STAGING_SUBDIR)):' \
-e 's:@@TARGET_CFLAGS@@:$(call qstrip,$(TARGET_CFLAGS)):' \
-e 's:@@TARGET_CXXFLAGS@@:$(call qstrip,$(TARGET_CXXFLAGS)):' \
- -e 's:@@TARGET_CC_NOCCACHE@@:$(call qstrip,$(TARGET_CC_NOCCACHE)):' \
- -e 's:@@TARGET_CXX_NOCCACHE@@:$(call qstrip,$(TARGET_CXX_NOCCACHE)):' \
+ -e 's:@@TARGET_CC_NOCCACHE@@:$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CC_NOCCACHE))):' \
+ -e 's:@@TARGET_CXX_NOCCACHE@@:$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CXX_NOCCACHE))):' \
< $(TOPDIR)/support/misc/toolchainfile.cmake.in \
> $@
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index e8cc378..df79acd 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -3,18 +3,25 @@
# CMake toolchain file for Buildroot
#
+# In order to allow the toolchain to be relocated, we calculate the
+# HOST_DIR based on this file's location: $(HOST_DIR)/usr/share/buildroot
+# and store it in RELOCATED_HOST_DIR.
+# In all the other variables that need to refer to HOST_DIR will use
+# the RELOCATED_HOST_DIR variable.
+string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR})
+
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS" FORCE)
set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS" FORCE)
set(CMAKE_INSTALL_SO_NO_EXE 0)
-set(CMAKE_PROGRAM_PATH "@@HOST_DIR@@/usr/bin")
-set(CMAKE_FIND_ROOT_PATH "@@STAGING_DIR@@")
+set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin")
+set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(ENV{PKG_CONFIG_SYSROOT_DIR} "@@STAGING_DIR@@")
+set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
-set(CMAKE_C_COMPILER "@@TARGET_CC_NOCCACHE@@")
-set(CMAKE_CXX_COMPILER "@@TARGET_CXX_NOCCACHE@@")
+set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 10:57 ` Thomas Petazzoni
2014-06-01 20:17 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 04/11] rpi-userland: cleanup *_CONF_OPT Samuel Martin
` (8 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This patch updates the generated toolchainfile.cmake to use ccache.
When toolchainfile.cmake is used inside Buildroot, using ccache during
the build is driven by a CMake knob: USE_CCACHE, automatically set by
the cmake-package infrastructure and reflecting the BR2_CCACHE value.
Since this toolchainefile.cmake file can be used outside Buildroot, and
this file also set a couple of things (among these: the sysroot cflag,
some pkg-config environment variables), it is important to set the
compiler variables as well to keep the consistency of the
cross-compilation configuration.
So, when it is used outside Buildroot, using ccache for the build is
driven by the ccache program availability.
Note that using ccache for the build is achieved by setting the *_ARG1
CMake variables to let CMake use ccache without failing in detecting
the compiler.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
changes v3 -> v4 (Samuel):
- rebase
- make sure ccache built by Buildroot can be found when
toolchainfile.cmakeis used outside Buildroot (Arnout)
changes v2 -> v3 (Samuel):
- rebase
- inline the -DUSE_CCACHE=... in the configure commands.
- always set the compiler variables, even when called for outside
Buildroot.
- update commit message
changes v1 -> v2 (Luca):
- totally reimplemented based on Samuel's suggestion;
- added dependency on host-ccache for cmake packages if ccache is
enabled.
---
package/pkg-cmake.mk | 2 ++
support/misc/toolchainfile.cmake.in | 33 +++++++++++++++++++++++++++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 2d4a264..1de1d4a 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -66,6 +66,7 @@ define $(2)_CONFIGURE_CMDS
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_SHARED_LIBS=$(if $(BR2_PREFER_STATIC_LIB),OFF,ON) \
+ -DUSE_CCACHE=$(if $(BR2_CCACHE),ON,OFF) \
$$($$(PKG)_CONF_OPT) \
)
endef
@@ -83,6 +84,7 @@ define $(2)_CONFIGURE_CMDS
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
-DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \
+ -DUSE_CCACHE=$(if $(BR2_CCACHE),ON,OFF) \
$$($$(PKG)_CONF_OPT) \
)
endef
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index df79acd..8cf28e9 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -23,5 +23,34 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
-set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
-set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
+# This toolchain file can be used both inside and outside Buildroot.
+# * When used inside Buildroot, ccache support is explicitly driven using the
+# USE_CCACHE variable.
+# * When used outside Buildroot (i.e. when USE_CCACHE is not defined), ccache
+# support is automatically enabled if the ccache program is available.
+if(DEFINED USE_CCACHE)
+ if(USE_CCACHE)
+ set(CMAKE_ASM_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+ set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/usr/bin/ccache")
+ set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/usr/bin/ccache")
+ set(CMAKE_C_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+ set(CMAKE_CXX_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
+ else()
+ set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+ set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
+ endif()
+else()
+ find_program(CCACHE ccache HINTS "${RELOCATED_HOST_DIR}/usr/bin")
+ if(CCACHE)
+ set(CMAKE_ASM_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+ set(CMAKE_C_COMPILER "${CCACHE}")
+ set(CMAKE_CXX_COMPILER "${CCACHE}")
+ set(CMAKE_C_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+ set(CMAKE_CXX_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
+ message(STATUS "ccache program has been found and will be used for the build.")
+ message(STATUS " To disable ccache, add -DUSE_CCACHE=OFF on the cmake command line.")
+ else()
+ set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
+ set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
+ endif()
+endif()
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 04/11] rpi-userland: cleanup *_CONF_OPT
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (2 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:04 ` Thomas Petazzoni
2014-06-01 9:24 ` [Buildroot] [PATCH v4 05/11] xbmc: fix missing libraries from rpi-userland Samuel Martin
` (7 subsequent siblings)
11 siblings, 1 reply; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
rpi-userland does not need -DBUILD_SHARED_LIBS=OFF to be passed to
correclty build its static libraries; so remove this cmake flag from the
configure options.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v3 -> v4:
- rebase
changes v2 -> v3:
- new patch
---
package/rpi-userland/rpi-userland.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk
index 8b225ba..2de6b92 100644
--- a/package/rpi-userland/rpi-userland.mk
+++ b/package/rpi-userland/rpi-userland.mk
@@ -9,7 +9,7 @@ RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION))
RPI_USERLAND_LICENSE = BSD-3c
RPI_USERLAND_LICENSE_FILES = LICENCE
RPI_USERLAND_INSTALL_STAGING = YES
-RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=OFF
+RPI_USERLAND_CONF_OPT = -DVMCS_INSTALL_PREFIX=/usr
RPI_USERLAND_PROVIDES = libegl libgles libopenmax libopenvg
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 05/11] xbmc: fix missing libraries from rpi-userland
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (3 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 04/11] rpi-userland: cleanup *_CONF_OPT Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag Samuel Martin
` (6 subsequent siblings)
11 siblings, 0 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
When rpi-userland libraries are built as shared-objects, not all needed
libraries are passed in the LD_FLAGS, leading to failure at linkage.
To avoid this issue, set the LIBS variable content in accordance with the
INCLUDES variable value.
Reported-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v3 -> v4:
- rebase
changes v2 -> v3:
- new patch
---
package/xbmc/xbmc.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/xbmc/xbmc.mk b/package/xbmc/xbmc.mk
index c7a4607..8c0146e 100644
--- a/package/xbmc/xbmc.mk
+++ b/package/xbmc/xbmc.mk
@@ -53,7 +53,8 @@ ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
XBMC_DEPENDENCIES += rpi-userland
XBMC_CONF_OPT += --with-platform=raspberry-pi --enable-player=omxplayer
XBMC_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \
- -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux"
+ -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux" \
+ LIBS="-lvcos -lvchostif"
endif
ifeq ($(BR2_PACKAGE_DBUS),y)
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (4 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 05/11] xbmc: fix missing libraries from rpi-userland Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:05 ` Thomas Petazzoni
2014-06-01 20:18 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG Samuel Martin
` (5 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This CMake flag is used to enable tests. It may not disable the test
programs from being built, but it controls the test execution.
Since we don't care about building the tests (and usually disable them
when possible), make sure Buildroot won't try to run them.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
changes v3 -> v4:
- rebase
- disable BUILD_TESTING for host-package as well (Arnout)
changes v2 -> v3:
- new patch
---
package/pkg-cmake.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 1de1d4a..c34b979 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -65,6 +65,7 @@ define $(2)_CONFIGURE_CMDS
-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_COLOR_MAKEFILE=OFF \
+ -DBUILD_TESTING=OFF \
-DBUILD_SHARED_LIBS=$(if $(BR2_PREFER_STATIC_LIB),OFF,ON) \
-DUSE_CCACHE=$(if $(BR2_CCACHE),ON,OFF) \
$$($$(PKG)_CONF_OPT) \
@@ -85,6 +86,7 @@ define $(2)_CONFIGURE_CMDS
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
-DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \
-DUSE_CCACHE=$(if $(BR2_CCACHE),ON,OFF) \
+ -DBUILD_TESTING=OFF \
$$($$(PKG)_CONF_OPT) \
)
endef
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (5 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:06 ` Thomas Petazzoni
2014-06-01 20:18 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE Samuel Martin
` (4 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This CMake flag is usually used to adjust compiler flags (like: -Ox, -g,
etc).
So, it makes sense for Buildroot to globally drive this CMake flags in
the cmake-package infrastructure.
However, if a package prefer overriding this default setting, it still
can via the <PKG>_CONF_OPT variable.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
changes v3 -> v4:
- rebase
- add tags
changes v2 -> v3:
- new patch
---
package/pkg-cmake.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index c34b979..5ccda76 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -63,6 +63,7 @@ define $(2)_CONFIGURE_CMDS
PATH=$(BR_PATH) \
$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
+ -DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release) \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DBUILD_TESTING=OFF \
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (6 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:19 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 09/11] opencv: " Samuel Martin
` (3 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This flag is already correctly set by the cmake-package infrastructure.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v3 -> v4:
- rebase
changes v2 -> v3:
- new patch
---
package/openpowerlink/openpowerlink.mk | 6 ------
1 file changed, 6 deletions(-)
diff --git a/package/openpowerlink/openpowerlink.mk b/package/openpowerlink/openpowerlink.mk
index 152f014..a888eb3 100644
--- a/package/openpowerlink/openpowerlink.mk
+++ b/package/openpowerlink/openpowerlink.mk
@@ -25,12 +25,6 @@ OPENPOWERLINK_CONF_OPT = -DCMAKE_SYSTEM_PROCESSOR=$(OPENPOWERLINK_ARCH)
# so force static lib to build libpowerlink.a
OPENPOWERLINK_CONF_OPT += -DBUILD_SHARED_LIBS=OFF
-ifeq ($(BR2_ENABLE_DEBUG),y)
-OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Debug
-else
-OPENPOWERLINK_CONF_OPT += -DCMAKE_BUILD_TYPE=Release
-endif
-
OPENPOWERLINK_CONF_OPT += -DCFG_DEBUG_LVL=$(call qstrip,$(BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL))
ifeq ($(BR2_PACKAGE_OPENPOWERLINK_LIBPCAP),y)
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 09/11] opencv: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (7 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 10/11] flann: " Samuel Martin
` (2 subsequent siblings)
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This flag is already correctly set by the cmake-package infrastructure.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v3 -> v4:
- rebase
changes v2 -> v3:
- new patch
---
package/opencv/opencv.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 42f9b0a..3fcba80 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -10,7 +10,6 @@ OPENCV_SOURCE = OpenCV-$(OPENCV_VERSION).tar.bz2
OPENCV_INSTALL_STAGING = YES
OPENCV_CONF_OPT += \
- -DCMAKE_BUILD_TYPE=$(if $(BR2_ENABLE_DEBUG),Debug,Release) \
-DBUILD_WITH_STATIC_CRT=OFF \
-DBUILD_DOCS=OFF \
-DBUILD_EXAMPLES=OFF \
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 10/11] flann: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (8 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 09/11] opencv: " Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 11/11] qhull: " Samuel Martin
2014-06-01 11:08 ` [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Thomas Petazzoni
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This flag is already correctly set by the cmake-package infrastructure.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v3 -> v4:
- rebase
changes v2 -> v3:
- new patch
---
package/flann/flann.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/package/flann/flann.mk b/package/flann/flann.mk
index 5b73881..dc9cd1a 100644
--- a/package/flann/flann.mk
+++ b/package/flann/flann.mk
@@ -10,7 +10,6 @@ FLANN_INSTALL_STAGING = YES
FLANN_LICENSE = BSD-3c
FLANN_LICENSE_FILES = COPYING
FLANN_CONF_OPT = \
- -DCMAKE_BUILD_TYPE=Release \
-DBUILD_C_BINDINGS=ON \
-DBUILD_PYTHON_BINDINGS=OFF \
-DBUILD_MATLAB_BINDINGS=OFF \
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 11/11] qhull: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (9 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 10/11] flann: " Samuel Martin
@ 2014-06-01 9:24 ` Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
2014-06-01 11:08 ` [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Thomas Petazzoni
11 siblings, 2 replies; 33+ messages in thread
From: Samuel Martin @ 2014-06-01 9:24 UTC (permalink / raw)
To: buildroot
This flag is already correctly set by the cmake-package infrastructure.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v3 -> v4:
- rebase
changes v2 -> v3:
- new patch
---
package/qhull/qhull.mk | 1 -
1 file changed, 1 deletion(-)
diff --git a/package/qhull/qhull.mk b/package/qhull/qhull.mk
index 15fb46e..6992d71 100644
--- a/package/qhull/qhull.mk
+++ b/package/qhull/qhull.mk
@@ -9,6 +9,5 @@ QHULL_SITE = git://gitorious.org/qhull/qhull.git
QHULL_INSTALL_STAGING = YES
QHULL_LICENSE = BSD-Style
QHULL_LICENSE_FILES = COPYING.txt
-QHULL_CONF_OPT = -DCMAKE_BUILD_TYPE=Release
$(eval $(cmake-package))
--
1.9.2
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation
2014-06-01 9:24 ` [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation Samuel Martin
@ 2014-06-01 10:54 ` Thomas Petazzoni
2014-06-01 20:12 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 10:54 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:23 +0200, Samuel Martin wrote:
> This patch introduces a toolchainfile.cmake.in template which is filled
> by Buildroot.
>
> Using a toolchainfile.cmake.in template file allows to avoid overloading
> quoting and/or escaping and it becomes much more similar to the
> resulting file.
>
> This patch also cleans up the quoting style.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> + sed \
> + -e 's:@@HOST_DIR@@:$(call qstrip,$(HOST_DIR)):' \
> + -e 's:@@STAGING_DIR@@:$(call qstrip,$(STAGING_DIR)):' \
> + -e 's:@@TARGET_CFLAGS@@:$(call qstrip,$(TARGET_CFLAGS)):' \
> + -e 's:@@TARGET_CXXFLAGS@@:$(call qstrip,$(TARGET_CXXFLAGS)):' \
> + -e 's:@@TARGET_CC_NOCCACHE@@:$(call qstrip,$(TARGET_CC_NOCCACHE)):' \
> + -e 's:@@TARGET_CXX_NOCCACHE@@:$(call qstrip,$(TARGET_CXX_NOCCACHE)):' \
> + < $(TOPDIR)/support/misc/toolchainfile.cmake.in \
The stdin redirection here is not strictly needed: as argument, sed
takes an input file. But it's not necessary to do another post of the
patch series just for this, I believe.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake
2014-06-01 9:24 ` [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake Samuel Martin
@ 2014-06-01 10:57 ` Thomas Petazzoni
2014-06-01 20:16 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 10:57 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:24 +0200, Samuel Martin wrote:
> The patch allows sharing or moving the toolchains.
>
> This is a step toward making the toolchain/sdk relocatable.
>
> Closes #6818
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Uwe Strempel <u.strempel@googlemail.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +# In all the other variables that need to refer to HOST_DIR will use
> +# the RELOCATED_HOST_DIR variable.
There's a typo in this sentence. Either:
"""
All the other variables that need to refer to HOST_DIR will use the
RELOCATED_HOST_DIR variable.
"""
or
"""
In all the other variables that need to refer to HOST_DIR, we'll use
the RELOCATED_HOST_DIR variable.
"""
But hopefully Peter can fix this while applying.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages
2014-06-01 9:24 ` [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages Samuel Martin
@ 2014-06-01 10:57 ` Thomas Petazzoni
2014-06-01 20:17 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 10:57 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:25 +0200, Samuel Martin wrote:
> This patch updates the generated toolchainfile.cmake to use ccache.
>
> When toolchainfile.cmake is used inside Buildroot, using ccache during
> the build is driven by a CMake knob: USE_CCACHE, automatically set by
> the cmake-package infrastructure and reflecting the BR2_CCACHE value.
>
> Since this toolchainefile.cmake file can be used outside Buildroot, and
> this file also set a couple of things (among these: the sysroot cflag,
> some pkg-config environment variables), it is important to set the
> compiler variables as well to keep the consistency of the
> cross-compilation configuration.
> So, when it is used outside Buildroot, using ccache for the build is
> driven by the ccache program availability.
>
> Note that using ccache for the build is achieved by setting the *_ARG1
> CMake variables to let CMake use ccache without failing in detecting
> the compiler.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 04/11] rpi-userland: cleanup *_CONF_OPT
2014-06-01 9:24 ` [Buildroot] [PATCH v4 04/11] rpi-userland: cleanup *_CONF_OPT Samuel Martin
@ 2014-06-01 11:04 ` Thomas Petazzoni
0 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:04 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:26 +0200, Samuel Martin wrote:
> rpi-userland does not need -DBUILD_SHARED_LIBS=OFF to be passed to
> correclty build its static libraries; so remove this cmake flag from the
> configure options.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
As discussed in real-life, this should probably be squashed with PATCH
05/11, and with an expanded explanation that details why reverting
5e3b1f31b3f82e3b163567f10d7131c9d649a2cf does not re-introduce the bug
that 5e3b1f31b3f82e3b163567f10d7131c9d649a2cf was fixing.
Maybe you should submit these fixes separately, since they are not
related to the CMake package infrastructure per se?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag
2014-06-01 9:24 ` [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag Samuel Martin
@ 2014-06-01 11:05 ` Thomas Petazzoni
2014-06-01 20:18 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:05 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:28 +0200, Samuel Martin wrote:
> This CMake flag is used to enable tests. It may not disable the test
> programs from being built, but it controls the test execution.
>
> Since we don't care about building the tests (and usually disable them
> when possible), make sure Buildroot won't try to run them.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG
2014-06-01 9:24 ` [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG Samuel Martin
@ 2014-06-01 11:06 ` Thomas Petazzoni
2014-06-01 20:18 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:06 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:29 +0200, Samuel Martin wrote:
> This CMake flag is usually used to adjust compiler flags (like: -Ox, -g,
> etc).
>
> So, it makes sense for Buildroot to globally drive this CMake flags in
> the cmake-package infrastructure.
>
> However, if a package prefer overriding this default setting, it still
> can via the <PKG>_CONF_OPT variable.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Tested-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE Samuel Martin
@ 2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:19 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:07 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:30 +0200, Samuel Martin wrote:
> This flag is already correctly set by the cmake-package infrastructure.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 09/11] opencv: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 09/11] opencv: " Samuel Martin
@ 2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:07 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:31 +0200, Samuel Martin wrote:
> This flag is already correctly set by the cmake-package infrastructure.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 10/11] flann: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 10/11] flann: " Samuel Martin
@ 2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:07 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:32 +0200, Samuel Martin wrote:
> This flag is already correctly set by the cmake-package infrastructure.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 11/11] qhull: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 11/11] qhull: " Samuel Martin
@ 2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:07 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 1 Jun 2014 11:24:33 +0200, Samuel Martin wrote:
> This flag is already correctly set by the cmake-package infrastructure.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
` (10 preceding siblings ...)
2014-06-01 9:24 ` [Buildroot] [PATCH v4 11/11] qhull: " Samuel Martin
@ 2014-06-01 11:08 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
11 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2014-06-01 11:08 UTC (permalink / raw)
To: buildroot
Peter,
On Sun, 1 Jun 2014 11:24:22 +0200, Samuel Martin wrote:
> Here is another series about the CMake infrastructure.
>
> No big change in here, except that now the toolchainfile.cmake file
> is templated instead of being generated.
Could you apply patches 1 to 3 and 6 to 11 from this series? I think
they are ready, and they have been around for quite some time, so they
should be applied now.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation
2014-06-01 9:24 ` [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation Samuel Martin
2014-06-01 10:54 ` Thomas Petazzoni
@ 2014-06-01 20:12 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:12 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This patch introduces a toolchainfile.cmake.in template which is filled
> by Buildroot.
> Using a toolchainfile.cmake.in template file allows to avoid overloading
> quoting and/or escaping and it becomes much more similar to the
> resulting file.
> This patch also cleans up the quoting style.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Baruch Siach <baruch@tkos.co.il>
Committed with the stdin redirect changed as suggested by Thomas, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake
2014-06-01 9:24 ` [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake Samuel Martin
2014-06-01 10:57 ` Thomas Petazzoni
@ 2014-06-01 20:16 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:16 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> The patch allows sharing or moving the toolchains.
> This is a step toward making the toolchain/sdk relocatable.
> Closes #6818
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Uwe Strempel <u.strempel@googlemail.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
> changes v3 -> v4:
> - rebase
> - add comments to explain the logic (Arnout)
Committed with the comment reworded as suggested by Thomas, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages
2014-06-01 9:24 ` [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages Samuel Martin
2014-06-01 10:57 ` Thomas Petazzoni
@ 2014-06-01 20:17 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:17 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This patch updates the generated toolchainfile.cmake to use ccache.
> When toolchainfile.cmake is used inside Buildroot, using ccache during
> the build is driven by a CMake knob: USE_CCACHE, automatically set by
> the cmake-package infrastructure and reflecting the BR2_CCACHE value.
> Since this toolchainefile.cmake file can be used outside Buildroot, and
> this file also set a couple of things (among these: the sysroot cflag,
> some pkg-config environment variables), it is important to set the
> compiler variables as well to keep the consistency of the
> cross-compilation configuration.
> So, when it is used outside Buildroot, using ccache for the build is
> driven by the ccache program availability.
> Note that using ccache for the build is achieved by setting the *_ARG1
> CMake variables to let CMake use ccache without failing in detecting
> the compiler.
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG
2014-06-01 9:24 ` [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG Samuel Martin
2014-06-01 11:06 ` Thomas Petazzoni
@ 2014-06-01 20:18 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:18 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This CMake flag is usually used to adjust compiler flags (like: -Ox, -g,
> etc).
> So, it makes sense for Buildroot to globally drive this CMake flags in
> the cmake-package infrastructure.
> However, if a package prefer overriding this default setting, it still
> can via the <PKG>_CONF_OPT variable.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Tested-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag
2014-06-01 9:24 ` [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag Samuel Martin
2014-06-01 11:05 ` Thomas Petazzoni
@ 2014-06-01 20:18 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:18 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This CMake flag is used to enable tests. It may not disable the test
> programs from being built, but it controls the test execution.
> Since we don't care about building the tests (and usually disable them
> when possible), make sure Buildroot won't try to run them.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
@ 2014-06-01 20:19 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:19 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This flag is already correctly set by the cmake-package infrastructure.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 09/11] opencv: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 09/11] opencv: " Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
@ 2014-06-01 20:20 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:20 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This flag is already correctly set by the cmake-package infrastructure.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 10/11] flann: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 10/11] flann: " Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
@ 2014-06-01 20:20 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:20 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This flag is already correctly set by the cmake-package infrastructure.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 11/11] qhull: do not override CMAKE_BUILD_TYPE
2014-06-01 9:24 ` [Buildroot] [PATCH v4 11/11] qhull: " Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
@ 2014-06-01 20:20 ` Peter Korsgaard
1 sibling, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:20 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
> This flag is already correctly set by the cmake-package infrastructure.
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring
2014-06-01 11:08 ` [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Thomas Petazzoni
@ 2014-06-01 20:20 ` Peter Korsgaard
0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2014-06-01 20:20 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Peter,
> On Sun, 1 Jun 2014 11:24:22 +0200, Samuel Martin wrote:
>> Here is another series about the CMake infrastructure.
>>
>> No big change in here, except that now the toolchainfile.cmake file
>> is templated instead of being generated.
> Could you apply patches 1 to 3 and 6 to 11 from this series? I think
> they are ready, and they have been around for quite some time, so they
> should be applied now.
Done, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2014-06-01 20:20 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01 9:24 [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 01/11] pkg-cmake.mk: refactor the toolchainfile.cmake generation Samuel Martin
2014-06-01 10:54 ` Thomas Petazzoni
2014-06-01 20:12 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 02/11] pkg-cmake.mk: do not hardcode absolute path in toolchainfile.cmake Samuel Martin
2014-06-01 10:57 ` Thomas Petazzoni
2014-06-01 20:16 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 03/11] pkg-cmake.mk: enable ccache for cmake packages Samuel Martin
2014-06-01 10:57 ` Thomas Petazzoni
2014-06-01 20:17 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 04/11] rpi-userland: cleanup *_CONF_OPT Samuel Martin
2014-06-01 11:04 ` Thomas Petazzoni
2014-06-01 9:24 ` [Buildroot] [PATCH v4 05/11] xbmc: fix missing libraries from rpi-userland Samuel Martin
2014-06-01 9:24 ` [Buildroot] [PATCH v4 06/11] pkg-cmake.mk: globally disable BUILD_TESTING flag Samuel Martin
2014-06-01 11:05 ` Thomas Petazzoni
2014-06-01 20:18 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 07/11] pkg-cmake.mk: globally drive the CMAKE_BUILD_TYPE flag using BR2_ENABLE_DEBUG Samuel Martin
2014-06-01 11:06 ` Thomas Petazzoni
2014-06-01 20:18 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 08/11] openpowerlink: do not override CMAKE_BUILD_TYPE Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:19 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 09/11] opencv: " Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 10/11] flann: " Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
2014-06-01 9:24 ` [Buildroot] [PATCH v4 11/11] qhull: " Samuel Martin
2014-06-01 11:07 ` Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
2014-06-01 11:08 ` [Buildroot] [PATCH v4 00/11] CMake infrastructure refactoring Thomas Petazzoni
2014-06-01 20:20 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox