[Skiboot] [PATCH] external/common: Adjust rules.mk to correctly use CROSS_COMPILE
Cyril Bur
cyril.bur at au1.ibm.com
Tue Aug 2 15:14:34 AEST 2016
As pointed out by Oliver O'Halloran:
make automatically defines CC so the ?= assignment is never done. You
can get the desired behaviour with and ifdef block though.
This patch adds that ifdef block.
Signed-off-by: Cyril Bur <cyril.bur at au1.ibm.com>
---
external/common/rules.mk | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/external/common/rules.mk b/external/common/rules.mk
index bb12fd5..59e8905 100644
--- a/external/common/rules.mk
+++ b/external/common/rules.mk
@@ -1,5 +1,8 @@
-CC ?= $(CROSS_COMPILE)gcc
-LD ?= $(CROSS_COMPILE)ld
+ifdef CROSS_COMPILE
+CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)ld
+endif
+
ARCH := $(shell $(GET_ARCH) "$(CROSS_COMPILE)")
ifeq ($(ARCH),ARCH_ARM)
--
2.9.2
More information about the Skiboot
mailing list