[PATCH 2/2] silo: compile host-side tools with HOSTCC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Compile host-side tools with HOSTCC/HOSTCFLAGS.

Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxx>
---
 Rules.make      | 2 ++
 common/Makefile | 3 +++
 second/Makefile | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Rules.make b/Rules.make
index 4e722f9..0f176db 100644
--- a/Rules.make
+++ b/Rules.make
@@ -4,6 +4,7 @@ SHELL=/bin/bash
 RM=rm -f
 # We want to force 32-bit builds
 CC=gcc -m32
+HOSTCC=gcc
 LD=ld -m elf32_sparc
 AS=as
 STRIP=strip
@@ -20,6 +21,7 @@ cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
 CFLAGS = -Os -Wall -I. -I../include -fomit-frame-pointer \
 	-fno-strict-aliasing -DSMALL_RELOC=$(SMALL_RELOC) \
 	-DLARGE_RELOC=$(LARGE_RELOC)
+HOSTCFLAGS = -O2 -Wall
 
 ifeq ($(call cc-option-yn, -fno-stack-protector),y)
 CFLAGS += -fno-stack-protector
diff --git a/common/Makefile b/common/Makefile
index f931af2..4c6f116 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -16,6 +16,9 @@ PROGRAMS = bin2h
 
 all: $(OBJS) $(PROGRAMS)
 
+bin2h: bin2h.c
+	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
+
 prom.o: prom.c
 	$(CC) $(CFLAGS) -c -Wa,-Av9 -o prom.o prom.c
 
diff --git a/second/Makefile b/second/Makefile
index 75f9c20..1b504f3 100644
--- a/second/Makefile
+++ b/second/Makefile
@@ -85,7 +85,7 @@ malloc.o: ../common/malloc.c
 	$(CC) $(CFLAGS) -c -o $@ $<
 
 util:	util.c
-	$(CC) -DSMALL_RELOC=$(SMALL_RELOC) -DLARGE_RELOC=$(LARGE_RELOC) -o $@ $<
+	$(HOSTCC) $(HOSTCFLAGS) -DSMALL_RELOC=$(SMALL_RELOC) -DLARGE_RELOC=$(LARGE_RELOC) -o $@ $<
 
 clean:
 	$(RM) *.o fs/*.o second* silotftp* util fs/libfs.a
-- 
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux