Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/5] CMake cleanup
@ 2014-08-21 20:45 Samuel Martin
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-21 20:45 UTC (permalink / raw)
  To: buildroot

Hi all,

Quick respin of this series cleaning up the {host-,}cmake-package
infrastructure (more specifically how the {C,CXX,LD}FLAGS are
handled) and fix the bug #7280.

For this round, I have discarded the 6th patch which is an RFC.
The only others changes are typo fixes in the commit message of
the patch 5/5

Cheers,


Samuel Martin (5):
  package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for
    host-package
  package/pkg-cmake.mk: set the {C,CXX,LD}FLAGS for host packages
  toolchainfile.cmake.in: set linker flags
  package/cdrkit: clean {HOST_,}CDRKIT_CONF_OPT
  toolchainfile.cmake.in: do not force the CMAKE_{C,CXX}_FLAGS to the
    cache

 package/cdrkit/cdrkit.mk            | 7 -------
 package/pkg-cmake.mk                | 5 ++++-
 support/misc/toolchainfile.cmake.in | 5 +++--
 3 files changed, 7 insertions(+), 10 deletions(-)

--
2.1.0

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package
  2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
@ 2014-08-21 20:45 ` Samuel Martin
  2014-09-14 16:19   ` Yann E. MORIN
  2014-09-28 18:50   ` Peter Korsgaard
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages Samuel Martin
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-21 20:45 UTC (permalink / raw)
  To: buildroot

The USE_CCACHE CMake flag is only useful when building target package
(only the toolchainfile.cmake uses it).

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v1 -> v2:
- no change
---
 package/pkg-cmake.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 30198a9..f5aefae 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -86,7 +86,6 @@ 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) \
 		-DBUILD_TESTING=OFF \
 		$$($$(PKG)_CONF_OPT) \
 	)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages
  2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
@ 2014-08-21 20:45 ` Samuel Martin
  2014-09-14 16:27   ` Yann E. MORIN
  2014-09-28 18:52   ` Peter Korsgaard
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags Samuel Martin
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-21 20:45 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v1 -> v2:
- no change
---
 package/pkg-cmake.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index f5aefae..3655751 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -86,6 +86,9 @@ define $(2)_CONFIGURE_CMDS
 		-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \
 		-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
 		-DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \
+		-DCMAKE_C_FLAGS="$$(HOST_CFLAGS)" \
+		-DCMAKE_CXX_FLAGS="$$(HOST_CXXFLAGS)" \
+		-DCMAKE_EXE_LINKER_FLAGS="$$(HOST_LDFLAGS)" \
 		-DBUILD_TESTING=OFF \
 		$$($$(PKG)_CONF_OPT) \
 	)
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags
  2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages Samuel Martin
@ 2014-08-21 20:45 ` Samuel Martin
  2014-09-14 16:34   ` Yann E. MORIN
  2014-09-28 19:11   ` Peter Korsgaard
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT Samuel Martin
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache Samuel Martin
  4 siblings, 2 replies; 14+ messages in thread
From: Samuel Martin @ 2014-08-21 20:45 UTC (permalink / raw)
  To: buildroot

The linker flags are part of the toolchain configuration, so set them for
the CMake-based packages.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v1 -> v2:
- no change
---
 package/pkg-cmake.mk                | 1 +
 support/misc/toolchainfile.cmake.in | 1 +
 2 files changed, 2 insertions(+)

diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
index 3655751..2006b76 100644
--- a/package/pkg-cmake.mk
+++ b/package/pkg-cmake.mk
@@ -177,6 +177,7 @@ $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
 		-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_LDFLAGS@@:$(call qstrip,$(TARGET_LDFLAGS)):' \
 		-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 46ed932..1dfbdba 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -14,6 +14,7 @@ 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_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS")
 set(CMAKE_INSTALL_SO_NO_EXE 0)
 
 set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin")
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT
  2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
                   ` (2 preceding siblings ...)
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags Samuel Martin
@ 2014-08-21 20:45 ` Samuel Martin
  2014-09-28 19:11   ` Peter Korsgaard
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache Samuel Martin
  4 siblings, 1 reply; 14+ messages in thread
From: Samuel Martin @ 2014-08-21 20:45 UTC (permalink / raw)
  To: buildroot

Extending {C,LD}FLAGS for both host and target cdrkit package is not needed
because it is already handled by the {host-,}cmake-package infrastructure.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v1 -> v2:
- no change
---
 package/cdrkit/cdrkit.mk | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/package/cdrkit/cdrkit.mk b/package/cdrkit/cdrkit.mk
index ee98013..3cb64b2 100644
--- a/package/cdrkit/cdrkit.mk
+++ b/package/cdrkit/cdrkit.mk
@@ -18,12 +18,5 @@ endif
 
 CDRKIT_CONF_OPT += $(CMAKE_ENDIAN_OPT)
 
-## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
-## some extra flags so it finds needed libs and headers.
-CDRKIT_CONF_OPT += -DCMAKE_C_FLAGS="-I$(STAGING_DIR)/usr/include"
-CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
-HOST_CDRKIT_CONF_OPT += -DCMAKE_C_FLAGS="-I$(HOST_DIR)/usr/include"
-HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"
-
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache
  2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
                   ` (3 preceding siblings ...)
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT Samuel Martin
@ 2014-08-21 20:45 ` Samuel Martin
  2014-09-28 19:11   ` Peter Korsgaard
  4 siblings, 1 reply; 14+ messages in thread
From: Samuel Martin @ 2014-08-21 20:45 UTC (permalink / raw)
  To: buildroot

Fix #7280 [1]

When the FORCE option is passed to the set command, the variable is
added/updated in the CMake cache every single time CMake processes this
command.

Because the toolchainfile.cmake prepends architecture/toolchain flags
to the CMAKE_{C,CXX}_FLAGS, this makes the CFLAGS being updated in the
generated Makefiles each time one reconfigures its project. So it
forces the compilation of everything, even when nothing has changed.

[1] https://bugs.busybox.net/show_bug.cgi?id=7280

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
(tested the SimpleApp reproduction scenario described in the bug report)

---
changes v1 -> v2:
- fix typoes in commit log (ThomasDS)
- update A/R/T tags
---
 support/misc/toolchainfile.cmake.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index 1dfbdba..4ca3d35 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -12,8 +12,8 @@ string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST
 
 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_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS")
+set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS")
 set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS")
 set(CMAKE_INSTALL_SO_NO_EXE 0)
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
@ 2014-09-14 16:19   ` Yann E. MORIN
  2014-09-28 18:50   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-09-14 16:19 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-08-21 22:45 +0200, Samuel Martin spake thusly:
> The USE_CCACHE CMake flag is only useful when building target package
> (only the toolchainfile.cmake uses it).
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - no change
> ---
>  package/pkg-cmake.mk | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index 30198a9..f5aefae 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -86,7 +86,6 @@ 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) \
>  		-DBUILD_TESTING=OFF \
>  		$$($$(PKG)_CONF_OPT) \
>  	)
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages Samuel Martin
@ 2014-09-14 16:27   ` Yann E. MORIN
  2014-09-28 18:52   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-09-14 16:27 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-08-21 22:45 +0200, Samuel Martin spake thusly:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

As I am not a cmake expert, I'd like a bit more explanations in the
commit log.

What puzzles me is that, for the target case, these flags are passed via
support/misc/toolchainfile.cmake.in, while for the host, we pass them on
the command line. This is not consistent.

Why don't we also use a host.cmake.in file like we have for the target?

Note that us having support/misc/toolchainfile.cmake.in does not even
help for building a cmake package outside of Buildroot (but still using
our toolchain), since the user may forget to define CMAKE_TOOLCHAIN_FILE
when calling cmake on his own.

Note: I know you have a good answer, but I'm a bit lost as to all those
special-casing in cmake, which makes reviewing a bit difficult, and a
bit of comments in the commit log (a pointer to the cmake doc would be
enough!) would make it easier.

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - no change
> ---
>  package/pkg-cmake.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index f5aefae..3655751 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -86,6 +86,9 @@ define $(2)_CONFIGURE_CMDS
>  		-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \
>  		-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
>  		-DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \
> +		-DCMAKE_C_FLAGS="$$(HOST_CFLAGS)" \
> +		-DCMAKE_CXX_FLAGS="$$(HOST_CXXFLAGS)" \
> +		-DCMAKE_EXE_LINKER_FLAGS="$$(HOST_LDFLAGS)" \
>  		-DBUILD_TESTING=OFF \
>  		$$($$(PKG)_CONF_OPT) \
>  	)
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags Samuel Martin
@ 2014-09-14 16:34   ` Yann E. MORIN
  2014-09-28 19:11   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2014-09-14 16:34 UTC (permalink / raw)
  To: buildroot

Samuel, All,

On 2014-08-21 22:45 +0200, Samuel Martin spake thusly:
> The linker flags are part of the toolchain configuration, so set them for
> the CMake-based packages.
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

This patch does not add the FORCE option, like for CFLAGS and CXXFLAGS,
which make it a bit incoherent. But since we're removing in the
following patch, that's OK.

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> changes v1 -> v2:
> - no change
> ---
>  package/pkg-cmake.mk                | 1 +
>  support/misc/toolchainfile.cmake.in | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk
> index 3655751..2006b76 100644
> --- a/package/pkg-cmake.mk
> +++ b/package/pkg-cmake.mk
> @@ -177,6 +177,7 @@ $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake:
>  		-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_LDFLAGS@@:$(call qstrip,$(TARGET_LDFLAGS)):' \
>  		-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 46ed932..1dfbdba 100644
> --- a/support/misc/toolchainfile.cmake.in
> +++ b/support/misc/toolchainfile.cmake.in
> @@ -14,6 +14,7 @@ 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_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS")
>  set(CMAKE_INSTALL_SO_NO_EXE 0)
>  
>  set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin")
> -- 
> 2.1.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
  2014-09-14 16:19   ` Yann E. MORIN
@ 2014-09-28 18:50   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2014-09-28 18:50 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 > The USE_CCACHE CMake flag is only useful when building target package
 > (only the toolchainfile.cmake uses it).

 > Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages Samuel Martin
  2014-09-14 16:27   ` Yann E. MORIN
@ 2014-09-28 18:52   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2014-09-28 18:52 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 > Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Committed, thanks.

I do agree with Yann though that it would be good if the commit messages
were more detailed. Why do we use a toolchain files for target, but not
for host?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags Samuel Martin
  2014-09-14 16:34   ` Yann E. MORIN
@ 2014-09-28 19:11   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2014-09-28 19:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 > The linker flags are part of the toolchain configuration, so set them for
 > the CMake-based packages.

 > Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT Samuel Martin
@ 2014-09-28 19:11   ` Peter Korsgaard
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2014-09-28 19:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 > Extending {C,LD}FLAGS for both host and target cdrkit package is not needed
 > because it is already handled by the {host-,}cmake-package infrastructure.

 > Signed-off-by: Samuel Martin <s.martin49@gmail.com>

No longer applied, but I've fixed it up and committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache
  2014-08-21 20:45 ` [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache Samuel Martin
@ 2014-09-28 19:11   ` Peter Korsgaard
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2014-09-28 19:11 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 > Fix #7280 [1]
 > When the FORCE option is passed to the set command, the variable is
 > added/updated in the CMake cache every single time CMake processes this
 > command.

 > Because the toolchainfile.cmake prepends architecture/toolchain flags
 > to the CMAKE_{C,CXX}_FLAGS, this makes the CFLAGS being updated in the
 > generated Makefiles each time one reconfigures its project. So it
 > forces the compilation of everything, even when nothing has changed.

 > [1] https://bugs.busybox.net/show_bug.cgi?id=7280

 > Signed-off-by: Samuel Martin <s.martin49@gmail.com>
 > Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
 > (tested the SimpleApp reproduction scenario described in the bug report)

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-09-28 19:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-21 20:45 [Buildroot] [PATCH v2 0/5] CMake cleanup Samuel Martin
2014-08-21 20:45 ` [Buildroot] [PATCH v2 1/5] package/pkg-cmake.mk: remove the USE_CCACHE CMake flag for host-package Samuel Martin
2014-09-14 16:19   ` Yann E. MORIN
2014-09-28 18:50   ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 2/5] package/pkg-cmake.mk: set the {C, CXX, LD}FLAGS for host packages Samuel Martin
2014-09-14 16:27   ` Yann E. MORIN
2014-09-28 18:52   ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 3/5] toolchainfile.cmake.in: set linker flags Samuel Martin
2014-09-14 16:34   ` Yann E. MORIN
2014-09-28 19:11   ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 4/5] package/cdrkit: clean {HOST_, }CDRKIT_CONF_OPT Samuel Martin
2014-09-28 19:11   ` Peter Korsgaard
2014-08-21 20:45 ` [Buildroot] [PATCH v2 5/5] toolchainfile.cmake.in: do not force the CMAKE_{C, CXX}_FLAGS to the cache Samuel Martin
2014-09-28 19:11   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox