From patchwork Sun Sep 22 19:33:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 277032 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0CB5C2C00B1 for ; Mon, 23 Sep 2013 05:43:27 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752359Ab3IVTnV (ORCPT ); Sun, 22 Sep 2013 15:43:21 -0400 Received: from filtteri1.pp.htv.fi ([213.243.153.184]:57178 "EHLO filtteri1.pp.htv.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268Ab3IVTnU (ORCPT ); Sun, 22 Sep 2013 15:43:20 -0400 X-Greylist: delayed 534 seconds by postgrey-1.27 at vger.kernel.org; Sun, 22 Sep 2013 15:43:20 EDT Received: from localhost (localhost [127.0.0.1]) by filtteri1.pp.htv.fi (Postfix) with ESMTP id 5E6D621BA37; Sun, 22 Sep 2013 22:34:25 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp6.welho.com ([213.243.153.40]) by localhost (filtteri1.pp.htv.fi [213.243.153.184]) (amavisd-new, port 10024) with ESMTP id lZ4YfDXMKXA1; Sun, 22 Sep 2013 22:34:20 +0300 (EEST) Received: from blackmetal.pp.htv.fi (cs181064211.pp.htv.fi [82.181.64.211]) by smtp6.welho.com (Postfix) with ESMTP id 717425BC007; Sun, 22 Sep 2013 22:34:20 +0300 (EEST) From: Aaro Koskinen To: sparclinux@vger.kernel.org Cc: Aaro Koskinen Subject: [PATCH 2/2] silo: compile host-side tools with HOSTCC Date: Sun, 22 Sep 2013 22:33:04 +0300 Message-Id: <1379878384-26476-3-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1379878384-26476-1-git-send-email-aaro.koskinen@iki.fi> References: <1379878384-26476-1-git-send-email-aaro.koskinen@iki.fi> Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Compile host-side tools with HOSTCC/HOSTCFLAGS. Signed-off-by: Aaro Koskinen --- 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