From e77e37b957daac1a5d3cf53cce5dd50a8dd863d4 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Tue, 10 Feb 2015 14:15:45 -0700 Subject: cbootimage: Add HOSTCC and flags Add the flags used by the Nvidia makefile and use HOSTCC to build cbootimage. Note that adding -g makes the BCT very large, so leave that flag out. Change-Id: I4431efffdfdcbd030665b26f5b799352e38d1f95 Signed-off-by: Marc Jones Reviewed-on: http://review.coreboot.org/8411 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/nvidia/Makefile.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/nvidia/Makefile.inc b/util/nvidia/Makefile.inc index c8be3bbab2..91c8a94a9b 100644 --- a/util/nvidia/Makefile.inc +++ b/util/nvidia/Makefile.inc @@ -37,12 +37,15 @@ CBOOTIMAGE_RAW_SRCS:= \ CBOOTIMAGE_SRCS:=$(addprefix util/nvidia/cbootimage/src/,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS))) CBOOTIMAGE_OBJS:=$(addprefix $(objutil)/nvidia/cbootimage/,$(patsubst %.c,%.o,$(filter %.c,$(CBOOTIMAGE_RAW_SRCS)))) +CBOOTIMAGE_FLAGS:=-Wall -std=c99 -O2 additional-dirs += $(sort $(dir $(CBOOTIMAGE_OBJS))) $(objutil)/nvidia/cbootimage/%.o: util/nvidia/cbootimage/src/%.c - gcc -c -o $@ $< + printf " HOSTCC $(subst $(objutil)/,,$(@))\n" + $(HOSTCC) $(CBOOTIMAGE_FLAGS) -c -o $@ $< $(CBOOTIMAGE): $(CBOOTIMAGE_OBJS) - gcc -o $@.tmp $^ -lm + printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n" + $(HOSTCC) $(CBOOTIMAGE_FLAGS) -o $@.tmp $^ -lm mv $@.tmp $@ -- cgit v1.2.3