[Buildroot] [PATCH 2/2] package/fastd: do not overwrite the cmake module path
Alexander Dahl
post at lespocky.de
Thu Mar 2 22:34:38 UTC 2017
Already applied upstream:
https://git.universe-factory.net/fastd/commit/?id=a925a4cab1b722a2a24b0c1d2a1925f3b766de61
Thanks. :-)
Alex
On Thu, Mar 02, 2017 at 10:03:16PM +0100, Yann E. MORIN wrote:
> fastd's CMakeList.txt completely overwrites CMAKE_MODULE_PATH with its
> own, thus causing cmake to not find our own custom one.
>
> We fix fastd by appending its custom value, rather than replacing.
>
> Fixes;
> http://autobuild.buildroot.net/results/69f/69fb2e3b549a069e2898506db918423e6742c589/
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> Cc: Alexander Dahl <post at lespocky.de>
> Cc: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
> Cc: Baruch Siach <baruch at tkos.co.il>
> Cc: Ben Boeckel <mathstuf at gmail.com>
> Cc: Jörg Krause <joerg.krause at embedded.rocks>
> Cc: Vicente Olivert Riera <Vincent.Riera at imgtec.com>
> Cc: Samuel Martin <s.martin49 at gmail.com>
> ---
> ...02-CMakeList-do-not-overwrite-module-path.patch | 56 ++++++++++++++++++++++
> 1 file changed, 56 insertions(+)
> create mode 100644 package/fastd/0002-CMakeList-do-not-overwrite-module-path.patch
>
> diff --git a/package/fastd/0002-CMakeList-do-not-overwrite-module-path.patch b/package/fastd/0002-CMakeList-do-not-overwrite-module-path.patch
> new file mode 100644
> index 0000000..88c1953
> --- /dev/null
> +++ b/package/fastd/0002-CMakeList-do-not-overwrite-module-path.patch
> @@ -0,0 +1,56 @@
> +From a925a4cab1b722a2a24b0c1d2a1925f3b766de61 Mon Sep 17 00:00:00 2001
> +From: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> +Date: Thu, 2 Mar 2017 21:43:39 +0100
> +Subject: [PATCH] CMakeList: do not overwrite module path
> +
> +Currently, the CMakeList.txt completely overwrites the CMAKE_MODULE_PATH
> +variable.
> +
> +This is problematic when an upper-layer buildsystem wants to set its own
> +module path to use custom modules.
> +
> +For example, Buldroot [0] provides a custom platform description [1] to fix
> +cross-compilation issue. Overwriting the module path means that this
> +custom platform description is not found [2].
> +
> +Providing such a custom platform description is what the upstream cmake
> +devs suggest [3], quoting:
> +
> + If a toolchain file specifies CMAKE_SYSTEM_NAME such that a custom
> + `Platform/MySystem.cmake` file is loaded then the latter can set
> + them [*] as needed for the target platform.
> +
> +[*] offending settings causing RPATH issues during cross-compilation.
> +
> +So we need to append our source tree to the module path, not replace it
> +blindly.
> +
> +[0] https://buildroot.org/
> +[1] https://git.buildroot.org/buildroot/tree/support/misc/Buildroot.cmake
> +[2] http://autobuild.buildroot.net/results/69f/69fb2e3b549a069e2898506db918423e6742c589/build-end.log
> +[3] http://public.kitware.com/pipermail/cmake/2017-February/065063.html
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> +---
> +Patch applied upstream:
> +https://git.universe-factory.net/fastd/commit/?id=a925a4cab1b722a2a24b0c1d2a1925f3b766de61
> +
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index 61689b1..2c9c61a 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -1,6 +1,6 @@
> + cmake_minimum_required(VERSION 2.8.8)
> +
> +-set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
> ++list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
> + cmake_policy(SET CMP0017 OLD) # Prefer modules in our module directory
> +
> + project(FASTD C ASM)
> +--
> +2.7.4
> +
> --
> 2.7.4
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: C28E E6B9 0263 95CF 8FAF 08FA 34AD CD00 7221 5CC6 ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170302/6565b769/attachment-0002.asc>
More information about the buildroot
mailing list