Skip to contentSkip to conversation

pkg-cmake: fix host-cmake-package type

PATCH Superseded Ryan Barnett 3 participants 3 messages Jan 23, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

Also removing the unncessary quotes since the HOSTCC/HOSTCXX will already contain quotes. This could cause an issue with make as double quotes are not interpreted by make.

Minor formatting fix too.

---
v1 -> v2
- Implemented spacing and quote concerns from Yann E. MORIN and Samuel Marin.

---
 package/pkg-cmake.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/pkg-cmake.mk +6 -6
index 1037513..e738ba9 100644
@@ -22,13 +22,13 @@
 
 # Set compiler variables.
 ifeq ($(BR2_CCACHE),y)
-CMAKE_HOST_C_COMPILER="$(HOST_DIR)/usr/bin/ccache"
-CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache"
-CMAKE_HOST_C_COMPILER_ARG1="$(HOSTCC_NOCCACHE)"
-CMAKE_HOST_CXX_COMPILER_ARG1="$(HOSTCXX_NOCCACHE)"
+CMAKE_HOST_C_COMPILER = "$(HOST_DIR)/usr/bin/ccache"
+CMAKE_HOST_CXX_COMPILER = "$(HOST_DIR)/usr/bin/ccache"
+CMAKE_HOST_C_COMPILER_ARG1 = $(HOSTCC_NOCCACHE)
+CMAKE_HOST_CXX_COMPILER_ARG1 = $(HOSTCXX_NOCCACHE)
 else
-CMAKE_HOST_C_COMPILER="$$(HOSTCC)"
-CMAKE_HOST_CXX_COMPILER="$$(HOSTCXX)"
+CMAKE_HOST_C_COMPILER = $(HOSTCC)
+CMAKE_HOST_CXX_COMPILER = $(HOSTCXX)
 endif
 
 ################################################################################
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

Ryan, All,

On 2015-01-23 12:10 -0600, Ryan Barnett spake thusly:

Quoted 18 lines

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

Also removing the unncessary quotes since the HOSTCC/HOSTCXX will already contain quotes. This could cause an issue with make as double quotes are not interpreted by make.

Quoted 5 lines

Minor formatting fix too.

Regards,
Yann E. MORIN.

Quoted 37 lines

---
v1 -> v2
- Implemented spacing and quote concerns from Yann E. MORIN and Samuel Marin.

---
 package/pkg-cmake.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/pkg-cmake.mk +6 -6
index 1037513..e738ba9 100644
@@ -22,13 +22,13 @@
 
 # Set compiler variables.
 ifeq ($(BR2_CCACHE),y)
-CMAKE_HOST_C_COMPILER="$(HOST_DIR)/usr/bin/ccache"
-CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache"
-CMAKE_HOST_C_COMPILER_ARG1="$(HOSTCC_NOCCACHE)"
-CMAKE_HOST_CXX_COMPILER_ARG1="$(HOSTCXX_NOCCACHE)"
+CMAKE_HOST_C_COMPILER = "$(HOST_DIR)/usr/bin/ccache"
+CMAKE_HOST_CXX_COMPILER = "$(HOST_DIR)/usr/bin/ccache"
+CMAKE_HOST_C_COMPILER_ARG1 = $(HOSTCC_NOCCACHE)
+CMAKE_HOST_CXX_COMPILER_ARG1 = $(HOSTCXX_NOCCACHE)
 else
-CMAKE_HOST_C_COMPILER="$$(HOSTCC)"
-CMAKE_HOST_CXX_COMPILER="$$(HOSTCXX)"
+CMAKE_HOST_C_COMPILER = $(HOSTCC)
+CMAKE_HOST_CXX_COMPILER = $(HOSTCXX)
 endif
 
 ################################################################################
Signature · 1 line
1.9.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

Hi Ryan,

Quoted 48 lines · Yann E. MORIN

Ryan, All,

On 2015-01-23 12:10 -0600, Ryan Barnett spake thusly:

Quoted 18 lines

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

Also removing the unncessary quotes since the HOSTCC/HOSTCXX will already contain quotes. This could cause an issue with make as double quotes are not interpreted by make.

Quoted 5 lines

Minor formatting fix too.

Regards,
Yann E. MORIN.

Quoted 16 lines

---
v1 -> v2
- Implemented spacing and quote concerns from Yann E. MORIN and Samuel Marin.

---
 package/pkg-cmake.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/pkg-cmake.mk +0 -0
index 1037513..e738ba9 100644
@@ -22,13 +22,13 @@
 
Quoted 8 lines

package/pkg-cmake.mk line 26

Quoted 8 lines
package/pkg-cmake.mk +2 -4
 # Set compiler variables.
 ifeq ($(BR2_CCACHE),y)
-CMAKE_HOST_C_COMPILER="$(HOST_DIR)/usr/bin/ccache"
-CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache"
-CMAKE_HOST_C_COMPILER_ARG1="$(HOSTCC_NOCCACHE)"
-CMAKE_HOST_CXX_COMPILER_ARG1="$(HOSTCXX_NOCCACHE)"
+CMAKE_HOST_C_COMPILER = "$(HOST_DIR)/usr/bin/ccache"
+CMAKE_HOST_CXX_COMPILER = "$(HOST_DIR)/usr/bin/ccache"

No need for double quotes here (when used, this variable is surrounded by quotes [1]).
Otherwise, it looks good.

Quoted 20 lines
Quoted 11 lines
package/pkg-cmake.mk +4 -3
+CMAKE_HOST_C_COMPILER_ARG1 = $(HOSTCC_NOCCACHE)
+CMAKE_HOST_CXX_COMPILER_ARG1 = $(HOSTCXX_NOCCACHE)
 else
-CMAKE_HOST_C_COMPILER="$$(HOSTCC)"
-CMAKE_HOST_CXX_COMPILER="$$(HOSTCXX)"
+CMAKE_HOST_C_COMPILER = $(HOSTCC)
+CMAKE_HOST_CXX_COMPILER = $(HOSTCXX)
 endif
 
 ################################################################################
--
Quoted 2 lines

1.9.1

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |
Quoted 5 lines

'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

[1] http://git.buildroot.net/buildroot/tree/package/pkg-cmake.mk#n110

Regards,

Signature · 1 line
Samuel