diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-09-22 22:33:04 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-18 17:55:32 -0500 |
commit | 71d162c348d78c60c85e6c01e3b5d7c085eda979 (patch) | |
tree | f71e78ce4a0a0bc05d9e6a793f1efb3e42e3bf7a | |
parent | 4b8b35baa608a5e89c16a2cf114395a0bf8a894c (diff) | |
download | silo-71d162c348d78c60c85e6c01e3b5d7c085eda979.tar.gz |
silo: compile host-side tools with HOSTCC
Compile host-side tools with HOSTCC/HOSTCFLAGS.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Rules.make | 2 | ||||
-rw-r--r-- | common/Makefile | 3 | ||||
-rw-r--r-- | second/Makefile | 2 |
3 files changed, 6 insertions, 1 deletions
@@ -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 |