swupdate: ensure TARGET_CC is used for compiling/linking
authorPeter Korsgaard <peter@korsgaard.com>
Tue, 18 Dec 2018 09:11:06 +0000 (10:11 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 18 Dec 2018 13:41:09 +0000 (14:41 +0100)
Fixes:
http://autobuild.buildroot.net/results/e302d0edb59ff7617b5f2d21f06eb65ae04981fe
http://autobuild.buildroot.net/results/dbb69acadc20b4bb559311348eca276c1e6343f7

Swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not available in all
external toolchains, and use CC for linking. Ensure TARGET_CC is used for both.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/swupdate/swupdate.mk

index 6285437aaad361611dd78614c5c4887ded5586f2..08d6ba9372fb0d7b2f6a89a445deb22496a0a37e 100644 (file)
@@ -9,6 +9,11 @@ SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION))
 SWUPDATE_LICENSE = GPL-2.0+, LGPL-2.1+, MIT
 SWUPDATE_LICENSE_FILES = COPYING
 
+# swupdate uses $CROSS-cc instead of $CROSS-gcc, which is not
+# available in all external toolchains, and use CC for linking. Ensure
+# TARGET_CC is used for both.
+SWUPDATE_MAKE_ENV = CC="$(TARGET_CC)" LD="$(TARGET_CC)"
+
 # swupdate bundles its own version of mongoose (version 6.11)
 
 ifeq ($(BR2_PACKAGE_JSON_C),y)