Skip to contentSkip to conversation

Makefile: Add CROSS_COMPILE for Makefile

PATCH In review Yuanbin Zhou 2 participants 3 messages Sep 29, 2015 – Oct 5, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Makefile: Add CROSS_COMPILE for Makefile

---
 Makefile | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Makefile +11 -2
index 87946fb..35a7d5a 100644
@@ -1,6 +1,15 @@
 VERSION = 0.94
-CC=$(CROSS_COMPILE)gcc
-AR=$(CROSS_COMPILE)ar
+
+CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CC) -E
+AR = $(CROSS_COMPILE)ar
+NM = $(CROSS_COMPILE)nm
+STRIP = $(CROSS_COMPILE)strip
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
 
 OBJDIR = bld
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 32 lines · Yuanbin Zhou
---
 Makefile | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Makefile +11 -2
index 87946fb..35a7d5a 100644
@@ -1,6 +1,15 @@
 VERSION = 0.94
-CC=$(CROSS_COMPILE)gcc
-AR=$(CROSS_COMPILE)ar
+
+CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CC) -E
+AR = $(CROSS_COMPILE)ar
+NM = $(CROSS_COMPILE)nm
+STRIP = $(CROSS_COMPILE)strip
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
 
 OBJDIR = bld
 
Signature · 4 lines
2.1.4


--

Thanks!

#2 lore raw

I'm really sorry to do this, after signing-off on it, but I have taken a closer look at this patch, and I have to reverse it.

You've added a lot of cross compiling options for things we don't use like AS. CONFIG_CROSS_COMPILE looks like something out of the kernel.

Thanks for your efforts anyway, but in the future if you want to send me patches you are going to have to include examples, of what is not working for you (with output), and then output demonstrating how your patch corrects the problem. Thanks

Quoted 41 lines · John Kacur
Quoted 32 lines · Yuanbin Zhou
---
 Makefile | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Makefile +11 -2
index 87946fb..35a7d5a 100644
@@ -1,6 +1,15 @@
 VERSION = 0.94
-CC=$(CROSS_COMPILE)gcc
-AR=$(CROSS_COMPILE)ar
+
+CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
+AS = $(CROSS_COMPILE)as
+LD = $(CROSS_COMPILE)ld
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CC) -E
+AR = $(CROSS_COMPILE)ar
+NM = $(CROSS_COMPILE)nm
+STRIP = $(CROSS_COMPILE)strip
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
 
 OBJDIR = bld
 
Signature · 4 lines
2.1.4


--

Thanks!