* [Buildroot] [PATCH] pkg-cmake.mk: set CMAKE_SYSROOT variable in toolchainfile.cmake
@ 2016-08-17 21:19 Samuel Martin
2016-08-18 20:27 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Martin @ 2016-08-17 21:19 UTC (permalink / raw)
To: buildroot
This change enforces the CMAKE_SYSROOT value set in the toolchainfile.cmake.
This fix overrides the CMake heuristics used to guess it, and turns off some
non-desirable behavior adding "-isystem ..." flags to the compiler command
line, misleading the compiler and making the build failed due to some
unfound standard headers.
Fixes:
http://autobuild.buildroot.net/results/f7e/f7e92678e91a6cb15ccf32d4a7d75b39f49d6000/defconfig
(and others)
Cc: Ben Boeckel <mathstuf@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
support/misc/toolchainfile.cmake.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index e550b8f..649b52d 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -19,6 +19,7 @@ set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE
set(CMAKE_INSTALL_SO_NO_EXE 0)
set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin")
+set(CMAKE_SYSROOT "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] pkg-cmake.mk: set CMAKE_SYSROOT variable in toolchainfile.cmake
2016-08-17 21:19 [Buildroot] [PATCH] pkg-cmake.mk: set CMAKE_SYSROOT variable in toolchainfile.cmake Samuel Martin
@ 2016-08-18 20:27 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-08-18 20:27 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 17 Aug 2016 23:19:36 +0200, Samuel Martin wrote:
> This change enforces the CMAKE_SYSROOT value set in the toolchainfile.cmake.
>
> This fix overrides the CMake heuristics used to guess it, and turns off some
> non-desirable behavior adding "-isystem ..." flags to the compiler command
> line, misleading the compiler and making the build failed due to some
> unfound standard headers.
>
> Fixes:
> http://autobuild.buildroot.net/results/f7e/f7e92678e91a6cb15ccf32d4a7d75b39f49d6000/defconfig
> (and others)
>
> Cc: Ben Boeckel <mathstuf@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
> support/misc/toolchainfile.cmake.in | 1 +
> 1 file changed, 1 insertion(+)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-18 20:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 21:19 [Buildroot] [PATCH] pkg-cmake.mk: set CMAKE_SYSROOT variable in toolchainfile.cmake Samuel Martin
2016-08-18 20:27 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.